Create a checkout
Creates a new cryptocurrency checkout page. This endpoint only allows JSON data.
Endpoint
POST https://api.sellgate.io/v1/checkout
Request body
Parameter | Type | Required | Description |
---|---|---|---|
title | string | No | The title of the checkout page max 60 chars. |
description | string | No | A brief description of the product or service max 300 chars. |
currency | string | No | The fiat currency code (e.g., USD, EUR, GBP) default is USD. |
price | number | Yes | The price in the specified fiat currency. |
crypto | array | Yes | The cryptocurrency to accept (e.g., BTC, ETH, USDT). |
webhook | string | No | URL to receive payment notifications on your server. |
return | string | No | URL to redirect the user after successful payment. |
threshold | number | No | Specify an allowed deviation from the price in percentages (1-50%). |
skip_error | boolean | No | Skip any errors related to the minimum value required for a cryptocurrency. Useful for dynamic pricing and accepting all possible cryptocurrencies. |
- A list of supported cryptocurrencies can be found here: Cryptocurrencies
- A list of supported currency codes can be found here: Currency codes
Example request
{
"title": "Premium Subscription",
"description": "1-year access to all premium features",
"currency": "USD",
"price": "99.99",
"crypto": [
{
"network": "ETH",
"coin": "ETH",
"address": "0xB1DA646D1cD015d205a99198e809724D5C78109d"
}
],
"webhook": "https://example.com/webhook",
"return": "https://example.com/thank-you",
"threshold": 10,
"skip_error": true
}
Example response
{
"url": "https://sellgate.io/pay/h6msaw9om7mkqus6h1h0h1e9",
"success": true,
"message": "Checkout created successfully."
}
Example code
curl -X POST 'https://api.sellgate.io/v1/checkout' \
-H 'Content-Type: application/json' \
-d '{
"title": "Premium Subscription",
"description": "1-year access to all premium features",
"currency": "USD",
"price": "99.99",
"crypto": [
{
"network": "ETH",
"coin": "ETH",
"address": "0xB1DA646D1cD015d205a99198e809724D5C78109d"
}
]
}'