Payment providers

Take payments through Stripe, PayPal, Waffo and Dodo Payments

Four providers share one order flow and one credit ledger. Switch on the ones you use, test them with your admin account, then open them to customers.

What each provider supports

This is what the adapters in the code implement today.

ProviderCredit packsRefundsSubscriptionsStop renewalRefund a billing period
StripeYesYesYesYesYes
PayPalYesYesYesYesYes
WaffoYesYesYesYesYes
Dodo PaymentsYesYesYesYesYes

Each provider has separate test and live connections. Source support is not a live check: verify your own accounts and products before you open live purchases.

From checkout to credits

Every provider goes through the same steps, so the ledger reads the same whichever one took the money.

  1. Snapshot the order

    Product, price, currency, provider and environment are saved on the server before the checkout opens.

  2. Verify the notification

    Webhooks are signature-checked and matched against the saved order.

  3. Apply each event once

    An event is stored before it is applied, so a repeated notification is recognised and ignored.

  4. Pay and grant together

    The payment and its credits are written in one atomic step.

  5. Never trust the return page

    Coming back from checkout is not proof of payment. The site checks the order with the provider from the server.

Three payment modes

The site-wide mode decides who can buy, separately from each provider’s test and live connection.

off
No new orders. Existing orders, renewals and refunds keep working.
admin_test
Only administrators can buy, through the test connection.
live
Customers buy for real. Administrators can still choose the test path.

Subscriptions on all four channels

Stripe, PayPal, Waffo and Dodo Payments support monthly and yearly plans. Map a plan and record its refund evidence before offering it for sale.

  • Renewals are booked from the provider’s own billing records, and late notifications are matched to the right period.
  • To change plan, the customer stops renewal and buys the new plan after the paid period ends.
  • A whole billing period can be refunded through the provider.

Add your own provider

Dodo Payments was added this way. The order flow, the ledger and refunds needed no changes.

  1. Write an adapter

    Implement the payment provider interface: checkout, notification parsing and refunds.

  2. Declare only what works

    List the subscription operations the adapter really implements. Anything else is refused.

  3. Register it

    Add it to modules/payments/registry.server.ts, together with where its keys and settings are read from.

Get the SaaScaffold source code

Buy once, then claim access to the private repository with your GitHub username.

BuySee the AI providers