> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/chord-oms/chord-oms-overview/payments/stripe-checkout.md).

# Stripe Checkout

This document will help you with understanding Stripe checkout

### Introduction

Chord uses Stripe's 1-step checkout. When a customer hits the Checkout button in the store after they place items in their cart, the store will redirect the customer’s browser to Stripe to complete checkout.

### Why are checkout totals in Stripe are higher than cart totals?

When the customer checks out in the store, the OMS does not have the billing/shipping address for the customer. Therefore, it cannot calculate the correct sales tax and shipping rates. Addresses are only collected during checkout in Stripe.

OMS implements a workflow to capture the correct shipping and tax amounts from the customer. When initiating a Stripe checkout session, the OMS:

1. Charges the highest possible shipping rate.
2. Charges the maximum tax rate (10%)

When checking out, customers may observe that the total in Stripe does not match the total in the store checkout. Tenants are advised to include appropriate text in their store checkout to inform users of the discrepancy.

When the checkout is complete, OMS receives the customer’s checkout information and addresses from the Stripe webhook. OMS then calculates the correct tax and shipping amounts and the difference/credit owed to the customer. OMS triggers a job to refund the difference to the customer.

### Embedded Checkout

Chord now allows for Stripe’s embed checkout. Simply provide a `STRIPE_EMBED_CHECKOUT = enabled` in the OMS store configuration and OMS will prepare a checkout session suitable for using Stripe’s embed checkout.

For more information, refer to Chord's [***Embedded Checkout documentation***](/chord-oms/chord-oms-overview/checkout/embedded-checkout.md)***.***

***

### Allowing carts for ad-hoc charges

Tenants can make additional charges on completed orders by attaching the customer's payment method to their Stripe account. By enabling `STRIPE_ALWAYS_OFF_SESSION` in the OMS, we inform Stripe that we wish to charge the customer's credit card as needed.

Technically, this is done by setting the [payment\_method\_options](https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card-setup_future_usage) when creating the `PaymentIntent`

```javascript
payment_method_options : {
	card: {
	  setup_future_usage: 'off_session'
	}
}
```

By default, customers that have a subscription item in their orders will always have this setting turned on because we will need to be able to charge their card once their subscription renews.

### Apple Pay

To display Apple Pay, the `STRIPE_ALWAYS_OFF_SESSION` environment variable in the OMS ***must be disabled***. Disabling this environment variable and activating this payment method in your Stripe dashboard *should* allow for this payment method to be present on checkout. To present Apple Pay, an apple pay-enabled browser (like Safari) on an apple pay-enabled device (like an iPhone) must be used.

Unfortuantely, there is currently a trade-off. ***Per a recent change from***\*\* *Apple Pay and Stripe*\*\*, Apple Pay does\*\* *not allow*\*\* for this method to be used as a recurring payment method (i.e. to be used for future use). Disabling this environment variable (which allows for this payment method to be active) will conflict with using any \*other \*payment methods (including Stripe credit card) for any additional ad-hoc charges after an order is completed.

***This means that Chord customers using Stripe checkout will have to decide whether to have Apple Pay be available as a payment method, knowing that this will prevent ad-hoc charges from being added, after the fact, to a completed order.***

Attempting to charge a customer after an order is completed, while `STRIPE_ALWAYS_OFF_SESSION` is *disabled* will result in this error:

`The provided PaymentMethod was previously used with a PaymentIntent without Customer attachment, shared with a connected account without Customer attachment, or was detached from a Customer. It may not be used again. To use a PaymentMethod multiple times, you must attach it to a Customer first.`

For example:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-0704e0d38b904bc51bf7d80cbcaefc8fa49e9e9f%2Fstripe-checkout-1.png?alt=media)

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-8bf8e884d11575a862b5939fa679fc29afeda41f%2Fstripe-checkout-2.png?alt=media)

{% hint style="success" %}
if you have any questions or need help, please reach out to us at <help@chord.co>
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/chord-oms/chord-oms-overview/payments/stripe-checkout.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
