Payment Link
Payment link provide to You easy way to receive payment from the client.
On the payment link page the client can select availbale and simple, for him, option of payment and pay the transaction.
At this moment at payment link available next payment methods:
- Scan QR and pay by crypto wallet
- Pay by card
Preparation
Before you can start crate a payment link and accepting payments, you need to make settings and specify callback URL.
Creating crypto payment link
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 txId
from the merchant system.
You may not specify the currency code code
, the amount amount
and invoice type
Flows for using of payment link
Payment link to classic crypto invoice
The merchant creating invoice by API or at private area and share the link to payment. The merchant knows crypto currency and amount at the currency for transaction, and client cannot change it.
Example: Merchant wants to receive 50 USDT. See values in blockchain units in crypto settings
- Production
- Sandbox
POST https://api.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120229",
"code": [ "usdt" ],
"amount": "50000000"
}
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120229",
"code": [ "usdt" ],
"amount": "50000000"
}
Parametres
- txId - Unique transaction identifier of the merchant (platform)
- code - Code of invoice currency
- amount - Amount of transaction from merchant
Payment link to classic crypto invoice, but at USD
The merchant creating payment link at USD and indicate only one crypto currency for payment
Example: Merchant wants to receive 1000 USD at ETH only
- Production
- Sandbox
POST https://api.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120230",
"code": [ "eth" ],
"fiat": {
"amount": 1000,
"currency": "usd"
}
}
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120230",
"code": [ "eth" ],
"fiat": {
"amount": 1000,
"currency": "usd"
}
}
Parametres
- txId - Unique transaction identifier of the merchant (platform)
- code - Code of invoice currency
- Fiat amount - Amount of transaction at fiat currency
- Fiat currecny - Fiat currency for payment
Payment link to invoice at USD, with full list of crypto currencies
The merchant creating payment link at USD and don't indicate crypto currencies for payment.
Example: Merchant wants to receive 1000 USD at any currencies
- Production
- Sandbox
POST https://api.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120231",
"fiat": {
"amount": 1000,
"currency": "usd"
}
}
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120231",
"fiat": {
"amount": 1000,
"currency": "usd"
}
}
Parametres
- txId - Unique transaction identifier of the merchant (platform)
- Fiat amount - Amount of transaction at fiat currency
- Fiat currecny - Fiat currency for payment
Payment link to invoice without amount, with not full list of crypto currencies
The merchant creating payment link, but don't indicated amount (at crypto or fiat), and indicated list of crypto currencies, available for payment
Example: Merchant wants to receive some amount ( which client put at payment link form), at selected, from merchant's side, crypto currencies.
- Production
- Sandbox
POST https://api.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120232",
"code": [ "usdt", "eth", "btc", "usdt_trc20", "bnb", "zec" ]
}
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120232",
"code": [ "usdt", "eth", "btc", "usdt_trc20", "bnb", "zec" ]
}
Parametres
- txId - Unique transaction identifier of the merchant (platform)
- code - Code of available currencies on payment link
Payment link to invoice without amount, with full list of crypto currencies
The merchant creating payment link, but don't indicate amount (at crypto or fiat) and list of crypto currencies
Example: Merchant wants to receive some amount ( which client put at payment link form) at any currencies
- Production
- Sandbox
POST https://api.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120233"
}
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120233"
}
Parametres
- txId - Unique transaction identifier of the merchant (platform)
Payment link to invoice without amount with one crypto currency
The merchant creating payment link, but don't indicate amount (at crypto or fiat) and indicate receiving currency - BTC
Example: Merchant wants to receive some amount ( which client put at payment link form) at BTC
- Production
- Sandbox
POST https://api.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120234",
"code": [ "btc" ]
}
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120234",
"code": [ "btc" ]
}
Parametres
- txId - Unique transaction identifier of the merchant (platform)
- code - Code of invoice currency