How to make a payout to a bank account with code:
API URL for Step 3 | HTTP Method |
---|---|
https://dinardragon.com/status |
POST |
EXPECTED FIELDS TO OBTAIN PAYMENT STATUS:
uniqueid (string) | OR | payment_id (string) |
---|---|---|
ID of an individual payment in your payout, as shown in payment data returned in Step 2 |
ID of entire payout, as shown in payment data returned in Step 2 |
You will also need to provide an Authorization value in the header of your HTTP request. You provide your private key here.
//use this body when you only want the status of a single payment
{
"uniqueid": "df9a31ea528a3977" //unique ID for singular payment out of an entire payout
}
//use this body when you want the status of an entire payout with all its payments
{
"payment_id": "1617fcccd1f3269c" //unique ID for an entire payout
}
SUCCESS:
HTTP RESPONSE:
code (integer) | payments (array of objects) |
---|---|
HTTP Response Code, e.g. 200, 201 | Array containing status results for payments |
CONTENTS OF EACH OBJECT IN PAYMENTS (ARRAY OF OBJECTS):
uniqueid (string) | status (integer) |
---|---|
ID of the payment you queried |
0: Payment processing
1: Payment successful 2: Payment failed. Amount refunded to Dashboard balance |
FAIL:
code (integer) | error (string) |
---|---|
HTTP Response Code, e.g. 403, 400 | Error message that tells you why the request failed |
{
"code": 200, //OK
"payments":
[
{
"uniqueid": "yourpaymentid",
"status": 1 //payment successful
}
]
}
{
"code": 200, //OK
"payments":
[
//Payment 1
{
"uniqueid": "firstpaymentid",
"status": 0 //payment processing
},
//Payment 2
{
"uniqueid": "secondpaymentid",
"status": 1 //payment successful
},
//Payment 3
{
"uniqueid": "thirdpaymentid",
"status": 2 //payment failed
},
//......and so on
]
}
{
"code": 400, //Fail
"error": "Missing API key in request headers.",
}
That's it! Now you can query the status of your payouts.
General Functionality | Expected Input | Response |
---|---|---|
/status - POST endpoint to check the payment status of either an entire payout or a payment within a payout, using the ID of the payment. |
- **payment_id/uniqueid**: The ID of the payment. Note that uniqueid is for singular payments within a payout, payment_id is for entire payouts. (string) - **privatekey**: Your private key in 'Authorization' field of headers (string) |
- **code**: HTTP response code (number) - **uniqueid**: Payment ID (string) - **status**: 0=processing, 1=success, 2=fail (number) - **error**: If there's an issue, an error message (string) |
©2024 dinardragon.com. All rights reserved.