Skip to main content
POST
Create a charge
Creates a charge and returns a confirmationUrl. Redirect the merchant there. Nothing is charged until the store owner approves it. See Payments for the whole flow.

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
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 charge with this idempotencyKey already existed and is returned unchanged.

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 payment your app asked the merchant for. A subscription's payments are charges too, with subscriptionId set.