#itome_12582

1 messages · Page 1 of 1 (latest)

gilded shardBOT
tawdry coral
hexed echo
tawdry coral
#

Please refer to the guide that I share earlier.

hexed echo
#

Thank you! I'll check it.

hexed echo
#

@tawdry coral How can I retrieve associated charges object from checkout session object?

tawdry coral
#

checkout_session->payment_intent->latest_charge

hexed echo
#

Is it possible to expand nested object? or should I call multiple api call to retrive lastest_charge?

tawdry coral
hexed echo
#

Thank you. Can I expand object for return object of stripe.checkout.sessions.create api call? or I have to do another api call to retrive checkout session object?

tawdry coral
#

yes you can expand even in a create request.

#

However, the payment_intent is null when checkout session is created.

hexed echo
#

Yes, I got null for payment intent. When can I get paymentIntent?

tawdry coral
#

You'll get the paymentIntent once the checkout session is completed

hexed echo
#

OK, then I need to retrieve payment intent data when I get completed webhook, right?

tawdry coral
#

Yes you are right

hexed echo
#

How can I update payment description? I can't find api that can update payment object.

tawdry coral
hexed echo
#

is this correct?

  await stripe.paymentIntents.update(transfer.destination_payment as string, {
    description: params.description,
  });
tawdry coral
#

transfer.destination_payment is a charge, you should use charges API instead https://stripe.com/docs/api/charges/update#update_charge-description.

Also this charge is created on the connected account, You should specify a stripe_account in the request.

By specifying a stripe_account, you are telling Stripe that you want to make an API call on behalf of a connected account. You can refer to this doc to learn more about making API request for connected account (https://stripe.com/docs/connect/authentication)

Learn how to add the right information to your API calls so you can make calls for your connected accounts.