#Lyncor
1 messages · Page 1 of 1 (latest)
Um do you have the errored request id? req_xxx
req_l1sz2UCEuqf8Qz
That's from my attempt to use stripe.charges.update(destinationPaymentId, { description, metadata })
An alternative solution would be to set the description and metadata when the Destination Payment is created, but I haven't found a way to do that, as it happens automatically inside Stripe in response to confirming the Payment Intent.
@glossy marsh I updated the above with a bit more information. Any ideas?
Okie, so the Charge starting with py_xxx (your destinationPaymentId) belongs to the Connected Account, not your Platform account
so you can try Retrieve Charge API, but with the Stripe Account header
Is there a way to populate those fields on creation? Then I wouldn't need to update it after the fact.
I am afraid no at this moment
Could you please elaborate on what's involved in using the Charge API to update it?
Sure, follow this https://stripe.com/docs/connect/authentication#stripe-account-header
basically you need a second bracket {stripeAccount: '{{CONNECTED_ACCOUNT_ID}}'}
So that string will tell the API to perform the request as the connected account - okay, I'll give that a shot.
Yep, smth like this
const charge = await stripe.charges.retrieve(
'py_xxx',
{
stripeAccount: 'acct_xxx'
}
);
Ah so I can't just use the literal string '{{CONNECTED_ACCOUNT_ID}}'
That's just a placeholder