Payment Link
Payment link (payment link) is a universal tool that will allow the merchant to receive payment from the client using various methods.
Currently, the payment link supports the following payment options:
- Scanning QR to pay with cryptocurrency;
- Payment by credit or debit card;
- Payment using an electronic crypto wallet;
- Payment methods, as:
- UPI
- Debit/Credit card (except unsupported countries)
- SPEI
- Khipu
- VietQR
- PIX
- fastPay and etc
In the near future the following will be connected:
- SWAP
- P2P
- Binance Pay
- Stripe
and other familiar and convenient tools for the client and merchant
Scenarios for using a payment link
Below are the most popular uses of the XAMAX payment link, but the User can always customize this link for themselves.
- Offline store/gas station/any other place; (the cashier indicates the amount, and the client chooses how he will pay)
- Deposits in USD, with a payment method convenient for the client;
- Donations;
- Payment for online and offline courses
- and others;
How to create a payment link?
For the User there is onlyabout two sposboth create a payment link or:
- using API requests;
- through your personal account
API
To create specific links, it is necessary to specify various variations of the request, several options are listed below:
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
Merchant wants to receive 50 USDT
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120229",
"code": [ "usdt_trc20" ],
"amount": "50000000"
"urlRedirectSuccess": "https://YourUrlAddress",
"urlRedirectFail": "https://YourUrlAddress"
}
Payment link to classic crypto invoice, but at USD
The merchant creating payment link at USD and indicate only one crypto currency for payment
Merchant wants to receive 1000 USD at ETH only
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120230",
"code": [ "usdt_trc20" ],
"urlRedirectSuccess": "https://YourUrlAddress",
"urlRedirectFail": "https://YourUrlAddress",
"fiat": {
"amount": 1000,
"currency": "usd"
}
}
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
Merchant wants to receive 1000 USD at any currencies
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120231",
"urlRedirectSuccess": "https://YourUrlAddress",
"urlRedirectFail": "https://YourUrlAddress",
"fiat": {
"amount": 1000,
"currency": "usd"
}
}
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
Merchant wants to receive some amount ( which client put at payment link form), at selected, from merchant's side, crypto currencies.
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120232",
"urlRedirectSuccess": "https://YourUrlAddress",
"urlRedirectFail": "https://YourUrlAddress",
"code": ["usdt", "eth", "btc", "usdt_trc20", "bnb", "zec"]
}
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
Merchant wants to receive some amount ( which client put at payment link form) at any currencies
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120233"
"urlRedirectSuccess": "https://YourUrlAddress",
"urlRedirectFail": "https://YourUrlAddress"
}
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
Merchant wants to receive some amount ( which client put at payment link form) at BTC
POST https://api.sandbox.xamax.io/v1/payment-link HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"txId": "120234",
"urlRedirectSuccess": "https://YourUrlAddress",
"urlRedirectFail": "https://YourUrlAddress",
"code": ["btc"]
}
Personal Area
Go to the creation form
What data need to specify?
To successfully create a payment link, the User needs:
- Indicate the invoice number or payment link; (we suggest using the invoice number the same as the order number from the User in the CRM system; if there is no number, you can specify any unique value)
- Select the type of amount in the payment link;
- Fixed cost; (the merchant decides what currency and amount the client will pay)
- Client value; (the client himself will decide what currency and amount he will pay)
- Specify the amount that will be displayed on the payment link (if a fixed cost is selected)
- Select the currency in which the amount will be displayed in the payment link; (if fixed cost is selected)
- Select cryptocurrencies available for payment; (all are selected by default)
- Set the redirect URLs for payment link (Success and Fail);
- Click the “Create payment link” button
An example of a correctly completed form:
Payment by the client using a payment link
If the client received (via SMS, saw on the screen or in another way) this payment link for payment, then he can pay the amount indicated in it in any available way, which is displayed on the page.
To pay, the client must:
Open the received link on any device;
In the form that appears, select a convenient payment method
- If you chose Scan QR code, then either:
- Scan the code with your mobile device to open the desired application
- Copy the wallet address and amount to use your account, for example, in Binance;
- If you chose Payment by card, then indicate the card number and click Buy
- If you chose Scan QR code, then either:
Payment successfully made
After a successful payment, the User will see the following message and the payment will be successfully completed.
When do we use txhash?
In the scenario when a payment link was created, and a crypto invoice with the invoice type user was created using it, the payment link displays an additional required field for the client txHash
After successful payment, you must insert the received transaction hash into this field so that we can recognize the transaction and correctly display the confirmation screen for the client.
What does the merchant see when paying?
The user can track the status of their payment link in two ways
- through your personal account
- through receiving callbacks
Personal Area
To view the status of a payment link, the User goes to the list of all payment links and looks at the current status of the required payment link either in the list of all payment links or in the payment link card.
List of payment links:
Payment link card:
Receiving a callback
If the User specified a URL in the Callback (for crypto processing), then XAMAX will automatically send messages when the status of the invoice created using the payment link changes.
Example of a callback:
POST https://exmpale.com/callback HTTP/1.1
Content-Length: 397
Cache-Control: no-cache
Authorization Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjMxN2NkNjA3MmE1ZDgxYWQwMjlmOTYzMzc0MTMxNWM5ZDczNTZiNWM1NzM0YTE5YmE0MDQ5MmQ1ODY1MGY5ZGQiLCJzaWdfYWxnIjoicGtjczF2MTUiLCJ0eXAiOiJKV1QifQ.eyJib2R5X2hhc2giOiJlY2ZiNDBmMTFkNDBlOTRmYzViMzNlZDM2YTljYTM0MjcwOTkzM2Y3ZTFlMDhlNTUxNDNlZTc3MmJiNzg0NmFiIiwiYm9keV9oYXNoX21ldGhvZCI6InNoYTI1NiIsImlzcyI6InhhbWF4LmlvIiwic3ViIjoicHJvY2Vzc2luZyIsImF1ZCI6WyJib2JAZXhhbXBsZS5jb20iXSwiZXhwIjoxNzA5MDMzMjEyLCJuYmYiOjE3MDkwMzI5MTMsImlhdCI6MTcwOTAzMjkxMiwianRpIjoiOTMzMTI1ODgtNmZkMC00OTI4LWIxNjItOWExOWMxODQ5OGU0In0.j77ChxeVNVfPpB5xAM-6olQTA52I6klv_KEAIRgJaUrqOC3vaHEqHEwB06bcgdEtUJKTSoWD0Ce74nYaFdF8yt2kk5zaafnF7s2PExJWfxwEv4Frz3X2xJXYSB1XypSeEJNeaVyvcwzWQYmAUuClNV50UvTEJH8VBgjGC668Vrw6ZV6Zx6GA5gb2lOwdIC9damm_0L0V1g6ww2DHPq68ag4r6stYWwoELRFl9dHil2XyqjNpmHd2RTnObrNEXn_D-rv-eQCObay_HwjMWsXjBYOsICsTZcqsQJbjFdu91GL158qWM5-FOuy3aAKm3gWertfHNt37mbmrngYaYZ6h8w
X-Resource-Type: incoming-transaction
User-Agent: xamax.io callback/1
Content-Type: application/json
Accept-Encoding: gzip
{"txId":2027,"walletAddress":"TBMczkFmXEzfpmQEghqFiVtss2fqsqSfhL","status":"transaction_status_confirmed","expiredAt":"2024-02-15T09:59:08Z","amountRequired":"26001000","amount":"26001000","code":"usdt_trc20","txHash":"f501644a6597a3b04194ace5d7af7a1de4bfb30624de9b6b4a87938f5b1e0401","confirmations":45,"exchangeRate":{"currency":"usd","exchange_rate":1,"currency_amount":26,"code":"usdt_trc20"}}
Body:
{
"txId": 2027,
"walletAddress": "TBMczkFmXEzfpmQEghqFiVtss2fqsqSfhL",
"status": "transaction_status_confirmed",
"expiredAt": "2024-02-15T09:59:08Z",
"amountRequired": "26001000",
"amount": "26001000",
"code": "usdt_trc20",
"txHash": "f501644a6597a3b04194ace5d7af7a1de4bfb30624de9b6b4a87938f5b1e0401",
"confirmations": 45,
"exchangeRate": {
"currency": "usd",
"exchange_rate": 1,
"currency_amount": 26,
"code": "usdt_trc20"
}
}
How can pay the end user?
On the payment link the end user can select useful payment method.
Pay by QR code or wallet
Classic option, when the end user copy/scan wallet address and pay from external wallets
Pay by web3 wallet
Options, when the end user using extension of browser or mobile application, for connect and pay transaction
Pay by CARD
Option, when the end user can pay of transaction by FIAT (USD) currency, using Credit or Dedit card (VISA, Master Card ot Maestro)
Pay by SEPA
Option, when the end user can pay of transaction by FIAT (EUR) currency, using SEPA
Payment method is available, if IP address of end user located in EU countries
Pay by UPI
Option, when the end user can pay of transaction by FIAT (INR) currency, using UPI
Payment method is available, if IP address of end user located in India
Pay by SPEI
Option, when the end user can pay of transaction by FIAT (MXN) currency, using SPEI
Payment method is available, if IP address of end user located in Mexico
Pay by KHIPU
Option, when the end user can pay of transaction by FIAT (PEN or CLP) currency, using KHIPU
Payment method is available, if IP address of end user located in Peru or Chili
Pay by VietQR
Option, when the end user can pay of transaction by FIAT (VNM) currency, using VietQR
Payment method is available, if IP address of end user located in Vietnam
Pay by PIX
Option, when the end user can pay of transaction by FIAT (BRL) currency, using PIX
Payment method is available, if IP address of end user located in Brazil
Pay by Paloma
Option, when the end user can pay of transaction by FIAT (COP) currency, using Paloma
Payment method is available, if IP address of end user located in Columbia
Pay by fastPay
Option, when the end user can pay of transaction by FIAT (TRY) currency, using fastPay
Payment method is available, if IP address of end user located in Turkey
In the nearest future will be adding more of useful and safety methods for payment