0% found this document useful (0 votes)
148 views24 pages

NACE Pay API Documentation

Uploaded by

罗纯碧
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views24 pages

NACE Pay API Documentation

Uploaded by

罗纯碧
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Rest API

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

Environments
The following environments are available -

Environment Base URL BTC


Blockchain

BTC Production https:/payapi.newagecrypto.com:5000/usr/wallet/btc/creat mainnet


e
BTC Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/btc/create testnet

BCH https:/payapi.newagecrypto.com:5000/usr/wallet/bch/crea mainnet


Production te
BCH Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/bch/create testnet

ETH Production https:/payapi.newagecrypto.com:5000/usr/wallet/eth/crea mainnet


te
ETH Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/eth/create ropsten

LTC Production https:/payapi.newagecrypto.com:5000/usr/wallet/ltc/creat mainnet


e
LTC Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/ltc/create testnet

DODGE https:/payapi.newagecrypto.com:5000/usr/wallet/doge/cr mainnet


Production eate
DOGE https:/api.digitalpaydev.com:5000/usr/wallet/doge/create testnet
Sandbox

USDT https:/payapi.newagecrypto.com:5000/usr/wallet/erc20/us mainnet


Production dt/create

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
USDT Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/erc20/usdt/cr ropsten
eate

XRP https:/payapi.newagecrypto.com:5000/usr/wallet/xrp/crea mainnet


Production te
XRP Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/xrp/create testnet

USDC https:/payapi.newagecrypto.com:5000/usr/wallet/erc20/us mainnet


Production dc/create
USDC Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/erc20/usdc/c ropsten
reate

USDT (TRC20) https:/payapi.newagecrypto.com:5000/usr/wallet/usdt_tro mainnet


Production n/create
USDT (TRC20) https:/api.digitalpaydev.com:5000/usr/wallet/usdt_tron/cre testnet
Sandbox ate

SOL Production https:/payapi.newagecrypto.com:5000/usr/wallet/sol/creat mainnet


e
SOL Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/sol/create testnet

BNB https:/payapi.newagecrypto.com:5000/usr/wallet/bnb/cre mainnet


Production ate
BNB Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/bnb/create ropsten

DASH https:/payapi.newagecrypto.com:5000/usr/wallet/dash/cre mainnet


Production ate
DASH Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/dash/create testnet

ADA Cardano https:/payapi.newagecrypto.com:5000/usr/wallet/ada/cre mainnet


Production ate
ADA Cardano https:/api.digitalpaydev.com:5000/usr/wallet/ada/create testnet
Sandbox

AVAX https:/payapi.newagecrypto.com:5000/usr/wallet/avax/cre mainnet


Avalanche ate
Production
AVAX https:/api.digitalpaydev.com:5000/usr/wallet/avax/create testnet
Avalanche
Sandbox

Polygon (Matic) https:/payapi.newagecrypto.com:5000/usr/wallet/matic_p mainnet


Production oly/create
Polygon (Matic) https:/api.digitalpaydev.com:5000/usr/wallet/matic_poly/c testnet
Sandbox reate
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
SHIB https:/payapi.newagecrypto.com:5000/usr/wallet/erc20/sh mainnet
Production ib/create
SHIB Sandbox https:/api.digitalpaydev.com:5000/usr/wallet/erc20/shib/cr ropsten
eate

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
pay.newagecrypto.com under Settings > API Keys section.

HMAC authentication 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 New Age Crypto
var secretkey = 'secret key'; / secret obtained from New Age Crypto
var timestamp = Math.floor(Date.now() / 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).

bodyString='ref_id=mk1231sa11&timestamp=1588364168&nonce=900288’

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
If the url and/or currency variables are being passed in the body, they must be added as
follows

bodyString='ref_id=mk1231sa11&url=https:/yourwebhookurl.com&timestamp=1588364168&n
once=900288&currency=USD’

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 New Age Crypto dashboard at pay.newagecrypto.com
or sandbox.digitalpaydev.com under Settings > section Account information section.

Receiving Transaction Payments

Create Payment Wallet Address

Post Create Wallet Address API

<asset> variable = btc, eth, bch

https:/payapi.newagecrypto.com:5000/usr/wallet/<asset>/create
https:/api.digitalpaydev.com:5000/usr/wallet/<asset>/create

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
"ref_id": "user unique reference/invoice id per client",
"url": "https:/yourwebhookurl.com", (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"
}

Or

{
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
"status": "error",
"message": " Could Not Create Address
"
}

New Age Crypto Payment Webhook Call Back Notification

Instant Payment Notifications (IPNs) are sent from New Age Crypto upon every confirmed
status change. IPNs are POSTed to your webhook URL specified in user New Age Crypto
dashboard. If the New Age Crypto 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, New Age Crypto 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:

New Age Crypto 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

Headers
signature CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(Body, secretkey));
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
Body

{"ref_id":"wm_123323",
"price":8550.26,
"amount":0.0006,
"total":5.13,
"date_time":"1588354319000",
"transaction_id":"c3c2920e4705cc37c57d0937576d6346c27ca81f2b9e507fd47a1de113b7bba
9",
"coin":"BTC",
"network":"testnet",
"currency":"USD",
"confirmation":"6",
"status":"Paid",
"fee":"0.2",
"source_address":" 0x3C965939Ca2d63962b4D0bdF84863262870eE198",
"type":"Payment" (Payment | Reused)

Get Transaction Status by Address


https:/payapi.newagecrypto.com:5000/usr/wallet/transactions
https:/api.digitalpaydev.com:5000/usr/wallet/transactions

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
RAW JSON BODY

"address": "bchtest:qpggts6de95hnutg8wrxx55mh9z2dnxp2v64tuqn73",
“all”:false, (optional true | false)
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response


{
"status": "success",
"data{
"date_time": "2022-08-02T17:45:15.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid", (Paid,Pending)
"payment_amount": 0.03,
"total_payment": 49.4,
"txid": "0x5c413b29ef14416a7d438110200d57f55358b36a69020b40f893b94a7bf0ee66",
"price": 1646.71,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
}
}

Example Successful Response if all = true


{
"status": "success",
"data":[
{
"date_time": "2022-08-02T17:48:53.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid", (Paid,Pending)
"payment_amount": 0.01,
"total_payment": 16.43,
"txid": "0xaf7fa880e032c9b301755ebde31c25695fbcb4912997ddc05c316ac1c72a6c42",
"price": 1642.91,
"currency": "USD",
"coin": "ETH",

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
},
{
"date_time": "2022-08-02T17:45:15.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid",
"payment_amount": 0.03,
"total_payment": 49.4,
"txid": "0x5c413b29ef14416a7d438110200d57f55358b36a69020b40f893b94a7bf0ee66",
"price": 1646.71,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
}
]

Get Transaction Status by tx


https:/payapi.newagecrypto.com:5000/usr/wallet/transactionsbytx
https:/api.digitalpaydev.com:5000/usr/wallet/transactionsbytx

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

"txid": "0bd4d3c2ab491649bc5c7328aba8d46b2c2c856ca5cd8261d489a7e01c2a5f12",,
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
“all”:false, (optional true | false)
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response


{
"status": "success",
"data{
"date_time": "2022-08-02T17:45:15.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid", (Paid,Pending)
"payment_amount": 0.03,
"total_payment": 49.4,
"txid": "0x5c413b29ef14416a7d438110200d57f55358b36a69020b40f893b94a7bf0ee66",
"price": 1646.71,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
}
}

Example Successful Response if all = true


{
"status": "success",
"data":[
{
"date_time": "2022-08-02T17:48:53.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid", (Paid,Pending)
"payment_amount": 0.01,
"total_payment": 16.43,
"txid": "0xaf7fa880e032c9b301755ebde31c25695fbcb4912997ddc05c316ac1c72a6c42",
"price": 1642.91,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
},
{
"date_time": "2022-08-02T17:45:15.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid",
"payment_amount": 0.03,

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
"total_payment": 49.4,
"txid": "0x5c413b29ef14416a7d438110200d57f55358b36a69020b40f893b94a7bf0ee66",
"price": 1646.71,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
}
]

Get Transaction Status by RefID


https:/payapi.newagecrypto.com:5000/usr/wallet/transactionsbyref
https:/api.digitalpaydev.com:5000/usr/wallet/transactionsbyref

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

"ref_id": "89012121-1212",
“all”:false, (optional true | false)
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response


{
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
"status": "success",
"data{
"date_time": "2022-08-02T17:45:15.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid", (Paid,Pending)
"payment_amount": 0.03,
"total_payment": 49.4,
"txid": "0x5c413b29ef14416a7d438110200d57f55358b36a69020b40f893b94a7bf0ee66",
"price": 1646.71,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
}
}

Example Successful Response if all = true


{
"status": "success",
"data":[
{
"date_time": "2022-08-02T17:48:53.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid", (Paid,Pending)
"payment_amount": 0.01,
"total_payment": 16.43,
"txid": "0xaf7fa880e032c9b301755ebde31c25695fbcb4912997ddc05c316ac1c72a6c42",
"price": 1642.91,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
},
{
"date_time": "2022-08-02T17:45:15.000Z",
"address": "0xEAF8C52666d55D763aF5865a0189922384a6aE02",
"status": "Paid",
"payment_amount": 0.03,
"total_payment": 49.4,
"txid": "0x5c413b29ef14416a7d438110200d57f55358b36a69020b40f893b94a7bf0ee66",
"price": 1646.71,
"currency": "USD",
"coin": "ETH",
"source_address": "0x3C965939Ca2d63962b4D0bdF84863262870eE198"
}
]

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
}

Get Wallet Addresses by RefID


https:/payapi.newagecrypto.com:5000/usr/wallet/addressbyref
https:/api.digitalpaydev.com:5000/usr/wallet/addressbyref

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

"ref_id": "89012121-1212",
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response


{
"status": "success",
"data": [
{
"address": "tb1qhc0fkupe0n50dcv4rkl545x7494grk9t2wyhmk",
"tag": "",
"coin": "BTC",
"date": "2022-08-25T14:34:26.263Z"
}
]
}

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
Get Current Price
https:/payapi.newagecrypto.com:5000/usr/price
https:/api.digitalpaydev.com:5000/usr/price

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

"coin": "BTC", (BTC,ETH,LTC,BCH)


"currency": "USD", (USD,CAD,EUR)
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response


{
"status": "success",
"data": {
"price": "11314.69",
"coin": "BTC",
"date_time": "2020-08-28 11:04:02.460",
"currency": "USD"
}
}

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
Create Invoice

Production: POST https:/payapi.newagecrypto.com:5000/usr/invoice/create


Sandbox: POST https:/api.digitalpaydev.com:5000/usr/invoice/create

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
"contact": {"email":"[email protected]",
"firstname":"first name",
"lastname":"last name",
"company":"company name",
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
"address":"address",
"city":"city",
"prov_state":"province or state",
"country":"country",
"postal_zip":"postal/zip code",
"phone":"phone"},
"ref_id":"your invoice ref number",
"items":[{"item":"product name","cost":"5","quantity":"2"}],
"total_amount":"10",
"currency":"USD", (USD|CAD|EUR)
"due_date":"2021-07-23",
"sendemail":false, (default true)
"url":"https:/yourwebhookurl", (not required)
"timestamp": 1627050940,
"nonce": 51487
}

Example string of above payload to HMAC


contact={"email":"[email protected]","firstname":"first name","lastname":"last
name","company":"company name","address":"address","city":"city","prov_state":"province or
state","country":"country","postal_zip":"postal/zip code","phone":"phone"}&
ref_id=your invoice ref number&items=[{"item":"product
name","cost":"5","quantity":"2"}]&total_amount=10&due_date=2021-07-
23&sendemail=false&url=https:/yourwebhookurl&timestamp=1627050940&nonce=51487

Success Response

{
"status": "success",
"data": {
"invoice_id": "1cc1fe7e-b37b-5247-a0cc-5dc4a6a004ebc",
"invoice_url": "https:/digitalpaydev.com/payinvoice/?inv=1cc1fe7e-b37b-5247-a0cc-
5dc4a6a004ebc",
"ref_id": "your invoice ref number"
}
}

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
Get Fees

Environment Base URL

Production https:/payapi.newagecrypto.com:5000/usr/fees
Sandbox https:/api.digitalpaydev.com:5000/usr/fees

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
"timestamp": 1627050940,
"nonce": 51487
}

Example string of above payload to HMAC


timestamp=1627050940&nonce=51487

Success Response

{
"status": "success",
"fees": {
"main": {
"feeprecent": 2,
"extrafee": 0
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
},
"erc": {
"feeprecent": 2,
"extrafee": 15
},
"eth": {
"feeprecent": 2.5,
"extrafee": 0
}
}
}

Get Transactions

Environment Base URL

Production https:/payapi.newagecrypto.com:5000/usr/transactions

Sandbox https:/api.digitalpaydev.com:5000/usr/transactions

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
"timestamp": 1627050940,
"nonce": 51487,
"startDate": ‘YYYY-MM-DD’
"endDate": ‘YYYY-MM-DD’
}

Example string of above payload to HMAC


timestamp=1627050940&nonce=51487& startDate=2022-06-01& endDate =2022-06-02

Success Response
{
"status": "success",
"data": [
{
"ref_id": "YourInvoiceId",
"date_time": "2022-06-03T13:51:44.000Z",
"address": "0x2C2c678ad144DA45616E9A676BFb7630e46E534e",
"tag": "",
"txid": "0xcc2a3181d4ff5926fe6b50d2e1884987bf52af432be17cbf7447b6d75a795fa7",
"price": 1789.78,
"payment_amount": 0.000558,
"total_payment": 1,
"coin": "ETH",
"status": "Paid",
"currency": "USD",
"settled_currency": "USD",
"settled_payment": ".975",
"settled_fee": 0.025,
"type": "Payment",
"note": ""
}]

Get Balances

Environment Base URL

Production https:/payapi.newagecrypto.com:5000/usr/balances
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
Sandbox https:/api.digitalpaydev.com:5000/usr/balances

Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response


{
"status": "success",
"data [ { coin: 'BTC',
blalance: 0
},
{ coin: 'BCH',
blalance: 0.000098
},]
}

Get Assets

Environment Base URL

Production https:/payapi.newagecrypto.com:5000/assets

Sandbox https:/api.digitalpaydev.com:5000/assets

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
RAW JSON BODY

{
"apps": “true” (optional field true (available on apps and API | false (available only through
the API)
}

Example Successful Response


{
"status": "success",
"data": [
{
"name": "Bitcoin",
"asset_id": "BTC",
"explorer_url": "https:/blockexplorer.one/btc/testnet/tx/",
"icon_url": "https:/sandbox.digitalpaydev.com/assets/icons/bitcoin.png"
},
{
"name": "Bitcoin Cash",
"asset_id": "BCH",
"explorer_url": "https:/blockexplorer.one/bch/testnet/tx/",
"icon_url": "https:/sandbox.digitalpaydev.com/assets/icons/bitcoincash.png"
}

]
}

Request Payment

Environment Base URL

Production https:/payapi.newagecrypto.com:5000/usr/request_payment

Sandbox https:/api.digitalpaydev.com:5000/usr/request_payment

Headers

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
"currency": “USD”, (options : USD | CAD | EUR | BTC | BCH | LTC | ETH | USDT | USDC |
DASH | XRP | SOL | USDT_TRON )
“type”:”Wire”, (only for USD | CAD | EUR options: Wire | ACH (USD only)| e-Transfer ( CAD
only)
"timestamp": 1550838976,
"nonce": 693795
}

Example Successful Response

{
"status": "success",
"data": {
"amount": 174.5547,
"fee": 20,
"currency": "USD",
"type": "Wire"
}
}

Settlement Payments

Environment Base URL

Production https:/payapi.newagecrypto.com:5000/usr/payments

Sandbox https:/api.digitalpaydev.com:5000/usr/payments

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8
Headers

apikey. 9c0c51ee6f3798e3aae63ea630ddd2b7265fe54f
(public key value)

merchant_id (Merchant id in Account Information)

authentication. (authentication value generated)

RAW JSON BODY

{
"timestamp": 1627050940,
"nonce": 51487,
"startDate": "YYYY-MM-DD", (optional (default all)– if used endDate must also be supplied)
"endDate": "YYYY-MM-DD", (optional (default all)– – if used startDate must also be supplied)

Example string of above payload to HMAC


timestamp=1627050940&nonce=51487& startDate=2022-06-01& endDate =2022-06-02

Success Response
{
"status": "success",
"data": [
{
"amount_paid": 3249.69,
"fee_amount": 82.53126,
"date": "2022-07-15T19:03:18.130Z",
"currency": "USD",
"payment_type_fee": 0,
"payment_type": "USDC",
"notes": "qwqwqwqwq"
},
{
"amount_paid": 3.99,
"fee_amount": 0,
"date": "2021-07-20T15:56:10.447Z",
"currency": "BTC",
"payment_type_fee": 0.01,
Copyright © 2022 Newagecrypto.com – [email protected]
Release: November 27th 2022 v.2.10.8
"payment_type": "BTC",
"notes": ""
}}

Copyright © 2022 Newagecrypto.com – [email protected]


Release: November 27th 2022 v.2.10.8

You might also like