Skip to main content
This guide shows the recommended flow: your checkout stays exactly as it is, and Revtain handles recovery when payments fail.
Your checkout doesn’t change. Customers continue to pay with whatever you already support. Revtain operates entirely behind the scenes — no UI changes, nothing customer-facing.

How It Works

1

Customer pays through your existing checkout

Stripe, Chargebee, custom — anything.
2

Payment succeeds → log it (optional)

Call /pulse so Revtain can calculate Lift accurately.
3

Payment fails → hand off to Revtain

Pass the gateway token, amount, and decline code.
4

Revtain runs the engine

Intelligent retries with prediction-driven timing directly against the gateway that issued the original token.
5

You receive a webhook with the result

recovery.success, recovery.failed, or recovery.blocked.

Backend: Charge, Then Recover

Custom / In-House Billing

For in-house billing without a webhook event, call Revtain directly from your payment failure handler:
The only requirement is that you have the customer’s payment token from your gateway. Everything else is the same regardless of billing platform.
Apple Pay / Google Pay / PayPal customers. Any gateway-native token works — including the pm_xxx tokens Stripe issues for Apple Pay and Google Pay charges. Pass the wallet identifier in paymentMethodType (apple_pay, google_pay, paypal, or venmo) so the recovery engine applies the right strategy. Recovery rates on wallet payments are materially higher when this field is set correctly — wallet tokens ride network tokens with built-in cryptograms, which the predictor weights accordingly.
Customers with more than one stored payment method. Pass any alternative tokens you hold in fallbackPaymentMethodTokens. If the primary payment method can’t be recovered, Revtain tries each fallback in order automatically — no orchestration code on your side. Common use: wallet primary + backup card-on-file. Up to 5 fallback tokens supported.

Optional: Pre-Screening Risky Payments

Before charging a payment, you can ask Revtain to score the risk of failure. This is most useful for high-value or first-time-in-a-billing-cycle charges where a wasted attempt can hurt your merchant standing.
Response:
You can also subscribe to the predict.risk.high webhook to receive automatic alerts for customers whose stored payment method has crossed a risk threshold. See Webhooks → predict.risk.high.
Need help? Contact the Revtain team at support@revtain.com for guidance on integrating with your specific billing platform.