Integration using Checkout Page
Last updated
Last updated
This form of integration allows you to get a head start on integration and saves you the trouble of building your own UI, generating user addresses for each currency and displaying them to the user.
XGateway supports two types of invoices: with a floating exchange rate and with a fixed exchange rate.
A fixed rate invoice locks exchange rate for the transfer of funds for several minutes (configurable). After this period the invoice is marked as experied.
In order to create a Fixed Rate invoice in the payment processing system, you need to make a POST
request to the Invoice API v2 endpoint.
To manage the display of currencies on checkout page — use displayCurrencies
parameter. When an array is provided, the function preserves and respects the specified order of the currencies. If parameter is not provided — checkout will show every enabled currency
Note, that baseCurrency parameter defines the expected currency of the deposit. It does not change or affect the reference currency - the currency used for all the internal accounting for you as a merchant.
The request may specify application (applicationId). This is an optional parameter used to customise the look and feel of the checkout page. Every application contains its own settings set to tailor the checkout page for different needs.
The customer identificator is a mandatory field, which must contain the id of the customer, used in your system. This id is sent back in the callbacks on every deposit in order to link deposits with corresponding customers.
The order identificator is an optional parameter, which will be sent back to your system with a callback for the deposit linked to this exact invoice.
Remember to authorize the request with your x-api-key
header.
x-api-key*
String
Your API key
Invoices at the moment of creation have no expiration time. After invoice activation on the checkout page (when the customer selects the payment currency and clicks "Proceed"), the system will set an expiration time according to invoice TTL. Once an invoice has expired, the link will show an error.
You can make several requests for the same customer with a different amount/base currency and get a different checkout link back.
The time to live for floating invoices is 24 hours.
The time to live for fixed invoices can be configured during merchant creation and can also be adjusted later in the Merchant's back office. The default value for the invoice TTL is 1200 seconds, which is equivalent to 20 minutes.
The KYC flow through the Checkout V2 supports pre-population of fields in case your service already has the personal data of the customers. This function is only available for banking onramp. In order to pre-populate the form add the information into the URL parameters (query parameters) when working with an invoice. See the example below.
Creates an invoice with fixed exchange rates strategy. The invoice is created based on the passed parameters: amount, base currency, customer id and order id (if any). Returns a checkout link.
Access to this endpoint requires a valid API key. The API key is sent in the x-api-key
header on requests.
/invoices
Represents all currencies in the payment processing system.
Used to specify the currency of accounts, exchange rates, and transactions in the payment processing system.
It provides a controlled and standardized list of supported currencies for all transactions and balances in the payment processing system.
New currencies can be added to the payment processing system as additional members.
BNB
, bUSDT
, BTC
, ETH
, eUSDC
, eUSDT
, FTN
, POL
, pUSDC
, SOL
, sUSDT
, tUSDC
, tUSDT
, wpUSDC
, wpUSDT
, EUR
, GBP
, AZN
, BDT
, INR
, JPY
, PKR
, RUB
, TRY
, UZS
, KES
, USD
, USDC
, USDT
, TRX
Represents the possible strategies of an invoice.
floating
, fixed