> ## 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.

# Revtain API

> Recover failed payments. No checkout changes. Works with your existing payment stack.

Revtain is a payment recovery engine. When a charge fails on your gateway, Revtain runs intelligent retries with prediction-driven timing directly against the gateway that issued the original token. Your checkout doesn't change. Your customers don't see anything different. You receive a webhook when the payment is recovered.

These docs cover everything you need to integrate Revtain — whether you're using a supported billing platform (no code) or wiring it up to your own.

## Get Started

<CardGroup cols={2}>
  <Card title="Zero-Code Connectors" icon="plug" href="/guides/connectors">
    Using Chargebee, Recurly, Stripe Billing, Braintree, Zuora, or Shopify (ReCharge)? Paste one webhook URL. No code. 5 minutes.
  </Card>

  <Card title="API Integration" icon="code" href="/quickstart">
    Custom billing system or want full control? Recover your first payment in 60 seconds.
  </Card>
</CardGroup>

Revtain provisions your account for you — a hands-off step that typically completes the same business day. Once your credentials are issued, a connector integration is a single webhook URL paste; an API integration is one endpoint to call.

## Explore the Docs

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Your first recovery call in under a minute.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    API keys, webhook secrets, and rate limits.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/webhooks">
    Verify signatures and handle every event type.
  </Card>

  <Card title="API Reference" icon="terminal" href="/api-reference">
    Every endpoint, request, response, and error.
  </Card>

  <Card title="Decline Codes" icon="circle-info" href="/concepts/decline-codes">
    How Revtain handles each category of decline.
  </Card>

  <Card title="Supported Gateways" icon="network-wired" href="/concepts/supported-gateways">
    All 13 native payment-gateway integrations + 6 billing-platform connectors, with the token format and credentials each needs.
  </Card>

  <Card title="Developer Tools" icon="wrench" href="/guides/developer-tools">
    Free public APIs: BIN lookup, decline-code normalisation, full 500-code dictionary. No auth required.
  </Card>

  <Card title="Troubleshooting" icon="circle-question" href="/guides/troubleshooting">
    Common errors and how to fix them.
  </Card>
</CardGroup>

## How Revtain Fits Your Stack

Revtain sits behind your existing gateway. You keep your checkout, your tokens, and your billing system. When a payment fails, you pass the gateway token to Revtain — Revtain retries the same gateway with ML-optimised timing and returns the result. Tokens are gateway-native (e.g. Stripe `pm_xxx` retries on Stripe). Nothing about your checkout or PCI scope changes.

| You keep                                      | Revtain adds                                                              |
| --------------------------------------------- | ------------------------------------------------------------------------- |
| Your gateway, tokens, and checkout flow       | Intelligent retry timing on every failed charge                           |
| Your billing system and webhook patterns      | A single `recovery.success` / `recovery.failed` webhook per recovery      |
| Your PCI scope (no card data touches Revtain) | A card update page you can send customers when their card needs replacing |

## Base URL

```
https://api.revtain.com
```

Same URL for testing and production. Test mode is controlled by your gateway type — onboard with a test gateway (e.g., Stripe `sk_test_...`) for sandbox, live key for production.
