Create Checkout
Create a new checkout session.
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Idempotency-Key
Idempotency key to prevent duplicate checkout creation
Request
This endpoint expects an object.
amount
The final amount you would like to charge the customer, in cents. Including all the discounts and applicable taxes.
currency
The 3-letter currency code in ISO 4217 format. Currently we only support ZAR.
cancelUrl
The URL to redirect customers to when the checkout is cancelled.
successUrl
The URL to optionally redirect customers to when the checkout completes successfully.
failureUrl
The URL to optionally redirect customers to when the checkout does not complete successfully.
metadata
Used to record additional details about the checkout, often used to reconcile data with an external system.
totalDiscount
The total discount, in cents, is used for display only. It must already be included in the amount to collect.
totalTaxAmount
The total tax, in cents, is used for display only. It must already be included in the amount to collect.
subtotalAmount
The subtotal, in cents, is used for display only and represents the total value collected including taxes and excluding discounts.
lineItems
The line items are used for display only and provide additional details for the items purchased during checkout.
Response
This endpoint returns an object.
id
Unique identifier for the checkout session.
status
Current status of the checkout.
Allowed values:
amount
Amount to be charged in cents.
currency
Currency code for the transaction.
redirectUrl
URL to redirect the customer to complete payment.
paymentId
The ID of a successful payment.
successUrl
The URL to redirect customers to when the checkout completes successfully.
cancelUrl
The URL to redirect customers to when the checkout is cancelled.
failureUrl
The URL to redirect customers to when the checkout does not complete successfully.
metadata
Used to record additional details about the checkout, often used to reconcile data with an external system.
merchantId
The ID of the merchant that created the checkout.
totalDiscount
The total discount, in cents, is used for display only. It must already be included in the amount to collect.
totalTaxAmount
The total tax, in cents, is used for display only. It must already be included in the amount to collect.
subtotalAmount
The subtotal, in cents, is used for display only and represents the total value collected including taxes and excluding discounts.
lineItems
The line items are used for display only and provide additional details for the items purchased during checkout.
externalId
An optional ID that can be used to reconcile data with an external system.
processingMode
The mode in which the checkout is processed.
Allowed values: