#CryptoFidget Payment Intent
1 messages · Page 1 of 1 (latest)
hey Snufkin ^^
I am trying to update nested attributes in an intent
like the metadata
Can you share a request ID for one of the failed attempts?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
sorry had to fight a bear! now I'm back.
🐻
error StripeInvalidRequestError: Received unknown parameter: orderId
const paymentIntent = await stripe.paymentIntents.update(
intentID, //'pi_1Fm4iVF5H7jp1uQlUbRge0Ss',
{ amount: amount, orderId: orderID },
async function(err: any, paymentIntent: any) {
// asynchronously called
await console.log("error", err);
await console.log("changed!!", paymentIntent);
if (err) {
await res.json({ status: "error", error: err });
} else {
await res.json({ status: "success", paymentIntent: paymentIntent });
}
}
);
I just want to add additionally data to the metadata of the intent
how do I do that?
I'm still not seeing any failed API request. Can you share a request ID? It'll help me understand the parameters you are trying to pass.
We have an example of how to do this here: https://stripe.com/docs/api/payment_intents/update?lang=node
What part of updating the metadata is causing you trouble?
thank you!
so if I need multiple updates, I have to call the API multiple times?
I can not do it in one call?
No, you can pass as many different fields as you need. The reason I keep asking for a request ID is so that I can see the shape of the parameters you are passing in.
If you are getting errors with your Update request the shape of the POST body data may be incorrect and I'd like to check