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

# Stripe Custom Payment Methods

> Add Pay with FSA/HSA to Stripe. Pick the page that matches how you charge.

Gale appears in your Stripe checkout as **Pay with FSA/HSA**. Gale charges the card on its hosted page. Save a restricted key on [Gale on Stripe](https://docs.withgale.com/custom-payment-methods/gale-on-stripe.md) so Gale can write that payment back to your Stripe account. Fulfill the order from `order.completed`.

## Pick your path

| How you charge | Follow |
| - | - |
| One payment, in a Payment Element you already run | [Stripe Payment Element](https://docs.withgale.com/custom-payment-methods/elements-payment-intent.md) |
| The same customer again, when your own system decides: refills, or renewals you schedule yourself | [Stripe Payment Element](https://docs.withgale.com/custom-payment-methods/elements-payment-intent.md), then [Saved Payment Methods](https://docs.withgale.com/integration/saved-payment-methods.md) |
| A subscription that lives in Stripe Billing, where Stripe raises an invoice for each cycle | [Stripe Billing Subscriptions](https://docs.withgale.com/custom-payment-methods/stripe-billing.md) |

## What every path shares

1. You create a custom payment method type in Stripe for Pay with FSA/HSA.
2. You save a restricted key on [Gale on Stripe](https://docs.withgale.com/custom-payment-methods/gale-on-stripe.md).
3. Your server creates a Gale checkout with `"metadata": {"payment_source": "stripe_elements_cpm"}` and sends the shopper to Gale's hosted page.
4. Gale charges the card and writes the payment to your Stripe account as a payment record.
5. You fulfill from the `order.completed` webhook.

The paths differ only in what happens after the first payment.

## One-time Payment Element

For a single charge in a Payment Element you already run.

> [card] [Stripe Payment Element](https://docs.withgale.com/custom-payment-methods/elements-payment-intent.md)
>
> Create the custom payment method, save the restricted key, and send the shopper to Gale's hosted page when they pick Pay with FSA/HSA.

## Charging the same card again

Your own system decides when to charge and how much. Gale keeps no schedule.

> [card] [Saved Payment Methods](https://docs.withgale.com/integration/saved-payment-methods.md)
>
> Store the card on the first checkout, then charge it by API for each refill or renewal. Each charge is written to your Stripe account.

## Stripe Billing

Stripe owns the subscription and raises an invoice for each cycle. Gale collects it.

> [card] [Stripe Billing Subscriptions](https://docs.withgale.com/custom-payment-methods/stripe-billing.md)
>
> The subscription stays in Stripe Billing. Gale collects each invoice and Stripe marks it paid.

## Subscriptions run by Gale

Gale keeps the plan and the schedule. Check with your Gale contact that this is enabled for your account before you build on it.

> [card] [Subscriptions](https://docs.withgale.com/subscriptions/overview)
>
> Billing for each cycle, the events that announce a cycle, and how to refund one.

## Checkout Sessions

For Stripe Checkout, not the Payment Element. Check with your Gale contact that this is enabled for your account before you build on it.

> [card] [Stripe Checkout](https://docs.withgale.com/custom-payment-methods/elements-checkout-session.md)
>
> Stripe calls Gale at the endpoint URL on the custom payment method. Leave that URL empty on the Payment Element path.

## Reference

> [card] [Gale on Stripe](https://docs.withgale.com/custom-payment-methods/gale-on-stripe.md)
>
> Where you save the restricted key. Payment Records read and write are required, or the page will not save.

> [card] [Create Checkout Session](https://docs.withgale.com/api-reference/endpoint/create-checkout-v2.md)
>
> `POST /api/v2/checkout`. The request every path starts with.

> [card] [Charge a Payment Method](https://docs.withgale.com/api-reference/endpoint/charge-payment-method.md)
>
> `POST /api/v2/payment-methods/{id}/charges`. Used for refills and renewals.

> [card] [Payment Method Object](https://docs.withgale.com/api-reference/objects/payment-method.md)
>
> The stored card you receive after a checkout that saves it.

> [card] [Order Object](https://docs.withgale.com/api-reference/objects/order.md)
>
> What `order.completed` carries, and your permanent record of a payment.

> [card] [Webhooks](https://docs.withgale.com/developer-manual/webhooks.md)
>
> How to verify `X-Gale-Signature`, and which events to subscribe to.

> [card] [Refunds](https://docs.withgale.com/api-reference/endpoint/create-refund.md)
>
> Refund with `POST /api/v2/refunds`. Stripe does not refund these charges.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.