Merchant API
REST endpoints for merchant operations.
Merchant API
All merchant endpoints require a valid JWT with role: "merchant" in the
Authorization: Bearer <token> header.
Apps
Create an app
List apps
Get app details
Plans
Create a plan
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Plan display name |
description | string | No | Plan description |
amountBaseUnits | string | Yes | USDC amount (6 decimals). Min: 1000000 ($1.00) |
intervalSeconds | number | Yes | Billing interval in seconds |
List plans
API Keys
Create an API key
Returns the full API key once. Store it securely — it cannot be retrieved again.
List API keys
Returns key metadata (name, prefix, created date) but not the full key.
Revoke an API key
Webhooks
Create a webhook endpoint
Returns the webhook id and secret. The secret is used for HMAC signature
verification. Store it securely — it cannot be retrieved again.
Valid event names: subscription_created, payment_success, payment_failed,
cancel_requested, cancel_finalized, cancel_forced. An empty events array
subscribes to all events.
Limited to 1 webhook endpoint per app.
List webhook endpoints
Delete a webhook endpoint
Transactions
List app transactions
Returns payment history for all subscriptions under the app, including
amountGross, platformFee, amountNet, txSignature, and status.