Skip to main content
PATCH
Node.js

Authorizations

Authorization
string
header
required

A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...

Headers

Idempotency-Key
string

A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.

Path Parameters

storeId
string
required

The store's ID. A key reaches the store it was made in: GET /key answers which.

Body

application/json
cancelOn
boolean

Whether a buyer may cancel from their customer panel.

cancelMode
enum<string>

When a buyer's cancellation takes effect: when what was paid for runs out, or straight away.

Available options:
end,
now
undoOn
boolean

Whether a buyer may take a cancellation back before it takes effect.

pauseOn
boolean

Whether a buyer may pause from their customer panel.

pauseDays
integer

The longest a buyer may pause for, from 1 to 365 days.

Example:

30

pausesAYear
integer

How many times in a year a buyer may pause, from 1 to 12.

Example:

2

remindersOn
boolean

Whether the buyer is reminded before a renewal is due.

reminderDays
integer[]

How many days before it is due each reminder goes: up to 5, each from 1 to 30.

Example:
graceDays
integer

How long a renewal may go unpaid after the period runs out before the subscription ends, from 0 to 30 days.

Example:

3

revokeOn
boolean

Whether an ended or paused subscription's keys and files are hidden from its buyer.

autoOn
boolean

Whether a card paid with through Stripe, Authorize.net, Tagada, Mollie, MONEI, Adyen or Square, or through NMI where its Keep Cards for Subscriptions is on, is kept and each renewal charged to it by itself. Off, every renewal is paid by an emailed link.

cardChangeOn
boolean

Whether a renewal a buyer pays by its link with another card keeps that card, and a buyer whose card is kept through Stripe may give another on Stripe's own page.

chargeTries
integer

How many times a declined card is tried, one a day while the grace days last, from 1 to 5.

Example:

3

Response

It worked.

success
boolean
message
unknown
code
unknown
data
object
meta
object