> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trails.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe Onramp

> Let users fund a Trails intent with a card through Stripe

Stripe is a card funding provider: the user pays with a card and the funds land on the destination chain when the provider supports it, or as USDC
on Base (bridged by Trails) otherwise, and then route to the intent's destination like any other origin funds. It joins Meld as a card-category
provider, and sits alongside the Mesh exchange provider.

Requires `0xtrails@0.18.3` or later; destination-chain landing and the card provider picker arrive in `0xtrails@0.19.0`.

## Enable it

No SDK configuration is required — Stripe appears in the funding method list once the Trails API reports it as enabled for your project. Unlike the
Mesh exchange tile, it does not depend on the `onramp` prop.

Pass the `onramp.stripe` config only when you need the sandbox:

```tsx theme={null}
import { TrailsWidget } from '0xtrails'

<TrailsWidget
  apiKey="YOUR_TRAILS_API_KEY"
  onramp={{ stripe: { environment: 'sandbox' } }}
  renderInline
/>
```

| Field | Values | Default |
| - | - | - |
| `environment` | `"sandbox"`, `"production"` | `"production"` |

> [!NOTE]
>
> No Stripe key is ever passed to the SDK. Stripe credentials live in the Trails API configuration, and the browser receives only a publishable key.
> Contact the Trails team to have Stripe enabled for your project.

The tile renders only when the API reports Stripe as enabled for your project and country. Unlike the general onramp availability check, Stripe fails
closed: while availability is pending or errored the tile stays hidden rather than showing and failing later.

## Control its placement

The card category's identifier in `fundOptions.fundMethodsList` is `"cc-onramp"` (the old `"stripe-onramp"` alias was removed in `0xtrails@0.19.0`):

```tsx theme={null}
<TrailsWidget
  apiKey="YOUR_TRAILS_API_KEY"
  fundOptions={{
    fundMethodsList: ['connected-wallet', 'cc-onramp'],
    hideUnlistedFundMethods: true,
  }}
/>
```

From `0xtrails@0.19.0` the default order is connected wallet, card (Meld, `"cc-onramp"`), crypto transfer, then exchange (Mesh). Stripe has no
row of its own: the single **Credit or debit card** row opens a provider picker (titled "Pay by card") listing Stripe, Meld, or both — Stripe or
Meld is chosen automatically by country, with a chooser only when both are available. In pay mode the card option is Stripe-only.

Filter the provider list with `onramp.cardProviders`:

```tsx theme={null}
<TrailsWidget
  apiKey="YOUR_TRAILS_API_KEY"
  onramp={{ cardProviders: ['stripe'] }}
/>
```

`cardProviders` accepts `"stripe"` and `"meld"`. Omit it to offer every provider the deployment advertises; unknown values are ignored, and a
list with no known value behaves like no list. Because pay mode is Stripe-only, `['meld']` leaves no card option in pay mode.

In pay mode the payment method screen ignores `fundMethodsList` and `hideUnlistedFundMethods`; the card option shows there whenever it is enabled.

## Flow

1. The user picks **Credit or debit card** on the funding or payment method screen. If both card providers are available for their country, a
   picker titled **Pay by card** lists them.
2. They enter an amount (in pay mode the amount is fixed by the payment request); Trails resolves the landing token — the destination chain's
   token when the provider supports it, else USDC on Base — then quotes the purchase.
3. On submit, a popup opens, the intent is committed, and Trails creates a Stripe onramp session keyed to the intent.
4. The user completes the card payment in the popup while the widget monitors session status.
5. Funds arrive on the landing chain and the intent proceeds to its normal pending and receipt screens.

Stripe is available in fund, swap and pay modes.

## Restrictions

| Constraint | Value |
| - | - |
| Countries | United States and the 27 EU member states |
| Currency | USD only |
| Minimum | \$1.00 |
| Destination | Destination-chain token when the provider supports it, else USDC on Base |

Stripe enforces finer restrictions of its own at session creation — certain US states and per-asset rules — which surface as an unsupported-country
error during checkout rather than hiding the tile up front.

Below the \$1.00 minimum, production refuses to quote and the widget shows a minimum-amount message.

> [!WARNING]
>
> In sandbox, Stripe settles on **Base Sepolia** and always delivers a fixed **0.5 USDC** regardless of the amount quoted, and source amounts below
> \$1.00 are clamped up to \$1.00. Do not read sandbox delivery amounts as a test of production quoting.

## Compared with the other providers

| Provider | Category | How the user pays |
| - | - | - |
| Stripe | Card | Card payment, settles to the destination-chain token or USDC on Base |
| Meld | Card | Card payment through Meld's provider network |
| Mesh | Exchange | Withdraw from a linked exchange account |
