Recurring payments API for crypto subscriptions
Use RecurCrypto as a recurring payments API for wallet-native subscriptions. Create plans, generate checkout links, read subscriptions, and sync lifecycle events into your product with a minimal merchant integration.
- 1. Sign in to the dashboard with your merchant wallet.
- 2. Call
POST /api/v1/auth/keysto generate your merchant API key. - 3. Use that Bearer key to create plans, generate checkout links, and query subscriptions.
- 4. Configure webhooks so your product mirrors on-chain subscription activity.
Authentication
API v1 uses a merchant-specific Bearer key. Generate it from a signed merchant dashboard session, store it securely on your backend, and send it in the Authorization header.
Authorization: Bearer rp_live_xxxxxxxxxxxxxxxxxxxxxxxxKeys are hashed in the database. When rotated, only the newly returned plaintext key should be kept by the merchant backend.
Why this API exists
Create a plan, get a checkout URL, and connect your app to recurring wallet payments without building all billing primitives from scratch.
The API exposes subscriptions and charge events in a SaaS-friendly shape while preserving on-chain identifiers for reconciliation.
A merchant can create a plan once and generate checkout links for pricing pages, onboarding flows, or upgrade prompts.
Lifecycle updates can be pushed into your product so access control and entitlement sync do not depend on manual support work.
API endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/health | Service health and documentation pointer. |
| GET | /api/v1/auth/keys | Returns merchant API key status for the signed-in dashboard session. |
| POST | /api/v1/auth/keys | Creates or rotates a merchant API key. |
| DELETE | /api/v1/auth/keys | Revokes the current merchant API key. |
| GET | /api/v1/plans | List merchant plans. |
| POST | /api/v1/plans | Create a plan and provision it on-chain. |
| POST | /api/v1/checkouts | Generate a checkout link for a plan. |
| GET | /api/v1/subscriptions | List merchant subscriptions. |
| GET | /api/v1/subscriptions/{id} | Read one subscription with its ledger. |
| GET | /api/v1/events | List lifecycle events and charge events exposed through API v1. |
Create a plan
POST /api/v1/plans
{
"name": "Pro",
"amount": "19.99",
"currency": "USDC",
"interval": "month"
}Generate a checkout link
POST /api/v1/checkouts
{
"planId": "plan_xxx",
"customerExternalId": "user_123"
}Webhooks and lifecycle
The API is designed to complement the existing webhook system. Use webhooks to update access, account state, or internal billing logs whenever subscription lifecycle events occur. Delivery attempts are persisted and can be retried safely.
- subscription.created
- subscription.charged
- subscription.payment_failed
- subscription.cancel_at_period_end_set
- subscription.cancelled
- subscription.ended
Important behavior
- Chain-first state: on-chain subscription state remains authoritative for contractual and payment truth.
- DB as index: the database accelerates dashboards, webhooks, support tooling, and reconciliation without inventing chain state.
- USDC deployment: this version documents the current Polygon USDC integration already used by the product.
- Merchant-safe links: checkout URLs include merchant code and plan slug, and optionally accept an external user identifier.
API links
Use the documentation page for human-readable guidance and the OpenAPI file for tooling, SDK generation, and internal backend integration.