Skip to main content
POST
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
email
string
required

The buyer's email address.

Example:

"buyer@example.com"

gateways
string[]
required

The payment methods the buyer may pay with, by their names in the payment methods list. At least one the store has switched on.

Example:
items
object[]
required

What is being charged for, up to 50 lines. Each is a product from the catalogue (productId, variantId, quantity) or a line of your own (description, quantity, unitPrice).

name
string

The buyer's name, up to 120 characters. Printed on the invoice.

note
string

A note printed on the invoice, up to 1,000 characters.

dueDays
integer
default:7

How many days the buyer has to pay: 1 to 30.

send
boolean
default:true

Whether to email the invoice to the buyer now.

Response

It worked.

success
boolean
required

Whether the request did what was asked.

message
string | null
required

Words for a person. Empty when it worked.

code
string | null
required

Why it was refused, as a word that does not change. Empty when it worked.

data
any
required

The thing asked for: an object, or for a list its rows.

pages
integer

For a paged list: how many pages there are.

total
integer

For a paged list: how many rows there are in all.

meta
object

Anything else the route answers beside the thing itself.