Get started

    API Endpoints
                
    https://drtether.com/api/v1/make/transaction
    https://drtether.com/api/v1/pay/transaction/
    https://drtether.com/api/v1/transaction/
    
                

We will work with 3 endpoints to perform payment operations from start to complete payment.

To use this API, you need an Merchant ID. You have to create and activate a gateway in your account on our website to get your own Merchant ID.

Create Payment


# Here is a curl example
curl \
-X POST https://drtether.com/api/v1/make/transaction \
-F 'merchant=your_merchant_id' \
-F 'callback=callback_url' \
-F 'amount=10'
                

To create a payment you need to make a POST call to the following url :
https://drtether.com/api/v1/make/transaction



Result example :

{
    "status":200,
    "data":{
        "merchant":"5a9f02d21911c9f81a14829f12d69g45",
        "callback":"https:\/\/domain.com\/callback",
        "amount":"10",
        "hash":"3733fd5e869323123c16846d9ffe4f54"
    },
    "message":"transaction created successfully"
}
                

QUERY PARAMETERS

Field Type Description
merchant String Merchant ID of your website that you received from our website after create new gateway in your account.
callback String Callback address on your website. Please note that the callback address sent must include the address you used on our website while creating the gateway. Even https and http matter!
amount String Number of USDT amount. You can send Int or Float.

Redirect User

After receiving the hash in the previous step, you must redirect the user to this address to do the payment.
https://drtether.com/api/v1/pay/transaction/{hash}

Callback

STEP 1:

In callback step our website will send txnid with GET method.
Like this:
https://domain.com/callback.php?txnid={txnid}
You should get this txnid for the next step!



Result example :

{
    "from":"walletadressusdttrc20",
    "to":"walletadressusdttrc20",
    "amount":"10",
    "txnid":"3fga4j7l95589mfhjj54xvb312",
    "hash":"478eb475977b4467018f707715ddf5caa06f7f9b3b7a36b733488d29447097e1",
    "confirmed":1,
    "revert":0,
    "used":0,
}
                

STEP 2:

At this step of the callback, you should check the transaction information and if it meets your criteria, you can show the transaction confirmation message!
We have provided everything you will need.
To get the payment info you need to make a GET call to the following url:
https://drtether.com/api/v1/transaction/{txnid}
Most of the parameters are simple and you can understand and we have explained the important parameters for you in the table below.

Error Code Meaning
confirmed The result must be 0 or 1. If it is 1, it means that the payment is done. If it is 0, it indicates incomplete payment or payment error.
used It can be from 0 to 9. These numbers mean the number of times your api requests to track this Hash ID.
revert It can be 0 or 1. These numbers determine whether the amount has been returned to the source account.
hash This hash is the transaction that is paid and you can track it on tronscan website.