Create a checkout link

Discover how to create a checkout link in your preferred base currency and be paid in the target cryptocurrency supported by the Speed platform API (currently only SATS). You can create checkout links without coding (via the web application) or programmatically (via the checkout links API).

A complete end-to-end flow for creating checkout links is provided below.

Create checkout link via web application

Log in to your account and follow the steps below to create a checkout link.

  1. On the left sidebar, click Receive Payments > Checkout Links.
  2. Click Create new.
  3. After clicking the Create new button, you are redirected to a Create page. Fill out the required details.
  4. Click the create checkout link button. This will redirect you to the detail page, where you can see the checkout link you created and its details.
  5. Now, share it and get paid.

Create checkout link via API

Create a checkout link using the /checkout-links endpoint and basic details such as amount, currency, statement descriptor, success url and others. In this example below, we'll show you how you can create a checkout link for your customer on a purchase of 200 USD.

Make a POST /checkout-links request specifying the following mandatory parameters.

  • amount
  • currency
{
			"currency": "USD",
			"amount": 200,
}

You can also include other optional parameters, for example, statement descriptor. If optional parameters are not specified, then the payment page will be rendered without a description.

Request parameters

Provide these basic information outlined in the table below:

ParameterRequiredTypeDescription
AmountBigDecimalThis is the total amount you intend to collect from the customer via the checkout link. Please add a positive value. Values up to 32 digits can be handled by the amount param, which can have a decimal precision up to 16 digits.
CurrencyStringIn this parameter, you must specify your preferred base currency (fiat or cryptocurrency) to create a checkout link. A three-lettered ISO-compliant currency name must be used. You can choose one of the 167 available currencies.
Statement descriptorStringCustomers need this information because it describes the purpose of payment. Keep this text brief and to the point. On the checkout page, this description will be visible.
Success_url StringWhen the payment is successfully done, you can use this parameter to redirect the customer to your hosted page.
Success_messageStringWhen the payment is successfully done, you can use this parameter to thank them with a customized message. Success_url and success-message are mutually exclusive request parameters—only one of them can be used.
MetadataObjectYou can use this object to store additional information in key value pairs about the checkout link object in a structured format. You can add up to 50 key-value pairs in a raw JSON format.
CashbackObjectYou can use this parameter to associate an active cashback with a checkout link.

More information can be found in our API reference.

Request headers

ParameterRequiredTypeDescription
speed-versionstringAs of now, there are two versions (2022-04-15 and 2022-10-15). Version 2022-10-15 supports both on-chain and lightning payment methods. When passing payment methods through the API, the default settings in the Speed web application will be overridden.

Response attributes

Your 2022-10-15 response contains the following attributes:

{
  "id": "clink_test_lgaad2qlO3ZH9t5i",
  "payment_id": null,
  "object": "checkout.link",
  "livemode": false,
  "status": "active",
  "url": "https://checkout.tryspeed.dev/pay/cs_test_lgada2q04dHyoLdd",
  "currency": "SATS",
  "amount": 10,
  "target_currency": "SATS",
  "statement_descriptor": null,
  "success_url": null,
  "success_message": null,
  "metadata": {
    "key_1": "value_1",
    "key_2": "value_2"
  },
  "cashback": {
    "id": "cb_xxxxxxxxxxxxxxxxx"
  },
  "created": 1681115340765,
  "modified": 1681115340765
}
Attributes

id string
Unique identifier for the object.


object string
The type of the object indicates to which entity this response belongs.


livemode boolean
If the object is in live mode, it has the value true; otherwise, it has the value false.


status string
A checkout link can have 3 statuses as mentioned below.

  • unpaid
  • The checkout link is unpaid after its generation until it is paid.
  • paid
  • The checkout link is already used and paid for by your customer.
  • deactivated
  • You can manually deactivate the checkout link (if not paid already) when you don't intend to get paid via it.

url string
The public URL that can be shared with customers to receive payments.


amount BigDecimal
Total amount for which the checkout link was created. Values up to 32 digits can be handled by the amount param, which can have a decimal precision up to 16 digits.


currency string
Your preferred currency (base currency) in which you want to create checkout link.


target_currency string
The cryptocurrency in which you want to receive payment from your customer. As of now, Speed only supports SATS.


ttl integer
Represents the time duration until which the checkout link’s payment has not expired. (Specified in milliseconds)


statement_descriptor string
Additional information about a payment made to an account via this checkout link.


success_url string
If the payment is successful, the customer will be redirected to this URL.


success_message 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.


metadata object
You can use this to store additional information about the object in a structured format.


cashback object
You can use this parameter to associate an active cashback with a checkout link.

  • id string
  • Unique identifier for the cashback object.

created timestamp
Time at which the checkout link was created.


modified timestamp
Time at which the last modification was made.


Before you begin

If you are planning only to use the checkout link without any other API integration, most of the time you only need to:

Before you begin integrating the checkout link, make sure you have completed the steps outlined below.

What’s next?

Set up webhooks:

Test and go live:

  • We recommend testing each method before going live.