Create a checkout session


A Checkout Session represents your customer's session as they use Smartpay Checkout to pay for orders or create a token.
The Checkout Session will contain a reference to the Order or Token once created. If your user completes their Smartpay checkout successfully, the Order or Token will be successful.

A Checkout Session needs to be created on your server using a private API key. To begin Smartpay checkout redirect the user to the url returned by the call

Errors

For possible error responses see Errors.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Create a checkout session for a standard order

number
required
≥ 0

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

string
required

The URL the customer will be redirected to if the Checkout Session hasn't completed successfully. This means the Checkout failed, or the customer decided to cancel it.

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.

string
length between 1 and 80

An arbitrary - ideally descriptive - long form explanation of the Order, meant to be displayed to the customer.

items
array of objects
required
length between 1 and 50

The line items the customer wishes to order. At least one product and at most 50 items.

items*
string
enum

Locale

Allowed:
metadata
object

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

string
length between 1 and 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 URL the customer will be redirected to if the Checkout Session completed successfully. This means the Checkout succeeded, i.e. the customer authorized the order.

Responses

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