API Documentation

Payment Gateway
NuxPay Payment Gateway allows you to receive payment with its automate callback feature. It notifies backend system when payment is received.

First, you have to setup NuxPay Payment Gateway in https://www.nuxpay.io. You are required to enter destination address and callback URL. Callback URL defined as an URL that enables NuxPay system to make HTTP POST when payment is received.

Every callback will be in POST method while data in JSON format.
Merchant Request Transaction
NuxPay Payment Gateway also provide an API to generate address. API format as follow:
Path:
https://api.nuxpay.com/payment_gateway/merchant/transaction/request
params Variable
Parameter Data Type Description Sample Value
api_key STRING API Key sOEcGm7P9I3hj4gZaAUyf05vNXRHCkJS
account_id STRING Account ID 15935
currency STRING Wallet Type tetherusd
amount STRING Amount 10
reference_id STRING Reference ID 1001
redirect_url STRING Merchant Redirect URL https://api.nuxpay.com
payment_type STRING Payment Type payment_gateway
fiat_currency_id STRING Fiat Currency Type myr
Sample Input
                
{
    "api_key": "sOEcGm7P9I3hj4gZaAUyf05vNXRHCkJS",
    "account_id": "15935",
    "currency": "tetherusd",
    "amount": "10",
    "reference_id": "1001",
    "redirect_url": "https://api.nuxpay.com",
    "payment_type" : "payment_gateway", 
    "fiat_currency_id" : "myr"
}






                
            
Wallet Type
Wallet Type Description
tetherusd Tether USD (ERC20)
ethereum Ethereum
tron Tron
tronusdt Tether USD (TRC20)
bitcoin Bitcoin
bitcoincash Bitcoin Cash
filecoin Filecoin
litecoin Litecoin
thenuxcoin TheNux Coin
bnb Binance Coin
usd2 USD2
myr2 MYR2
hkd2 HKD2
rmb2 RMB2
eur2 EUR2
won2 WON2
yen2 YEN2
php2 PHP2
thb2 THB2
Successful Response Value (Status code: 200)
Parameter Data Type Description Sample Value
code INTEGER Response Code 1/0
message STRING Response Message SUCCESS/ERROR
message_d STRING This message_d will return the message description of this request in sentences. Success
data Object The details of the response will be in the data object.
transaction_token STRING Transaction Token 0ivzo3prguV9stRC
reference_id STRING Reference ID 1001
address STRING Fund In Address 0x7aed1145d4bc04488db317bd4e963584050a5864
payment_id STRING Payment ID 1616671145
payment_url STRING Payment URL https://www.nuxpay.io/qrPayment.php?transaction_token=0ivzo3prguV9stRC
cryptocurrency_amount STRING Crypto Currency Amount 2.411223
crypto_symbol STRING Crypto Symbol USDT
Sample Output
                
{
    "code": 1,
    "message": "SUCCESS",
    "message_d": "Success.",
    "data": {
        "transaction_token": "0ivzo3prguV9stRC",
        "reference_id": "1001",
        "address": "0x7aed1145d4bc04488db317bd4e963584050a5864",
        "payment_id": 1616671145,
        "payment_url": "https://www.nuxpay.io/qrPayment.php?transaction_token=0ivzo3prguV9stRC",
        "cryptocurrency_amount": "2.411223",
        "crypto_symbol": "USDT"
    }
}




                
            
Callback data is as following
Field Data Type Description Sample data
command STRING Action type paymentGatewayCallback
params JSON Array Data array
params Variable
Field Data Type Description Sample data
receivedTxID STRING Received Transaction ID 0x4eb58a8394b14200371d77eba9281415721873f4b83bce829b1a2fb3240ab57f
referenceID STRING Transaction Reference ID 2552510
txDetails Object Transaction Details
input Array Fund In Transaction Data
receivedTxID STRING Received Transaction ID 0x4eb58a8394b14200371d77eba9281415721873f4b83bce829b1a2fb3240ab57f
amount STRING Amount 0.100000000000000000
unit STRING Coin Unit ETH
type STRING Coin Type ethereum
exchangeRate STRING Exchange Rate 478.8574884700
referenceID STRING Reference ID 2556718
charges Object Charges
amount STRING Amount 0.199963
unit STRING Unit USDT
type STRING Type tetherUSD
exchangeRate STRING Exchange Rate 1.00014654
minerFee Object Miner Fee Details
amount STRING Miner Fee Amount 0.000105000000000000
unit STRING Miner Fee Unit ETH
type STRING Miner Fee Type ethereum
exchangeRate STRING Miner Fee Exchange Rate 478.8574884700
output Array Destination Transaction Data
destination Object Destination Transaction Details
amount STRING Destination Transaction Amount 0.089790000000000000
unit STRING Destination Transaction Unit ETH
type STRING Destination Transaction Type ethereum
exchangeRate STRING Destination Transaction Exchange Rate 478.8574884700
charges Object Service Charge Details
amount STRING Service Charge Amount 0.089790000000000000
unit STRING Service Charge Unit ETH
type STRING Service Charge Type ethereum
exchangeRate STRING Service Charge Exchange Rate 478.8574884700
minerFee Object Miner Fee Details
amount STRING Miner Fee Amount 0.089790000000000000
unit STRING Miner Fee Unit ETH
type STRING Miner Fee Type ethereum
exchangeRate STRING Miner Fee Exchange Rate 478.8574884700
txID STRING Transaction ID 0x51f7dc400c3f127ef9ce12d6684408e0fc631ccbf165b9622b73e4c3a219cdfc
amount STRING Transaction Amount 0.08979 ETH
amountReceive STRING Amount Received in destination address 0.1 ETH
serviceCharge STRING Service Charge imposed in this transaction 0.01 ETH
minerAmount STRING Miner Amount 0.000105 ETH
address STRING Sender Address 0x46739ede49c94be3de880d2e2511aa34549bb6a5
status STRING Status success
transactionDate STRING Transaction Date 2020-11-20 10:08:07
transactionUrl STRING Transaction Url https://ropsten.etherscan.io/tx/0x51f7dc400c3f127ef9ce12d6684408e0fc631ccbf165b9622b73e4c3a219cdfc
type STRING Coin Type ethereum
sender Object Sender Address
internal STRING Internal Address 0x90561a2423694e34fccb20fff89e0b9150537d40
external STRING External Address 0xf4dd12271cb73b5eda57721334e59bce0f2cacca
recipient STRING internal 0x858ce2d99a674a340a1baf1f308e3dca0a697e86
recipient STRING external 0x406198aD26DeD711878b2702a9Fa23fdCB4a557e
clientReferenceID STRING Client Reference ID 19499895
transactionToken STRING Transaction Token Dqu1mOstUy237GZS
paymentTxID STRING Payment Transaction ID P1616672575
fiatDetails Object Fiat Details
amount STRING Amount 10.00
unit STRING Unit USD
exchangeRate STRING Exchange Rate 1.00014654
transactionType STRING Transaction Type payment_gateway
Sample Output
                
{
    "command": "paymentGatewayCallback",
    "params": {
        "receivedTxID": "0xf97a6c1612b21d43b83e8b42a401492f4abb59becf171b25b36c208a82572e5d",
        "referenceID": "2556718",
        "txDetails": {
            "input": [
                {
                    "receivedTxID": "0xf97a6c1612b21d43b83e8b42a401492f4abb59becf171b25b36c208a82572e5d",
                    "amount" : "5.000000",
                    "unit": "USDT",
                    "type": "tetherUSD",
                    "exchangeRate": "1.00014654",
                    "referenceID": 2556718,
                    "charges": {
                        "amount": "0.199963",
                        "unit": "USDT",
                        "type": "tetherUSD",
                        "exchangeRate": "1.00014654"
                    },
                    "minerFee": {
                        "amount": 2.435553,
                        "unit": "USDT",
                        "type": "tetherUSD",
                        "exchangeRate": "1.00014654"
                    },
                }
            ],
            "output": [
                {
                    "destination": {
                        "amount": 2.364484,
                        "unit": "USDT",
                        "type": "tetherUSD",
                        "exchangeRate": "1.00014654"
                    },
                    "charges": {
                        "amount": "0.199963",
                        "unit": "USDT",
                        "type": "tetherUSD",
                        "exchangeRate": "1.00014654"
                    },
                    "minerFee": {
                        "amount": 2.435553,
                        "unit": "USDT",
                        "type": "tetherUSD",
                        "exchangeRate": "1.00014654"
                    },
                }
            ]
        },
        "txID": "0x8b010024ca13333e236c2783b5fa667825977bb8365b9fa83ee7286e5971331d",
        "amount": "2.364484 USDT",
        "amountReceive": "5 USDT",
        "serviceCharge": "0.199963 USDT",
        "minerAmount": "2.435553 USDT",
        "address": "0x378192fa01ff8695846b6e3694bc6857faace234",
        "status": "success",
        "transactionDate": "2021-03-26 09:38:27",
        "transactionUrl": "https://ropsten.etherscan.io/tx/0x8b010024ca13333e236c2783b5fa667825977bb8365b9fa83ee7286e5971331d",
        "type": "tetherUSD",
        "sender": {
            "internal": "",
            "external": "0x406198ad26ded711878b2702a9fa23fdcb4a557e"
        },
        "recipient": {
            "internal": "",
            "external": "0xd10D0434013CA543E3598aaEDAC2fEB2C2B75962"
        },
        "clientReferenceID": "19499895",
        "transactionToken": "Dqu1mOstUy237GZS",
        "paymentTxID": "P1616672575",
        "fiatDetails": {
            "amount": "10.00",
            "unit": "USD",
            "exchangeRate": "1.00014654"
        },
        "transactionType": "payment_gateway"
    }
}


            
Whitelist Address API
This API is use to whitelist the address.
Path:
https://api.nuxpay.com/whitelist/address/multi
Request Type:
POST
Request Parameter:
Parameter Data Type Description Sample Value
account_id STRING account_id 16226
api_key STRING whitelisting module api key n32MKbhtYTIuw84EeOVa7qmplLcJHGRy
address Objects address
address STRING Address 0x16643a9f1475c5552d11d93f41db00e20b477348
wallet_type STRING Wallet Type tetherusd
Successful Response Value (Status code: 200)
Parameter Data Type Description Sample Value
code INTEGER Response Code 1/0
message STRING Response Message Success/Failed
data Objects Whitelist Data
address STRING Address 0x16643a9f1475c5552d11d93f41db00e20b477348
wallet_type STRING Wallet Type tetherusd
status STRING Status Success/Failed
reason STRING Reason Duplicate address detected
Sample Output
                

code : 1
message : Success
message_d : Success
data :
  0 :
    address : 0x16643a9f1475c5552d11d93f41db00e20b477348
    wallet_type : tetherusd
    status : Failed
    reason : Duplicate address detected
  1 :
    address : 0xade4f9852a30860f01539392247ba545e3a138d9
    wallet_type : bitcoin
    status : Failed
    reason : Invalid address
  2 :
    address : 2N9ogZNCkdrJrH2sxWFjhfRRoqRMev73KEH
    wallet_type : bitcoin
    status : Success
    reason : Success


                
            
Copyright © 2024 NuxPay.io. All Rights Reserved. Terms & Condition | Privacy Policy.