ALT 5 Pay  provides a standards-based REST interface which enables application developers to interact with their ALT 5 Pay merchant account. Using the ALT 5 Pay API, clients can create depositing wallet address to accept BTC, ETH and ALT 5 Stable coin for payment, real time digital asset to fiat rates and receive notification of payments received.


The following environments are available

Environment Base URL BTC Blockchain
BTC Production mainnet
BTC Sandbox testnet
BCH Production mainnet
BCH Sandbox testnet
ETH Production mainnet
ETH  Sandbox ropsten
LTC Production mainnet
LTC  Sandbox testnet

Getting Started

In order to use Trade API, user will have to go through few simple steps:

  1. API key
  2. HMAC authorization header

API key

To use API, user will need to obtain API Public key and Secret Key, which are passed to API with every request. API keys can be generated in your merchant dashboard at under Settings > API Keys section.

HMAC authorization header value

Once user obtained API key, it is all set up! Now, the only thing left is to form HMAC authorization header variable. In order to form this header, user will need following variables:

var apikey = ‘public key’; // key obtained from alt5pay

var secretkey = ‘secret key’; // secret obtained from alt5pay

var timestamp = Math.floor( / 1000); // timestamp in seconds

var nonce = Math.floor(Math.random() * Math.floor(1000000)); // random nonce integer


The last variable, which is needed is Parameters from body (JSON), String consists of ALL parameters from body separated by ‘&’ sign if more than one (for example: ‘ref_id=mk1231sa11&timestamp=1588364168&nonce=900288).




If the url and/or currency variables are being passed in the body, they must be added as follows


Finally, user has to put all of the variables together and encode them:

parameters from url and body

var hmacDigest = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(bodyString, secretkey));

var authentication = btoa(apikey + ‘:’ + hmacDigest);

That’s it! User can now use variable ‘authentication’ as header to communicate with trade API.

Merchant id to be used in the header *Required

A merchant Id is required to be passed in the header.

User Merchant ID can be found in user ALT 5 Pay dashboard at or under Settings > section Account information section.


Receiving Payments


Create Payment Wallet Address

Post Create Wallet Address API

<asset> variable = btc, eth, bch<asset>/create<asset>/create



apikey.                9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f

(public key value)

merchant_id       (Merchant id in Account Information)

authentication.    (authentication value generated)


{  “ref_id”: “user unique reference/invoice id per client”,

“url”: “”, (optional field, this will override the webhook url set in the API key options. )

“timestamp”: 1550838976,  “nonce”: 693795,“currency”:”USD” ( options USD,CAD,EUR. If field is not included USD is used by default. )} 

Example Successful Response


“status”: “success”,

“data”: {

“ref_id”: “cor121121”,

“price”: 8632.59,

“address”: “moep287CANJhZoyssrigoHtkMwBiz6uhDt”,

“coin”: “BTC”,

“expires”: “2020-05-04 14:32:46.480”




Example Failed  Response


“status”: “error”,

“message”: “Access Invalid”




“status”: “error”,

“message”: ” Could Not Create Address


ALT 5 Pay Payment Webhook Call Back Notification

Instant Payment Notifications (IPNs) are sent from ALT 5 Pay upon every confirmed status change.  IPNs are POSTed to your webhook URL specified in user ALT 5 Pay dashboard.  If the ALT 5 Pay gateway receives an HTTP/1.1 200 OK response from your server, the message is deemed to have been correctly delivered.

NOTE: This does not mean user application correctly handled the data – only that it was received successfully by user server!

If an HTTP error code is received by the gateway, ALT 5 Pay server will attempt to resend the IPN at increasing time intervals.

The amount of time between each re-post is as follows: 1 minute delay, 2 minute delay, 4 minute delay, 8 minute delay, 20  minute delay, 40  minute delay, 80 minute delay,  160 minute delay, 320 minute delay, 640 minute delay and 1,280 minute delay. The IPN system stops re-posting when:

ALT 5 Pay receives a basic HTTP “200 OK” response from your web server, or

when 1,280 minutes have passed since the initial post.

Note: This functionality applies to both Sandbox and Live accounts.

Webhook URL (IPN) Response


signature              CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(Body, secretkey));












Get Transaction Status



apikey.                9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f

(public key value)

merchant_id       (Merchant id in Account Information)

authentication.    (authentication value generated)


{“address”: “bchtest:qpggts6de95hnutg8wrxx55mh9z2dnxp2v64tuqn73”,

“timestamp”: 1550838976,  “nonce”: 693795}

Example Successful Response


“status”: “success”,

“data”: {

“date_time”: “2020-07-31T22:10:21.000Z”,

“address”: “bchtest:qpggts6de95hnutg8wrxx55mh9z2dnxp2v64tuqn73”,

“status”: “Paid”, (Paid,Pending)

“payment_amount”: 0.01655245,

“total_payment”: 6.54,

“txid”: “0bd4d3c2ab491649bc5c7328aba8d46b2c2c856ca5cd8261d489a7e01c2a5f12”,

“price”: 395.23,

“currency”: “CAD”,

“coin”: “BCH”