Create an order using a token

Create an order using a token. Both the token and the consumer who owns the token must be active.


Errors

In addition to the Errors applicable to all API endpoints, the following errors are specific to creating an order using a token:

status code error code description
404 token.not-found No token was found meeting the requirements. Make sure to use the right tokenId and API key. Objects in test mode can only be accessed using test keys and objects in live object with live keys.
400 token.invalid The token specified is not currently valid.
Body Params
number
required
≥ 0

The amount intended to be collected through this order. A positive integer in the smallest currency unit.

string
enum
Allowed:
string
required

Three-letter ISO currency code, in uppercase. Must be a supported currency.

customerInfo
object
required

Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have.

items
array of objects
required

The line items the customer ordered.

items*
metadata
object

Set of up to 20 key-value pairs that you can attach to the object.

string
length ≤ 40

A - ideally unique - string to reference the Order in your system (e.g. an order ID, etc.).

shippingInfo
object
required

Shipping Information

string
required

The unique identifier for the token to be used when creating this order.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json