Pause a subscription
const url = 'https://pay.example.com/v1/subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pause';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pay.example.com/v1/subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pause \ --header 'Authorization: Bearer <token>'No charges while paused; paused periods are not charged later (subscription.paused with
previous_status). Any trialing, active, past_due or unpaid subscription can be paused. No request
body. Requires subscriptions:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A UUID (400 invalid_request, params.field: id, otherwise).
Responses
Section titled “Responses”The subscription (paused)
A subscription. API answers add checkout_url (and the change_plan answer plan_change); subscription
events (data of subscription.*) add the fields their type describes (see the properties marked
“Events:”).
object
false for a test subscription (created with a test key).
incomplete (link sent, nothing on chain) → trialing | active once the on-chain subscription is
confirmed → past_due after a failed charge (retried) → unpaid or canceled when the grace period runs
out; paused; canceled; completed after the last period.
API answers only: the subscription link (<public_url>/pay/sub/{id}).
The network paid on (null while incomplete).
The chain a record is on: its id (chain_id as well, unchanged), CAIP-2 identifier and family.
object
eip155:<id>, tron:0x2b6653dc, solana:<genesis hash prefix>.
Chain family: decides the address and transaction id forms, and the wallets that can pay.
Token symbol.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
Token base units.
Start of period 0 (after the trial).
0-based index of the last period charged.
Of the last failed charge: balance, allowance, or the revert reason.
payer (“my subscriptions”, an on-chain cancel by the payer, or a revoked allowance), merchant (this API
or the console), chain (canceled on chain by someone else), unpaid (the grace period ran out on a
cancel plan), plan_changed (the old subscription of an applied plan change), expired (the new
subscription of a change the payer did not confirm in time).
Resolved on the paid chain once the payer subscribes (empty while incomplete).
object
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
Token amount in base units (integer string; 1 USDC = “1000000”).
As given (null when none).
The subscription this one replaces (a plan change’s new subscription).
The subscription an applied plan change moved this one to (event subscription.replaced).
object
The subscription being replaced.
The new subscription’s first period starts (the old one’s next period boundary).
The new subscription’s link stays usable until then.
Why it was canceled: a newer change, the new subscription canceled, the old one ended.
Only in pending_plan_change of GET /v1/subscriptions/{id}: where the payer confirms (the new subscription’s link).
The change_plan answer, and events subscription.plan_change_pending / _expired / _canceled (on the old subscription): the change.
object
The subscription being replaced.
The new subscription’s first period starts (the old one’s next period boundary).
The new subscription’s link stays usable until then.
Why it was canceled: a newer change, the new subscription canceled, the old one ended.
Only in pending_plan_change of GET /v1/subscriptions/{id}: where the payer confirms (the new subscription’s link).
Events: subscription.charged and subscription.charged_after_cancel — {id, period_index, amount, tx_hash}; subscription.charge_failed, subscription.unpaid and a subscription.canceled caused by
the grace period — {id, period_index, error}.
object
Token amount in base units (integer string; 1 USDC = “1000000”).
balance, allowance, or the revert reason.
Events with a failed charge: the next attempt (null: none).
Event subscription.paused: the status before.
Events: subscription.plan_changed — the replaced subscription {id, plan_id, plan_name};
subscription.payment_method_changed — the previous method {chain_id, token, payer}.
object
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
Event subscription.payment_method_changed: the new method (token and chain_id are also the subscription’s own).
object
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
An account address in its chain family’s own form: EVM 0x + 40 hex digits (orders, subscriptions and
tickets give it in lowercase hex; the risk list EIP-55 checksummed), TRON Base58Check (T…, 34
characters), Solana Base58 (32 bytes, 32-44 characters). Requests accept any of the three.
Event subscription.migration_requested: the merchant replaced its quote signer key and asks the payer to
move the subscription to the new payment contract through “my subscriptions” (charges continue on the
old contract until then; tell the customer).
object
Events subscription.plan_changed and subscription.replaced: the boundary the new plan starts at.
Event subscription.canceled: subscription_ended (a plan change’s new subscription whose old one ended
first, with before_activation).
Event subscription.canceled: the subscription was canceled before its on-chain subscription was confirmed (it never got subscription.activated).
Event subscription.allowance_low: what the allowance leaves after the pending charge.
Event subscription.allowance_low: what the remaining periods need.
Example
{ "status": "incomplete", "chain": { "caip2": "eip155:8453", "family": "evm" }, "cancel_source": "payer", "splits": [ { "kind": "ratio" } ], "pending_plan_change": { "status": "pending", "source": "api", "reason": "superseded" }, "plan_change": { "status": "pending", "source": "api", "reason": "superseded" }, "migration": { "reason": "signer_rotated", "action": "switch_payment_method" }, "reason": "subscription_ended"}invalid_request: a malformed path parameter (params.field) or query string, or an invalid filter value (params.field).
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "invalid_request" }}unauthorized: no Authorization: Bearer header, or an unknown or revoked key.
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "unauthorized" }}insufficient_scope: the key lacks the operation’s scope.
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "insufficient_scope" }}not_found (params.what: order, subscription, entry): unknown, or another mode’s.
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "not_found" }}not_pausable: the subscription is incomplete, paused, canceled or completed.
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "not_pausable" }}