Vanilla Integration

Use these integration instructions to add ATLOS to a custom-built website or a website built on top of a CMS that does not have an ATLOS plugin. The integration is very simple. ATLOS can be added to your website with as few as only two lines of JavaScript!

First, if you haven't done so already, sign up to get your merchant ID and the API secret. You only need a web3 compatible wallet, such as Metamask, to sign up. Once you log in, find the merchant ID and the API secret under Settings.

After you get your merchant ID, follow the instructions below:

Step 1: import ATLOS script file

On your checkout page, add the line of code below before the </body> tag:

Step 2: add a payment button

Add a link or a button with the onclick attribute that opens the payment widget:

Substitute the placeholder text with:

merchantId your merchant ID
orderId Used to track the order. If you only sell one product, you can pass an empty string ''
orderAmount the order amount, e.g. 1234.56
orderCurrency (optional) the order currency, e.g. 'USD'
recurrence (optional) recurrence, omit or pass atlos.RECURRENCE_NONE for one-time payments
onSuccess (optional) a callback function to call when the payment is completed successfully
onCanceled (optional) a callback function to call when the payment widget is closed and the payment was not completed
theme (optional) light or dark theme, defaults to 'light'

The payment widget supports multiple languages. It detected the browser or the device default language and culture for numbers format automatically.

Live example:

Try it:

Optional: postback

You may set an optional postback (a.k.a. webhook) URL in Settings. Each time a payment transaction has at least one confirmation on blockchain, our system will send a POST request to that URL to notify your backend system of the successful payment.

The POST request will contain the following data in JSON format:

We also recommend that you check the authenticity of the postback message by verifying its HMAC-SHA256 signature. We sign each message using your API secret. You can view your API secret in Settings. We pass the HMAC signature in the Signature header of the POST request.

HMAC signature verification example in NodeJS:

Optional: get transactions API

Sometimes, your system my need to fetch all transactions or specific transactions in a given time range. This may be useful if your system was down for maintenance and needs to catch up with payments that were made while it was down. To get transactions, you may call the following endpoint:

Example input:

All fields are optional except for MerchantId. Make sure to pass your API secret in the ApiSecret header.

Example output:

How to view transactions

View the payments in the Payments section of the Merchant Panel. You may also verify all transaction data with the corresponding block explorers:

Ethereum Explorer

Binance Explorer

Polygon Explorer

Optimism Explorer

Arbitrum Explorer

We recommend using a separate wallet just for ATLOS transactions.

How to get help

Need integration support? Contact us at .