/mandates
Generated from openapi.yaml. 5 operations.Download the specification.
POST/v1/mandates
Create a subscription mandate
Creates the on-chain plan and returns the mandate. Without `autoAuthorize` (production), the mandate is `pending` and includes `client_secret` for the browser checkout, where the payer authorizes autopay in their own wallet. `trialSeconds` defers the first auto-debit.
Requires your secret key as a bearer token.
Body
| Field | Type | Required | Description |
|---|---|---|---|
payer | string | yes | Payer wallet address |
payee | string | yes | Merchant wallet address |
mint | string | yes | SPL token mint (e.g. USDC) |
amountPerPeriod | string | yes | Atomic units |
periodSeconds | integer | yes | |
maxPeriods | integer | no | |
trialSeconds | integer | no | Free-trial length; first charge lands at trial end |
autoAuthorize | boolean | no | TEST MODE ONLY — simulate wallet authorization |
Responses
| Status | Description |
|---|---|
201 | The mandate (plus one-time `client_secret`). |
GET/v1/mandates/{id}
Retrieve a mandate
Requires your secret key as a bearer token.
Path and query parameters
| Name | In | Required | Description |
|---|---|---|---|
| no |
Responses
| Status | Description |
|---|---|
200 | The mandate. |
404 | Not found (or owned by another merchant) |
GET/v1/mandates/{id}/charges
List a mandate's charges
Requires your secret key as a bearer token.
Path and query parameters
| Name | In | Required | Description |
|---|---|---|---|
| no |
Responses
| Status | Description |
|---|---|
200 | Charge list. |
GET/v1/mandates/{id}/refunds
List a mandate's refunds
Requires your secret key as a bearer token.
Path and query parameters
| Name | In | Required | Description |
|---|---|---|---|
| no |
Responses
| Status | Description |
|---|---|
200 | Refund list. |
POST/v1/mandates/{id}/revoke
Cancel a subscription (merchant-side; stops future pulls)
Requires your secret key as a bearer token.
Path and query parameters
| Name | In | Required | Description |
|---|---|---|---|
| no |
Responses
| Status | Description |
|---|---|
200 | The revoked mandate. |