# Checkout Sessions & Payment Forms

### Stripe Checkout Sessions

The Stripe Connect - Marketplace plugin is built on top of Stripe's [Checkout product](https://stripe.com/gb/payments/checkout). Checkout is a pre-built payment form optimised for conversion (read more about it [here](https://stripe.com/docs/payments/checkout)). Each time a customer goes to purchase a good/service from a merchant on your marketplace, you will use the plugin to create a Checkout Session. The Checkout Session is a programmatic representation of what your customers see on the payment form.

Checkout Sessions can be hosted on a Stripe-hosted webpage or in your own app.&#x20;

{% hint style="info" %}
See the '[Embedding Checkout Sessions in your app](/stripe-connect-marketplace/implementing-key-features/embedding-payment-forms-in-your-app.md)' section of the documentation for instructions on how to embed Checkout Sessions in your app
{% endhint %}

In the example below, a customer is purchasing a pair of socks for €15. The Checkout Session is hosted on a Stripe webpage (see the URL: 'checkout.stripe.com').

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

The Stripe Connect - Marketplace plugin allows you to create Checkout Sessions for one-off purchases and for subscription products.

### Database setup

You will need to set your database up to process transactions. At a minimum, I recommend you create a custom data type called 'transaction' (or something similar) that has the following fields:

<table><thead><tr><th width="196">Field</th><th width="119">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>number</td><td>the total value of the transaction (in cents, or equivalent)</td></tr><tr><td>checkout session id</td><td>text</td><td>the unique ID Stripe gives to each checkout session</td></tr><tr><td>paymentIntent ID</td><td>text</td><td>a PaymentIntent guides you through the process of collecting a payment from your customer. The paymentIntent ID is the unique ID for each PaymentIntent created</td></tr><tr><td>paymentIntent Status</td><td>text</td><td>the status of each PaymentIntent. Can be used to track the status of transactions.</td></tr><tr><td>seller account id</td><td>text</td><td>the unique ID of the seller's Stripe account</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cranford-tech.gitbook.io/stripe-connect-marketplace/implementing-key-features/checkout-sessions-and-payment-forms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
