XAMAX plugin without exchange
XAMAX provides you PHP plugin that you can use as HTML widget. You can add the XAMAX payment script to the website's html layout and accept payments without the need for integration using the API.
How to register?
- To register in the XAMAX Personal Account, go to: https://my.xamax.io
- On the page, under the login and password input fields, select Registration
- After successful registration and mail verification, you will be able to enter your personal account using the login and password that you specified during registration.
To register in the XAMAX sandbox, use the address https://my.sandbox.xamax.io if you plan to use a test environment with a test currency.
API KEY Release
In order to get an API KEY, you need to go through the following steps on the website https://my.xamax.io :
- Select the Integration section from the menu
- In the Integration section, go to the API KEY tab
- Press the + ADD API KEY button (You will be offered 3 API KEY options, 2 are responsible for only one action (either creating invoices or withdrawing), 1 is responsible for both actions (creating an invoice and withdrawing). In case you do not plan to automate the process of withdrawing crypto funds yet , then to speed up the process, choose API KEY FOR INVOICE ONLY)
- Press the GENERATE button
- Your unique API KEY will be generated. (it can not be distributed and sent to strangers)
For the release of the APIKEY sandbox (sandbox) - you need to repeat the steps on https://my.sandbox.xamax.io/
Setting the callback URL
For the correct operation of the system, it is necessary to Personal account XAMAX, in the Integrations - Callback section, set the following value in the Callback for crypto processing field and click the Save button:
https://link.xamax.io/callback
The same must be installed in sandbox personal account if you plan to use a test environment with a test currency
You need to provide the following information to connect:
- API KEY received in Settings;(Necessarily)
- Your SMTP server details for sending emails to you and your customers (optional)
- Host
- Port
- Username
- Password
- Your E-mail for order notifications (required)
- URL for redirect upon successful payment; (not necessary)
- URL for redirect in case of unsuccessful payment; (not necessary)
- Chat ID for Telegram ; (not necessary)
Connecting to an iFrame Page
Attach js file https://link.xamax.io/payment.min.js - connection example: (paste after opening <body>
tag)
<script type="text/javascript" src="https://link.xamax.io/payment.min.js"></script>
Make a request to an iFrame window with an object:
{
"merchant": {
"key": "merchant_key",
"redirect": {
"success": "https://site.com/congratulations?code_item=123123",
"fail": "https://site.com/error?code_item=123123",
}
},
"order": {
"name": "Test",
"amount": 599,
"descriptions": "Text for description",
"currency": "USD",
"text_after_confirm": "Text printing after confirm order", // text to display after order confirmation (page with QR-Code)
}
}
Example: To call the iFrame window, on the payment methods selection page, you need to add the XAMAX payment method and to the "Pay" button for this payment method.
<a href="javascript:iFrameXamaxPay({merchant: { key: 'merchant_key'}, 'order' : {'name' : 'Test', 'amount' : 599, 'currency' : 'USD'}});">Test 599 USD</a>
Page code example:
<!doctype html>
<html just="in">
<head>
<title>Test Page Xamax</title>
</head>
<body>
<script type="text/javascript" src="https://link.xamax.io/payment.min.js"></script>
<a href='javascript:iFrameXamaxPay({"merchant": {"key": "merchant_key"},"order": {“code_item”:123123, "name": "Test","amount": 599,"currency": "USD"}});'>Test pay 599 USD</a>
</body>
</html>
In the example the following parameters are sent:
Parameter | Description |
---|---|
key | received from us |
name | The name of the product/service for which the Client pays; (in the example above: Test)(mandatory field) - this will be displayed to the user on the link page. |
amount | the cost of the course to be paid; (in the example above: 599)(Mandatory) |
currency | exchange rate currency; (example: USD)(Mandatory) |
redirect.success | The URL to which the user will be redirected after successful payment |
redirect.fail | The URL to which the user will be redirected after an unsuccessful payment |
Supported fiat currencies
Supported currencies that we can convert to cryptocurrencies:
Currency code | Title |
---|---|
USD | US Dollar |
EUR | European Euro |
CNY | Chinese Yuan |
GBP | British Pound Sterling |
Supported cryptocurrencies
Currency code | Title |
---|---|
eth | Ethereum |
usdt (ERC-20) | Ethereum ERC-20 USDT |
btc | Bitcoin |
bch | Bitcoin Cash |
btg | Bitcoin Gold |
dash | Dash |
ltc | Litecoin |
qtum | Qtum |
zec | Zcash |
usdc (ERC-20) | TRON |
usdt (TRC-20) | TRON TRC-20 USDT |
User statuses
Currently, the system has the following user statuses:
Status | Description |
---|---|
Created | the transaction has been created, awaiting payment; |
Awaiting payment | a transaction is fixed in the blockchain; |
In progress | receiving confirmations in the blockchain; |
Successfully paid | the transaction was successfully paid; |
Payment has been expired | the transaction has expired, the payment has NOT been made (by default, the transaction lifetime is 30 minutes - can be extended); |
Payment has failed | the transaction was canceled by the client; |
Redirect to pages after successful or unsuccessful payment
After payment, the user is automatically redirected to the URL. There are two kinds of redirects, successful URL and unsuccessful URL.
- Successful payment made (redirect - success) - redirect to the URL of successful payment; (for example: "https://site.com/congratulations?code_item=123123");
- Payment NOT successful (redirect - fail) - redirect to the URL of unsuccessful payment; (for example: "fail": "https://site.com/error?code_item=123123")
<!doctype html>
<html just="in">
<head>
<title>Test Page Xamax redirect url</title>
</head>
<body>
<script type="text/javascript" src="https://link.xamax.io/payment.min.js"></script>
<a href='javascript:iFrameXamaxPay({"merchant": {"key": "merchant_key","redirect": {"success": "https://site.com/congratulations", "fail": "https://site.com/error"}},"order": {"name": "Test","amount": 599,"currency": "USD"} );'>Test pay 599 USD</a>
</body>
</html>
Notifications
Email Notification
After successful payment, an automatic email will be sent to:
- user, which he indicated in the form of payment;
- to the merchant (to you)
To set up outgoing mail, you need to send your manager the following data from the mail server from which it will be sent:
- SMTP server. Host
- SMTP server. Port
- SMTP server. Login
- SMTP server. Password
Email for notifications – a letter will be sent to this e-mail about successful payment by the Client;
Notifications in Telegram
You can use telegram bot @XamaxLinkBot
, to receive notifications of successful / unsuccessful payment from our system.
To do this, you need to give us your user/group id.
- Finding a bot
@username_to_id_bot
and running it. - in response you will receive a message like "P.S. Your ID: 661465180"
- After giving us the ID, we will find the bot@XamaxLinkBot and run it (this step is required to allow the bot to send you messages)
- After that bot will notify the user with the ID passed to us.
If you need to receive notifications in a chat for a group of people, you can create your own chat in which @XamaxLinkBot
must be an Administrator, with the ability to send messages.
Chat ID can also be found through the bot @username_to_id_bot
and send it to us.
Support cases
Payment failed:
- It is necessary to request from the client the tx hash of the transaction
- Verify transaction via:
- Ethereum/USDT(ERC-20)/USDC – etherscan.io
- Tron/USDT (TRC-20) – tronscan.org
- Other currencies – blockstream.info
- If there is a transaction, but the money has not been credited to the wallet, notify your manager
No notifications from payment:
- You need to go to your Personal Account on my.xamax.io and see if there is an incoming transaction in the Crypto Transactions section in the Complete status.
- If this transaction exists, then write to your manager;
- If this transaction does not exist, then it is necessary to request tx hash from the Client for verification;
How to test with test currency
Our test (sandbox) environment supported next currencies: Bitcoin, Litecoin, Bitcoin Cash, Ethereum, TRON, USDT (ERC-20), USDT (TRC-20), USDC (ERC-20), ZCASH, QTY
If You don’t have wallets at any currencies above, You can use:
- MetaMask (for ETH, USDT (ERC-20) and USDC (ERC-2))
- TronLink (for TRX, USDT(TRC-20))
- or You can use our documentation about test wallets or see below:
MetaMask:
- Install extension MetaMask (Google Chrome, Firefox) (if don’t have)
- Create account (or login into account)
- Select a network - Sepolia
- If You don’t see, check the switcher “Show test network” - should be ON
- At account click to “Import token” , paste token at filed “Token contract address”: 0x3bFE52C28219fd26Fda584fbc8c8e87f728a2073
- You successfully added an ETH token.
- For top up balance of wallet at ETH, open the link - https://sepoliafaucet.com/
- Paste Your wallet
- Click “Send me”
If You need USDT(ERC-20), please, contact us.
TronLink:
- Install extension TronLink (Google Chrome, Firefox) (if don’t have)
- Create account (or login into account)
- Select a network - Tron Nile Testnet
- If You don’t see, check the switcher “Show test network” - should be ON
- Click to plus (➕) and select USDT (TRC-20)
- You successfully added TRX token and USDT
- For top up balance of wallets open link https://testfaucet.bt.io/#/tron
- Select network - Nile Testnet
- Select token: TRX, USDT (TRC-20)
- Paste Your address from TronLink
- Click “Obtain”
How to pay at sandbox environment:
- You created invoice and You got invoice wallet and amount for payment;
- Open MetaMask/TronLink;
- Click to “Send” at extension;
- Input received wallets and amount;
- Click to “Pay”