#ingeniousambivert-product
1 messages · Page 1 of 1 (latest)
Hi, could you try to expand the response?: https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hey, let me try.
PS. thanks for responding
Hey @undone tundra it gives a 500 error, cannot expand property metadata
hmm? Can you provide the request id that returns 500?
Yes, please wait
Request ID - req_Ugf2zZqGHy5ZOR
Hey, in the dashboard it says its 400 -
{
"error": {
"message": "This property cannot be expanded (metadata).",
"type": "invalid_request_error"
}
}
But in postman it said 500
Hmm, sorry maybe metadata is a direct parameter and we should see it in the first place
can you get me the original request that you don't see metadata in it?
request id
Yeah sure
REQUEST ID with no metdata -
req_JAPvBOLdigNYB7
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": null,```
This is the response I get, It should have the key-values I added via the dashboard, since I can the values in the dashboard
Hmm that is the price price_1Jg2yUSGecfPsxmkP2Cogsaw, which has no metadata. The first code you provided is price_1Jgr982eZvKYlo2C1uwOZc90 which has metadata
The first code I provided was from the docs
That's weird, let me look closer. At the first glance I don't see any metadata currently on that object
I added it after creating the product from the dashboard, does that make a difference ?
Hey, the metadata is on the Product!
so it's on product pr_1Jg2yTSGecfPsxmkDP0Q6jYN, not the price inside the product
Oh okay that makes sense, is there a way to get the metadata in the response with the plans api ?
How about retrieving that Product instead?
Will that include the price on the product ? because I need both
Ah I see
So you would need to retrieve the Plan first, get the Product id, then retrieve the Product
It's up to you to decide where to store that metadata really
If you can decide to store it to your plan object, then just re-register it on Plan then you will only need 1 call
Okay that could work, thanks.
Also there is something else I got a 500 - unknown error yesterday while trying to create a subscription form react-stripe elements. If I provide you the id can you please look into it ?
Sure
OKay just a sec
Here - req_hE6bFFgim259vw
This is what I got
It was on the payment intents api
Oh that was a timeout error. Sorry for the inconvenience, but you could just retry it