Skip to main content
Use saved payment methods to charge customers automatically for subscriptions, renewals, or usage-based billing. The customer saves their card once using a Whop hosted or embedded flow, and you can charge it any time after.
Pair this guide with webhooks: listen for setup_intent.succeeded to confirm the save, then for payment.succeeded / payment.failed to track future charges.

Pick your save flow

Two paths, depending on whether the user is also paying right now. The rest of this page covers setup mode end-to-end, then shows how to charge a saved method later.

Save a payment method

1

Create a checkout configuration in setup mode

Create a checkout configuration without a plan to collect payment details without charging. Add metadata to be able to link the member and payment method to a customer in your system.
2

Direct the user to checkout

Use embedded checkout or redirect the user to save their payment method.
The saved payment method is on the onComplete result, so a virtual terminal can charge it right away instead of waiting for a webhook. Whop only completes the checkout once the method is stored, so payment_method_id is always set here in setup mode.
3

Handle completion

Listen for the setup_intent.succeeded webhook to get the payment method ID. The CheckoutConfiguration and its metadata will be included on the SetupIntent, which you can use to link the member and payment method to a customer in your system.
Keep the webhook even if you read payment_method_id from onComplete — it is the only path that survives a closed tab, and the one that fires for the redirect flow.
The example uses waitUntil from @vercel/functions to run the handler after responding 200. On other runtimes (Bun, Cloudflare Workers, Fastify, Hono) swap it for your framework’s equivalent background-task primitive or a job queue. See the webhooks guide for Python and Ruby handler equivalents.
The payment method is now saved and authorized for this member.

Charge a saved payment method

1

Get the payment method

List saved payment methods for a member or use the payment method ID from the setup intent in the previous step.
2

Create an off-session payment

Charge the payment method without customer interaction. The create payment endpoint returns a payment object immediately and processes the charge asynchronously.
To apply a discount, pass the ID of one of your promo codes as promo_code_id and Whop calculates the discounted price for you. The promo code must be active and valid for the plan, and the plan must belong to a product.
3

Handle payment events

Listen for payment webhooks to track success or failure.

Save during checkout

To save a payment method while processing a payment, add setupFutureUsage: "off_session" to the embedded checkout.
The payment method will be saved after successful payment.

Next steps

Accept payments

One-time and subscription checkouts to pair with your save flow.

Embedded checkout

Drop checkout into your own site without redirects.

Listen to webhooks

Track setup_intent.succeeded, payment.succeeded, and payment.failed.

Billing portal

Let customers manage and remove their saved payment methods.