v1

latestOpenAPI 3.1.02026-07-266133267.6 KB

Create Checkout Session

This lets you create a checkout session for your customer by generating a Tazapay hosted payment page.

post/v3/checkout

Request body

invoice_currencystring required

Invoice currency for the checkout session (in uppercase, iso-4217 standard). By default, the invoice currency is the holding currency for the transaction.

amountinteger required

Amount in cents. For example if you want to charge $10.12 pass 1012 as the value. For decimal handling for various currencies, refer to <a href="/API-Reference/appendix/Decimal-Currencies" target="_blank"> the guide here</a>

customerstring

ID of the customer for the checkout session

success_urlstring required

URL where the customer is directed to after a successful payment

cancel_urlstring required

The URL the customer will be directed to if they decide to cancel payment and return to your website.

payment_methodsstring[]

Specify the payment methods you want displayed for the session. If you do not specify, the default payment methods for the country are displayed to the customer

remove_payment_methodsstring[]

Specify the payment methods you want removed for the session

transaction_descriptionstring required

A short description to be displayed on the Tazapay hosted checkout screen

expires_atstring date-time

The time at which the checkout session is scheduled to expire. If expired using the expire api, this will contain the time that the checkout session expired at

transaction_documentsstring json

Supporting documents for the transaction

metadatastring json

Set of key-value pairs that can be attached to the object (JSON string format)

reference_idstring

Your unique identifier for the session

customer_fee_percentageinteger

An integer between 0 and 100. Percentage of processing fee to be paid by the customer. Tazapay will charge the customer an amount inclusive of the processing fee

session_idstring

Session ID retrieved from the <a href="/API-Reference/tazapay-api/javascript-sdk/integrate-with-risk-sdk"> risk SDK</a>

on_behalf_ofstring

ID of the entity on whose behalf the checkout session is being created. The entity must belong to the merchant account. Format: ent_*

Example request

{
  "metadata": "{\"key1\": \"value1\", \"key2\": \"value2\"}"
}

Response

200

statusstring

Indicates the status of the API response.

messagestring

Describes the result of the checkout session creation.