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.
| Provider | Credit packs | Refunds | Subscriptions | Stop renewal | Refund a billing period |
|---|---|---|---|---|---|
| Stripe | Yes | Yes | Yes | Yes | Yes |
| PayPal | Yes | Yes | Yes | Yes | Yes |
| Waffo | Yes | Yes | Yes | Yes | Yes |
| Dodo Payments | Yes | Yes | Yes | Yes | Yes |
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.
Snapshot the order
Product, price, currency, provider and environment are saved on the server before the checkout opens.
Verify the notification
Webhooks are signature-checked and matched against the saved order.
Apply each event once
An event is stored before it is applied, so a repeated notification is recognised and ignored.
Pay and grant together
The payment and its credits are written in one atomic step.
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.
Write an adapter
Implement the payment provider interface: checkout, notification parsing and refunds.
Declare only what works
List the subscription operations the adapter really implements. Anything else is refused.
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