> For the complete documentation index, see [llms.txt](https://cranford-tech.gitbook.io/stripe-connect-marketplace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cranford-tech.gitbook.io/stripe-connect-marketplace/implementing-key-features/saving-down-details-of-a-transaction.md).

# Saving down details of a transaction

It is recommended you set up your database as outlined in the '[Checkout Sessions - Database Setup](/stripe-connect-marketplace/implementing-key-features/checkout-sessions-and-payment-forms.md#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).

{% embed url="<https://youtu.be/rZxlvsIR1nw?t=2585>" %}

### Instructions

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

<table><thead><tr><th width="174">Name</th><th>Notes</th></tr></thead><tbody><tr><td>amount</td><td>returned from workflow action that creates Checkout Session</td></tr><tr><td>checkout session id</td><td>returned from workflow action that creates Checkout Session</td></tr><tr><td>seller account id</td><td>returned from workflow action that creates Checkout Session</td></tr></tbody></table>

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:

<figure><img src="/files/abhzsBLDDd71R68tokQl" alt=""><figcaption></figcaption></figure>

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](/stripe-connect-marketplace/implementing-key-features/embedding-payment-forms-in-your-app.md)). These are the pages the customer is returned after either completing a transaction or cancelling a transaction.

<table><thead><tr><th width="209">Name</th><th>Notes</th></tr></thead><tbody><tr><td>paymentIntent ID</td><td>retrieved on success/cancel URL page using 'Stripe Connect - Get <strong>Checkout Session</strong> Details' data call</td></tr><tr><td>paymentIntent Status</td><td>retrieved on success/cancel URL page using 'Stripe Connect - Get <strong>Payment</strong> Details' data call</td></tr></tbody></table>

{% hint style="info" %}
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](/stripe-connect-marketplace/implementing-key-features/embedding-payment-forms-in-your-app.md)' section of the instructions for full details.
{% endhint %}

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:

<figure><img src="/files/hshi32ApTddlyWhvs4pz" alt=""><figcaption></figcaption></figure>

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&#x20;

<figure><img src="/files/n6cDopYKcZ0fzzirMjDV" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/MK0Do13jNDTSdW5iIfSa" alt=""><figcaption></figcaption></figure>

* 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

<figure><img src="/files/4634XyjqyLAgTbfzFUYm" alt=""><figcaption></figcaption></figure>
