#Lyncor

1 messages · Page 1 of 1 (latest)

elder gazelleBOT
glossy marsh
#

Um do you have the errored request id? req_xxx

reef vector
#

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?

glossy marsh
#

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

reef vector
#

Is there a way to populate those fields on creation? Then I wouldn't need to update it after the fact.

glossy marsh
#

I am afraid no at this moment

reef vector
#

Could you please elaborate on what's involved in using the Charge API to update it?

glossy marsh
#

basically you need a second bracket {stripeAccount: '{{CONNECTED_ACCOUNT_ID}}'}

reef vector
#

So that string will tell the API to perform the request as the connected account - okay, I'll give that a shot.

glossy marsh
#

Yep, smth like this

const charge = await stripe.charges.retrieve(
  'py_xxx',
  {
    stripeAccount: 'acct_xxx'
  }
);
reef vector
#

Ah so I can't just use the literal string '{{CONNECTED_ACCOUNT_ID}}'

glossy marsh
#

That's just a placeholder

reef vector
#

That worked, thank you! I was able to use the destination field from the transfer object as the stripeAccount.

#

Yaaaay our product owner is going to be very happy. Cheers for the assistance.