#being-checkout-events

1 messages · Page 1 of 1 (latest)

quasi prairieBOT
somber surge
#

being-checkout-events

#

@cinder adder my advice is to only listen to checkout.session.completed and then use the API to look up the PaymentIntent and its underlying Charge and access the receipt_url property. Look at our Expand feature https://stripe.com/docs/expand to retrieve all the information in one API request after you get the Event

quasi prairieBOT
cinder adder
#

Thanks @somber surge @urban ember : So the single api call will be this ?

const session = await stripe.checkout.sessions.retrieve(
  '{{SESSION_ID}}',
  {
    expand: ['payment_intent.latest_charge'],
  }
);
urban ember
#

👋

#

Yep that looks good