Saving down details of a transaction

It is recommended you set up your database as outlined in the 'Checkout Sessions - Database Setup' section so that you can record details of transactions that are processed on your platform.

Video tutorial

The below video tutorial shows how you can save down the paymentIntent ID and paymentIntent Status associated with each transaction (relevant section is from: 35:50 to 43:25).

Instructions

You can save down the following details in the workflow where you're initially creating the Checkout Session:

Name
Notes

amount

returned from workflow action that creates Checkout Session

checkout session id

returned from workflow action that creates Checkout Session

seller account id

returned from workflow action that creates Checkout Session

Each of these values can be obtained directly after you create the Checkout Session and before you navigate to the webpage where the Checkout Session is being hosted - see sample workflow below:

The remaining values can be retrieved on the Success URL or Cancel URL page (or Return URL page if you're using embedded checkout sessions). These are the pages the customer is returned after either completing a transaction or cancelling a transaction.

Name
Notes

paymentIntent ID

retrieved on success/cancel URL page using 'Stripe Connect - Get Checkout Session Details' data call

paymentIntent Status

retrieved on success/cancel URL page using 'Stripe Connect - Get Payment Details' data call

If you're embedding a Checkout Session in a page of your app (rather than navigating to a Stripe hosted page), you will only have a 'Return URL'. See the 'Embedding Checkout Sessions in your app' section of the instructions for full details.

The Success URL and Cancel URL are defined when creating a Checkout Session. In order to set which transaction we're retrieving data for on the Success/Cancel URL pages, you can add the unique ID of the transaction created as a page URL parameter when creating the Checkout Session:

When the Success (or Cancel) URL page is loaded, we can then get the paymentIntent ID and paymentIntent Status on page load using two workflow actions:

  • We get the paymentIntent ID by using the 'Stripe Connect - Retrieve Checkout Session Details' data call and using

Note that we're using the unique ID of the transaction in the page URL to search for the relevant transaction to update:

  • We get the paymentIntent status by using the 'Stripe Connect - Get Payment Details' data call and using the paymentIntent ID saved down in the previous step

Last updated