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
Name | API code |
---|---|
Bitcoin | btc |
Ethereum | eth |
USDT (ERC20) | usdt |
USDC (ERC20) | usdc |
Tron | trx |
USDT (TRC20) | usdt_trc20 |
Litecoin | ltc |
Binance Coin | bnb |
USDT (BEP20) | bscusd |
FIAT
Name | API code |
---|---|
US dollar | USD |
EURO | EUR |
Argentine Peso | ARS |
Australian Dollar | AUD |
Brazilian real | BRL |
Indian Rupee | INR |
Indonesian Rupiah | IDR |
Kenyan Shilling | KES |
Malaysian Ringgit | MYR |
Mexican Peso | MXN |
New Zealand Dollar | NZD |
Nigerian Naira | NGN |
Philippine peso | PHP |
Thai Baht | THB |
Vietnamese Dong | VND |
Create PayLink
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 amount
, successURL
, failURL
- Production
- Sandbox
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"
}
POST https://api.sandbox.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 PayLinkhttps://plink.xamax.io/…
;
Callback
Example of callback
Examples with PayLink
PayLink in local currency
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
- Customer wants to buy some goods/services or top up the balance in merchant store;
- 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)
- Merchant send API request to XAMAX
- Production
- Sandbox
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"
}
POST https://api.sandbox.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 response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
- Merchant should will redirect the customer to the getting PayLink URL
link
, for continue of payment journey - The customer, on the PayLink, will choose available and useful payment method for payment
- The customer will follow to instructions on PayLink untill success payment
- XAMAX will send callback to Merchant side about success payment by transaction
PayLink with USD currency
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
- Customer wants to buy some goods/services or top up the balance in merchant store;
- 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)
- Merchant send API request to XAMAX
- Production
- Sandbox
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"
}
POST https://api.sandbox.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)
- XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
- Merchant should will redirect the customer to the getting PayLink URL
link
, for continue of payment journey - The customer, on the PayLink, will choose available and useful payment method for payment
- The customer will follow to instructions on PayLink untill success payment
- XAMAX will send callback to Merchant side about success payment by transaction
PayLink with crypto currency
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
- Customer wants to buy some goods/services or top up the balance in merchant store;
- 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)
- Merchant send API request to XAMAX
- Production
- Sandbox
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"
}
POST https://api.sandbox.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)
- XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
- Merchant should will redirect the customer to the getting PayLink URL
link
, for continue of payment journey - The customer, on the PayLink, will choose available and useful payment method for payment
- The customer will follow to instructions on PayLink untill success payment
- XAMAX will send callback to Merchant side about success payment by transaction
PayLink without amount and currency
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
- Customer wants to buy some goods/services or top up the balance in merchant store;
- Customer clicking on button Pay or TopUp in merchant’s store (dashboard)
- Merchant send API request to XAMAX
- Production
- Sandbox
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"
}
POST https://api.sandbox.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)
- XAMAX will return response with PayLink URL
{
"type": "link",
"value": {
"link": "https://api.xamax.io/fiat/ui/plink/eyJwYXltZW50TGlua0lkIjoiMTMwOTIwMjQyIiwibWVyY2hhbnRJZCI6M30"
}
}
- Merchant should will redirect the customer to the getting PayLink URL
link
, for continue of payment journey - 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;
- The customer will follow to instructions on PayLink untill success payment
- XAMAX will send callback to Merchant side about success payment by transaction