RecurCrypto API 路 Merchant documentation

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.

Quick start
  1. 1. Sign in to the dashboard with your merchant wallet.
  2. 2. Call POST /api/v1/auth/keys to generate your merchant API key.
  3. 3. Use that Bearer key to create plans, generate checkout links, and query subscriptions.
  4. 4. Configure webhooks so your product mirrors on-chain subscription activity.
Current deployment focus: Polygon + USDC. The chain is the contractual source of truth. The database is the integration and operational index.

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_xxxxxxxxxxxxxxxxxxxxxxxx

Keys are hashed in the database. When rotated, only the newly returned plaintext key should be kept by the merchant backend.

Why this API exists

Fast merchant integration

Create a plan, get a checkout URL, and connect your app to recurring wallet payments without building all billing primitives from scratch.

Operational clarity

The API exposes subscriptions and charge events in a SaaS-friendly shape while preserving on-chain identifiers for reconciliation.

Checkout links

A merchant can create a plan once and generate checkout links for pricing pages, onboarding flows, or upgrade prompts.

Webhook-ready model

Lifecycle updates can be pushed into your product so access control and entitlement sync do not depend on manual support work.

API endpoints

MethodPathPurpose
GET/api/v1/healthService health and documentation pointer.
GET/api/v1/auth/keysReturns merchant API key status for the signed-in dashboard session.
POST/api/v1/auth/keysCreates or rotates a merchant API key.
DELETE/api/v1/auth/keysRevokes the current merchant API key.
GET/api/v1/plansList merchant plans.
POST/api/v1/plansCreate a plan and provision it on-chain.
POST/api/v1/checkoutsGenerate a checkout link for a plan.
GET/api/v1/subscriptionsList merchant subscriptions.
GET/api/v1/subscriptions/{id}Read one subscription with its ledger.
GET/api/v1/eventsList 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.