#MandalorianIV
1 messages · Page 1 of 1 (latest)
Hi there!
Reposting your image in this thread:
Can you share the request ID (req_xxx)? You can find it here https://dashboard.stripe.com/test/logs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I want to send like order id etc. as far as I can see it is possible that passing data with metadata
If you look at the request you sent: https://dashboard.stripe.com/test/logs/req_U09mMkMiBpRFBl
You can see you are setting metadata: "{}" which is wrong.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
It should be something like metadata: { foo: "bar" }.
hmm
well normally I tried this one too
I can not assign metadata's value as another object
well normally I tried this one too
Did it work? What's the request ID?
this time I get syntax related errır
error
I can not make the request at all
In here I have two scenarios, first one, I can send as object with contenttype x-www-urlencoded,
or I can encode the data and send it as string
contenttype application/json
or I can encode the data and send it as string
Yes maybe you can try this withJSON.stringify(body)
req_pkvCrpY8a1mBwb?t=1683116782
stringify returns this one
it says amount is missing which is not
Yes this didn't work, the POST body is now empty: https://dashboard.stripe.com/test/logs/req_pkvCrpY8a1mBwb
That's because you can't set content-Type: application/json. Stripe API only works with form-urlencoded
Maybe you can try with metadata[order_id]: "12345" in your previous example?
yes that worked
so in order to passing data with metadata, I need to send it like metadata[order_id]: "order"
thanks for your great and quick solution
Happy to help 🙂