Authorization
secretKey AuthorizationBearer <token>
Server-side sk_ key. Grants a subset of the merchant's permissions.
In: header
Path Parameters
id*string
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/subscriptions/string"{ "subscription": { "id": "string", "subscriber": { "customerId": "string", "name": "string", "email": "string" }, "description": "string", "amount": { "amount": "string", "asset": "string", "formatted": "string", "display": "string" }, "interval": "week", "state": "active", "billedCycles": 0, "daysUntilDue": 0, "anchorAt": "string", "nextBillingAt": "string", "createdAt": "string", "cancelledAt": "string" }, "cycles": [ { "id": "string", "merchantId": "string", "merchant": { "id": "string", "name": "string", "city": "string", "countryCode": "string", "categoryCode": "string" }, "number": "string", "sequence": 0, "state": "string", "buyer": { "name": "string", "email": "string", "taxId": "string", "address": "string" }, "currency": "string", "lines": [ { "productId": "string", "name": "string", "unitPrice": { "amount": "string", "asset": "string", "formatted": "string", "display": "string" }, "quantity": 0 } ], "total": { "amount": "string", "asset": "string", "formatted": "string", "display": "string" }, "notes": "string", "metadata": { "property1": "string", "property2": "string" }, "url": "string", "issuedAt": "string", "dueAt": "string", "voidedAt": "string", "createdAt": "string", "updatedAt": "string", "version": 0, "listed": true, "status": "string", "paid": { "amount": "string", "asset": "string", "formatted": "string", "display": "string" }, "outstanding": { "amount": "string", "asset": "string", "formatted": "string", "display": "string" } } ]}Create a subscription
Puts a customer on a recurring plan. Send-to-pay: every cycle Mayarin issues the subscriber an invoice and emails its pay link; they pay it on any rail. Payments on a cycle carry `metadata.subscriptionId` into the `payment.*` webhooks. The merchant's customer with the given email is reused, or created. Needs `catalog:manage`.
Pause a subscription
Stops billing. Nothing is billed while paused.