Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.revtain.com/llms.txt

Use this file to discover all available pages before exploring further.

When dunningEnabled is set to true, Revtain sends a recovery.failed webhook to your system whenever the recovery engine exhausts all strategies. This is the default — one webhook, no spam.
Revtain does not send customer-facing emails or SMS. Dunning is webhook-only — your system handles customer communication on your domain, with your branding. This keeps you in control of the customer relationship.

How It Works

1

Recovery engine exhausts all gateways

Payment fails after primary + cascade attempts.
2

Your system receives a recovery.failed webhook

Includes full transaction details, decline code, strategy used.
3

Your system decides what to do

Flag the invoice, trigger your own dunning, generate a card update link, etc.
4

If the payment is later recovered

Manual retry, card update, or account updater — any pending dunning steps are cancelled automatically.

Opt-In Email/SMS Alerts (For You, Not Customers)

If you want Revtain to also notify you (the merchant) via email or SMS when recoveries fail, add those channels during onboarding:
{
  "notificationChannels": ["WEBHOOK", "EMAIL", "SMS"]
}
These alerts go to you, not your customer. They’re informational — “a $25.00 payment failed, consider reaching out to the customer.”
1

Receive recovery.failed webhook

From Revtain.
2

Generate a card update link

Call POST /api/recovery/update-card/generate to create a secure URL.
3

Send the URL to your customer

Via your own email/SMS system — your domain, your branding.
4

Customer updates their card

You receive a card.updated webhook.
5

Retry the payment

Call POST /api/recovery/execute with the new token.
This keeps you in control of the customer relationship. Revtain handles the recovery engine and provides the tools — you handle the customer communication.