🛠️
Integration Guide
  • 🔎Overview
    • 👋Welcome to XGateway
      • Integrate with XGateway
      • Supported currencies
      • KYC
  • ⚙️Integration Guides
    • Crypto Payments using Checkout
    • SEPA Secure payments using Checkout
    • Alternative Payment Methods using Checkout
    • Crypto Payments using API
    • Advanced features of Invoice creation
  • ❔Miscellaneous
    • Keys and authentication
    • Check transaction status
    • Environments
    • Invoice currencies
    • Deposit data confirmation
    • Callbacks
      • Transaction callback
      • Bank Account callback
      • KYC callback
    • Withdrawal initiation with API
    • Disputes resolution
  • 💱Payment flows
    • Transaction flowchart
    • KYC checks diagram
    • Confirmation subprocess
    • User flow for Crypto Payments
    • User flow for SEPA Secure
    • Fees structure
      • Adjustable BTC Minimum Deposit Fee Framework
  • 🏤Back office
Powered by GitBook
On this page
  • Creating an invoice
  • Processing a callback
  • Limits
  • Confirming a transaction
  • Testing Crypto Payments on Demo environment
  1. Integration Guides

Crypto Payments using Checkout

PreviousIntegration GuidesNextSEPA Secure payments using Checkout

Last updated 3 days ago

Please read page before starting. The invoice creation API uses several parameters that need explanation.

XGateway supports deposits with preliminary creation of with a fixed exchange rate. This is the recommended integration form, which providers merchants with ready-made UI for deposits with crypto assets.

Creating an invoice

In order to create a Fixed Rate Invoice in the payment processing system, you need to make a POST request to the Invoice API endpoint.

The XGateway provides one , which automatically defines a corresponding payment method based on the input parameters provided by the merchant. Below is an example of a payload that contains the minimum fields set required to create an invoice for a Crypto Payment.

{
    "orderId": "test-prod-order",
    "customerId": "test-prod-customer",
    "baseCurrency": "USD",
    "amount": 10
}

The request returns a link to a correspondingly configured Checkout page. This page contains the wallet address for a deposit to be made. The page is used by a customer to finish the deposit.

By default, the payment gateway links the created wallet to a customer forever. The created wallet can be used across all EVM compatible chains.

Remember to authorise the request with your key using x-api-key header.

The default lifetime of an invoice is 15 minutes.

Processing a callback

When a customer makes a deposit using a cryptocurrency, XGateway detects the transaction and sends a deposit callback to the merchant. Below is an example of such a callback. For detailed information, please visit.

{
   "callbackType":"transaction",
   "amount":"200",
   "applicationId":null,
   "currency":"USDT",
   "customerId":"000394",
   "hash":"...",
   "id":"7e71d132-d80d-4140-8e60-9c89d0bd9eed",
   "invoiceId":"184e9933-1526-...-fe567091b5bd",
   "network":"tron",
   "orderId":null,
   "status":"confirmed",
   "transactionHash":"0x58f6",
   "type":"deposit",
   "info":{
      "exchangeRate":"1.03759",
      "referenceAmount":"207.52",
      "referenceCurrency":"USD",
      "referenceExchangeRate":"1.000065",
      "transactionAmount":"207.51518",
      "transactionCurrency":"tUSDT"
   },
   "fees":{
      "processing":"7.263031",
      "technical":null
   },
   "eur":"200.12",
   "usd":"207.52"
}

Limits

The invoice creation API validates the amount value.

An invoice will not be created, if the amount exceeds the limits.

Invoice limits
Currency
Min value
Max value

BNB

0.001000000000000000

None

BTC

0.000082000000000000

None

BSC USDT

5.000000000000000000

None

ETH

0.002000000000000000

None

Ethereum USDC

5.000000000000000000

None

Ethereum USDT

5.000000000000000000

None

FTN

2.000000000000000000

None

POL

12.000000000000000000

None

Polygon USDC

5.000000000000000000

None

TRX

25.000000000000000000

None

Tron USDC

5.000000000000000000

None

Tron USDT

5.000000000000000000

None

Confirming a transaction

Testing Crypto Payments on Demo environment

The best way to test the integration is to deposit native token on a test network. Proceed with the integration up to the point where the customer wallet is generated and returned to you. Make sure that deposits of ETH are enabled for your profile.

Send a portion of this ETH to the wallet, assigned to your customer.

Wait for the system to send you a callback about a successful deposit.

Due to security risks, merchants must use our to request transaction details. XGateway is not liable for issues caused by relying only on callback data.

To confirm the callback is valid, please use the .

You can test direct crypto deposits in the.

Use faucets, like one, to get some ETH on Sepolia test network.

⚙️
API endpoint
API endpoint
demo environment
this
this
API endpoint
this page
invoices