#CryptoFidget Payment Intent

1 messages · Page 1 of 1 (latest)

lilac yoke
#

HI 👋

jade adder
#

hey Snufkin ^^

#

I am trying to update nested attributes in an intent

#

like the metadata

lilac yoke
jade adder
#

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?

lilac yoke
#

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.

jade adder
#

thank you!

#

so if I need multiple updates, I have to call the API multiple times?

#

I can not do it in one call?

lilac yoke
#

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

jade adder
#

{ amount: amount, metadata: {order_id: orderID }},

#

let me try this.

#

it worked! thank you very much ❤️