Skip to main content

PayLink

PayLink provide to You easy way to receive payment from the customer

Customer can select available and comfortable for him, option of payment and pay the transaction on the payment link page.
At this moment at payment link available next payment methods:

  • Pay by local methods, like:
    • UPI
    • Virtual Account
    • Online Banking
    • and etc
  • Pay by card
  • Pay by crypto

PayLink can be created with amount and currency for payment, and without of it.
In case, if amount and currency don't provided, XAMAX return PayLink with opportunity put customer's amount and currency

Preparation

Before you can start create a PayLink and accepting payments, you need to make settings and specify callback URL.

Available currencies

XAMAX can accept on PayLink a lot of currencies, and FIAT and CRYPTO, and we all time work on increase the numbers

CRYPTO

NameAPI code
Bitcoinbtc
Ethereumeth
USDT (ERC20)usdt
USDC (ERC20)usdc
Trontrx
USDT (TRC20)usdt_trc20
Litecoinltc
Binance Coinbnb
USDT (BEP20)bscusd

FIAT

NameAPI code
US dollarUSD
EUROEUR
Argentine PesoARS
Australian DollarAUD
Brazilian realBRL
Indian RupeeINR
Indonesian RupiahIDR
Kenyan ShillingKES
Malaysian RinggitMYR
Mexican PesoMXN
New Zealand DollarNZD
Nigerian NairaNGN
Philippine pesoPHP
Thai BahtTHB
Vietnamese DongVND

API request

To create a payment link, you need to use the request /v1/payment_link (Production or Sandbox).
It is enough to specify the reference identifier payment_link_id from the merchant system. You may not specify the currency code currency, the amount amountsuccessURLfailURL

POST https://api.xamax.io/fiat/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"payment_link_id": "1",
"amount": 700,
"currency": "THB",
"success_url": "https://example.com",
"fail_url": "https://example.com",
"webhook_url": "https://example.com"
}
Parameters
  • payment_link_id ← Unique transaction identifier of the merchant (platform); (mandatory)
  • amount ← Amount of payment link from merchant; (optional)
  • currency ← Currency on payment link; (optional)
  • success_url ← URL address, where the customer to be redirected after success processing; (optional)
  • fail_url ← URL address, where the customer to be redirected after failed processing; (optional)
  • webhook_url ← URL address, where should be sended callback by transaction; (optional)

XAMAX will return, in response, the URL to PayLink, where need to redirect the customer for choose payment method and payment.

Response

{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
Parameters
  • type ← Type of PayLink;
  • value:link ← URL address of PayLink https://plink.xamax.io/…;

Callback

Example of callback

The merchant creating PayLink by API and share the link to payment. The merchant knows currency and amount at the currency and client cannot change it, only choose available payment method

  1. Customer wants to buy some goods/services or top up the balance in merchant store;
  2. Customer put amount, on merchant's side, which want to be paid or topped up and select currency, which it will be pay; (Example: 700 THB)
  3. Merchant send API request to XAMAX
POST https://api.xamax.io/fiat/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"payment_link_id": "1",
"amount": 700,
"currency": "THB",
"success_url": "https://example.com",
"fail_url": "https://example.com",
"webhook_url": "https://example.com"
}
Parameters
  • payment_link_id ← Unique transaction identifier of the merchant (platform); (mandatory)
  • amount ← Amount of payment link from merchant; (optional)
  • currency ← Currency on payment link; (optional)
  • success_url ← URL address, where the customer to be redirected after success processing; (optional)
  • fail_url ← URL address, where the customer to be redirected after failed processing; (optional)
  • webhook_url ← URL address, where should be sended callback by transaction; (optional)
  1. XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
  1. Merchant should will redirect the customer to the getting PayLink URL link, for continue of payment journey
  2. The customer, on the PayLink, will choose available and useful payment method for payment
  3. The customer will follow to instructions on PayLink untill success payment
  4. XAMAX will send callback to Merchant side about success payment by transaction

The merchant creating PayLink by API and share the link to payment. The merchant knows currency and amount at the USD currency and client cannot change it, only choose available payment method

  1. Customer wants to buy some goods/services or top up the balance in merchant store;
  2. Customer put amount, on merchant's side, which want to be paid or topped up and select currency, which it will be pay; (Example: 100 USD)
  3. Merchant send API request to XAMAX
POST https://api.xamax.io/fiat/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"payment_link_id": "1",
"amount": 100,
"currency": "USD",
"success_url": "https://example.com",
"fail_url": "https://example.com",
"webhook_url": "https://example.com"
}
Parameters
  • payment_link_id ← Unique transaction identifier of the merchant (platform); (mandatory)
  • amount ← Amount of payment link from merchant; (optional)
  • currency ← Currency on payment link; (optional)
  • success_url ← URL address, where the customer to be redirected after success processing; (optional)
  • fail_url ← URL address, where the customer to be redirected after failed processing; (optional)
  • webhook_url ← URL address, where should be sended callback by transaction; (optional)
  1. XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
  1. Merchant should will redirect the customer to the getting PayLink URL link, for continue of payment journey
  2. The customer, on the PayLink, will choose available and useful payment method for payment
  3. The customer will follow to instructions on PayLink untill success payment
  4. XAMAX will send callback to Merchant side about success payment by transaction

The merchant creating PayLink by API and share the link to payment. The merchant knows currency and amount at the crypto currency and client cannot change it, only choose available payment method

  1. Customer wants to buy some goods/services or top up the balance in merchant store;
  2. Customer put amount, on merchant's side, which want to be paid or topped up and select currency, which it will be pay; (Example: 1 BTC)
  3. Merchant send API request to XAMAX
POST https://api.xamax.io/fiat/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"payment_link_id": "1",
"amount": 1,
"currency": "BTC",
"success_url": "https://example.com",
"fail_url": "https://example.com",
"webhook_url": "https://example.com"
}
Parameters
  • payment_link_id ← Unique transaction identifier of the merchant (platform); (mandatory)
  • amount ← Amount of payment link from merchant; (optional)
  • currency ← Currency on payment link; (optional)
  • success_url ← URL address, where the customer to be redirected after success processing; (optional)
  • fail_url ← URL address, where the customer to be redirected after failed processing; (optional)
  • webhook_url ← URL address, where should be sended callback by transaction; (optional)
  1. XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
  1. Merchant should will redirect the customer to the getting PayLink URL link, for continue of payment journey
  2. The customer, on the PayLink, will choose available and useful payment method for payment
  3. The customer will follow to instructions on PayLink untill success payment
  4. XAMAX will send callback to Merchant side about success payment by transaction

The merchant creating PayLink by API and share the link to payment. The merchant don't knows about currency and amount. The customer will put amount and choose a currency and payment method

  1. Customer wants to buy some goods/services or top up the balance in merchant store;
  2. Customer clicking on button Pay or TopUp in merchant’s store (dashboard)
  3. Merchant send API request to XAMAX
POST https://api.xamax.io/fiat/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"payment_link_id": "1",
"success_url": "https://example.com",
"fail_url": "https://example.com",
"webhook_url": "https://example.com"
}
Parameters
  • payment_link_id ← Unique transaction identifier of the merchant (platform); (mandatory)
  • success_url ← URL address, where the customer to be redirected after success processing; (optional)
  • fail_url ← URL address, where the customer to be redirected after failed processing; (optional)
  • webhook_url ← URL address, where should be sended callback by transaction; (optional)
  1. XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
  1. Merchant should will redirect the customer to the getting PayLink URL link, for continue of payment journey
  2. The customer, on the PayLink, put amount, which want to be paid or topped up, select amount, which it will be use and choose payment method;
  3. The customer will follow to instructions on PayLink untill success payment
  4. XAMAX will send callback to Merchant side about success payment by transaction