Skip to main content
POST
Create a subscription
Creates a subscription and returns a confirmationUrl. Renewals are taken from the wallet the merchant picks. See Payments.

Authorizations

Authorization
string
header
required

Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side, never send a shop id.

Body

application/json
name
string
required

What the merchant sees, for example Pro plan.

Maximum string length: 120
amount
number
required

Price in currency, two decimals at most. USD 1 to 1000, NGN 500 to 1,500,000.

currency
enum<string>
required
Available options:
USD,
NGN
interval
enum<string>
required
Available options:
month,
year
description
string
Maximum string length: 500
returnUrl
string

Where the merchant goes after approving or declining. Must be on your app URL's origin or one of your redirect URIs.

idempotencyKey
string

Send the same key on a retry and you get the same charge back with 200 instead of a duplicate.

Maximum string length: 120
metadata
object

Up to 20 keys and 2 KB. Returned on every read.

Response

A subscription with this idempotencyKey already existed.

Standard Salesive response envelope. The operation-specific payload is carried in data.

status
integer
required

HTTP status code, echoed in the body.

success
boolean
required

Whether the request succeeded.

message
string
required

Human-readable result message.

data
object

A recurring charge. The merchant approves once and picks a wallet, then each period is taken from that wallet automatically.