#ingeniousambivert-product

1 messages · Page 1 of 1 (latest)

undone tundra
pure marsh
#

Hey, let me try.
PS. thanks for responding

#

Hey @undone tundra it gives a 500 error, cannot expand property metadata

undone tundra
#

hmm? Can you provide the request id that returns 500?

pure marsh
#

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

undone tundra
#

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

pure marsh
#

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
undone tundra
#

Hmm that is the price price_1Jg2yUSGecfPsxmkP2Cogsaw, which has no metadata. The first code you provided is price_1Jgr982eZvKYlo2C1uwOZc90 which has metadata

pure marsh
#

price_1Jg2yUSGecfPsxmkP2Cogsaw - this has metadata

pure marsh
undone tundra
#

That's weird, let me look closer. At the first glance I don't see any metadata currently on that object

pure marsh
#

I added it after creating the product from the dashboard, does that make a difference ?

undone tundra
#

Hey, the metadata is on the Product!

#

so it's on product pr_1Jg2yTSGecfPsxmkDP0Q6jYN, not the price inside the product

pure marsh
#

Oh okay that makes sense, is there a way to get the metadata in the response with the plans api ?

undone tundra
#

How about retrieving that Product instead?

pure marsh
#

Will that include the price on the product ? because I need both

undone tundra
#

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

pure marsh
#

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 ?

undone tundra
#

Sure

pure marsh
#

OKay just a sec

#

Here - req_hE6bFFgim259vw

#

This is what I got

#

It was on the payment intents api

undone tundra
#

Oh that was a timeout error. Sorry for the inconvenience, but you could just retry it

pure marsh
#

Oh okay, no problem, thanks for the help.

#

I really appreciate it.