Create Checkout
- currencyType: stringrequired
The ISO 4217 currency code for this Checkout
- initiatorType: string
Reference requiredThis is used to implement idempotency. The supplied initiatorReference must be unique within a recent time window (default 24 hours). If a initiatorReference that was recently seen is used again then we will return the same request as was returned the first time but with the 'idempotent-previously-seen' header set to true. The initiatorReference is also copied into the Merchant Reference field of any transactions created by the checkout session.
- itemsType: array object[]required
A minimum of 1 item must be specified.
- amountType: integer
Centile min:1requiredA centile amount for the item in the currency specified for the checkout request.
- descriptionType: stringrequired
A textual description of the item being purchased.
- productType: string
Code max length:32Optional field to associate product code with the item. An example of when this could be useful is in an e-commerce usecase, here the specified product code will be returned in the events stream when the checkout is finalised, this will allow exact identification of Items to be shipped.
- quantityType: integermin:1
The number of the specified item.
- completionType: string
U R L max length:256This is an optional URL that can be provided by the merchant, it is the URL which the consumer can be re-directed to once a checkout seession is finalised. The re-direct can be configured on the Tola side to be automatic once the checkout is completed or can be confgured to be triggered by a click on a "Return To Merchant" button on the Tola Checkout Result page.
When redirected, Tola will append the query string argument ?checkoutReference={ref} so that you can identify the returning consumer. In parallel the merchant must ensure to make use of the Events API to check whether funds were transferred or not.Maximum length: 256 characters.
- customerType: string
Remark max length:48A string that we will present to the customer describing the checkout. This may appear in the PIN Prompt in the case of Mobile Money. It does not need to be unique. It is not supported by all payment suppliers. Due to the non-uniform support of this we recommend not relying on it. eg. "Order 55"
- merchantType: string
Consumer I D max length:48The merchant can provide a consumer identifier if known, this can be useful in providing a more personalised experience for the consumer during the checkout which will work across multiple devices for the consumer. When not included, Tola can use its own consumerID cookie to provide a personalised experience (if configured) however this will be tied to a single device.
- metadataType: object
A key value string pair object that a merchant can attach to the checkout. These are sometimes required where additional information needs to be supplied to Tola, or where you wish to store something into the Checkout session that is later accessible via the Events API.
Constraints
- Both the key and values need to be strings.
- The maximum number of key value pairs is 20.
- The maximum length of a key is 32 chars.
- The maximum length of a value is 64 chars.
If any of these conditions are violated an error code 13 ('Invalid Metadata') will be returned on the response. Example:
metadata: { "trackingRegion": "Kenya", "trackingId": "5" }- keyType: string
{
"currency": "KES",
"items": [
{
"description": "November Invoice",
"amountCentile": 100
}
],
"initiatorReference": "7XMOjzw5YJGKPOqm",
"completionURL": "https://merchantmock.example.com/transactionCompleted",
"customerRemark": "NovInvoice"
}