Create Order

This is the first step in the on file grant purchase process. Use the token in the response to initiate the payment

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
requestIdstringRequiredformat: "uuid"<=64 characters
A unique identifier for the request, used for idempotency
grantIdstringRequired
ID of the grant used to create this order
amountobjectRequired
The total amount of the order
enrichmentsobjectRequired
Describes additional fields beyond core payment information.
consumerobjectOptional

The consumer data model is used for gathering essential user information. It captures details such as the individual’s first name, represented by givenNames, and their last name, captured under surname. In addition, it stores the user’s contact number under phoneNumber and their email address under email. These fields collectively provide indispensable contact and identification details for a user.

billingobjectOptional

This data model is used for storing an individual’s contact information. Mandatory fields such as name, line1, area1, region, postcode, and countryCode help in capturing vital information about a user’s location.

The line2 and area2 fields provide additional space for extended addresses, while phoneNumber can be used to store the user’s contact number.

Important Note

The area1, area2 and region properties feature localized terminology based on country. Refer to the property descriptions for insights on each country’s specific usage

shippingobjectOptional

This data model is used for storing an individual’s contact information. Mandatory fields such as name, line1, area1, region, postcode, and countryCode help in capturing vital information about a user’s location.

The line2 and area2 fields provide additional space for extended addresses, while phoneNumber can be used to store the user’s contact number.

Important Note

The area1, area2 and region properties feature localized terminology based on country. Refer to the property descriptions for insights on each country’s specific usage

itemslist of objectsOptional
discountslist of objectsOptional
merchantReferencestringOptional<=128 characters

The reference/order ID in the merchant’s system

shippingAmountobjectOptional
The shipping cost amount
taxAmountobjectOptional
The tax amount

Response

Created
tokenstring
expiresstringformat: "date-time"

Errors

415
Unsupported Media Type Error
422
Unprocessable Entity Error