# Stripe

Stripe is a global payments platform that provides APIs and tools for businesses to accept and manage online payments.

| Payment method | Recurring payments | Recurring retries | Delayed capture | Partial refunds |
| -------------- | ------------------ | ----------------- | --------------- | --------------- |
| Credit cards   | Yes                | Yes               | Yes             | Yes             |

## Stripe account setup

1. Create a [Stripe account](https://dashboard.stripe.com/register) if you don't already have one.
2. Obtain your API keys from the [Stripe Dashboard](https://dashboard.stripe.com/apikeys) under **Developers > API keys**.
3. Copy the **Secret key** (`sk_...`).

## Gateway profile setup

| Field                                                               | Required | Description                                                         |
| ------------------------------------------------------------------- | -------- | ------------------------------------------------------------------- |
| Integration                                                         | Yes      | Stripe                                                              |
| Environment                                                         | Yes      | Must match the mode of your Stripe API keys                         |
| Secret Key                                                          | Yes      | Secret key from the Stripe Dashboard (`sk_...`)                     |
| Send the statement descriptor suffix instead of the full descriptor | No       | Off by default. See [Statement descriptors](#statement-descriptors) |

## Statement descriptors

By default, ODUS sends the payment's statement descriptor to Stripe, and it replaces your Stripe account's descriptor on the statement.

Newer Stripe accounts accept only a suffix on card payments. With one of these accounts, Stripe rejects every card payment that sets a full statement descriptor. To fix this:

1. Set a shortened descriptor in your [Stripe business details](https://dashboard.stripe.com/settings/business-details).
2. Turn on **Send the statement descriptor suffix instead of the full descriptor** on the gateway profile (`useStatementDescriptorSuffix` in the API).
3. Give your products a statement descriptor suffix.

With the option on, the statement reads `PREFIX* SUFFIX`, and the whole line must fit in 22 characters. A payment without a suffix uses your Stripe account's descriptor; ODUS never sends the full descriptor in its place. [Statement descriptors](https://docs.odus.com/docs/guides/products/overview.md#statement-descriptors) explains both fields.

## Credential verification

When you create or update the gateway profile, ODUS verifies the **Secret Key** against Stripe before saving. If verification fails, the profile is not saved and an error is returned.
