Create a checkout session

A checkout session represents your customer's session to pay. Each time your customer attempts to pay via the Speed platform, a new session is created. Once payment is paid in full with tolerance, the checkout session will be marked as paid.

Body Params
string
required
Defaults to USD

In this parameter, you must specify your preferred base currency (fiat or cryptocurrency) to create a checkout session. A three-lettered ISO-compliant currency name must be used.

double
required
Defaults to 200

The total amount that you intend to collect from your customers.

If you want your customer to pay the fixed amount that you have set, the amount value must be greater than zero and "type" does not need to be defined.
However, if you want your customer to decide how much to pay, you can either set the amount to 0 or you must designate the type as either "preset" or "options" and set values to it.

string
enum

This parameter allows you to specify the preferred payment method for customers. If you want your customer to choose what to pay then you need to set the type to either "preset" or "options".

Allowed:
preset
object

If you’ve set the "type=preset" you can specify a minimum and maximum payment amount for your customers in this field and then they'll pay only within this range.

options
array of strings

If you’ve set the "type=options" you must provide this field wherein you can offer your customers a selection of up to three payment amount options.

options
transfers
array of objects

Use this parameter to associate a transfer with payment.

transfers
customer_collections_status
object

Use this parameter if you wish to collect the below mentioned options from the customer.

custom_fields
array of objects

You can use this parameter to collect specific information from users while they are on payment page.

custom_fields
int32

Represents the time duration to which the checkout link session’s payment has not expired. (Specified in seconds). You can manually add the expiration time in seconds. The minimum time limit is 5 minutes, and maximum is 1 year. The default is set at 600 seconds for fiat currencies and 1 year for cryptocurrency. (SATS & BTC)

double
Defaults to 1

Please specify the tolerance in percentage that you would like to set for your checkout session when partial payments are made via on-chain, Ethereum or Tron. The default percentage for all Speed accounts is set at 1%, but you can specify a value between 0 and 5, with decimal precision of up to 2 digits. A checkout session will be marked as "PAID" once the payment received is greater than or equal to the due difference amount.

Due difference amount = checkout_session_amount - (checkout_session_amount * (amount_paid_tolerance*0.01))

string

You can use this parameter to add the header or title to your payment page.

string

You can use this parameter to provide a brief description of your payment page.

string

You can include a related image illustrating the purpose of a payment page along with the title and description. Image size must not be more than 2 MB.

json
Defaults to { "key_1": "value_1", "key_2": "value_2" }

You can use this to store additional information about the object in a structured format. In this parameter, you can add up to 50 key-value pairs in a raw JSON format.

cashback
object

Use this parameter to associate an active cashback with a checkout session.

string

When the payment is successful, you can use this parameter to redirect the customer to your hosted page.

string

When a payment is cancelled, you can use this parameter to redirect the customer to any page you want.

string

Message customers will see when they make payment via their wallet. Success_url and success-message are mutually exclusive request parameters—only one of them can be used.

Headers
string
enum
Defaults to 2022-04-15

In this parameter, you can specify the version you want. As of now, there are two versions (2022-04-15 and 2022-10-15). Version 2022-10-15 supports on-chain, lightning, Ethereum, Solana and Tron payment methods. Whereas the 2022-04-15 version only supports lightning payments.

Allowed:
Response

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

Questions? Contact us