Initiate checkout
Initiate a payment request and return hosted checkout url
Request
Request URL: https://www.awdpay.com/api/checkout/v2/initiate
Method: POST
Headers
NAME | VALUE | DESCRIPTION |
Content-Type | application/json | |
Authorization | Bearer {PrivateKey} | Get your {PrivateKey} on your merchant account on Awdpay platform. |
Body Parameters
NAME | TYPE | MANDATORY | DESCRIPTION |
logo | string | Yes | display on the checkout page, an url |
amount | number | Yes | |
currency | string | Yes | 3 letter code (ex: USD or EUR or XOF) |
customIdentifier | string | Yes | An ID to help you to verify the status later |
callbackUrl | string | Yes | A notification URL when status change |
successUrl | string | Yes | An url to redirect to once the paiement has been successful |
failedUrl | string | Yes | An url to redirect to if the paiement is cancelled |
test | boolean | Yes | Possible values: true or false |
Exemple (curl)
curl --request POST \
--url https://www.awdpay.com/api/checkout/v2/initiate \
--header 'Content-Type: application/json' \
--data '{
"logo": "https://yoursite.com/images/logo.png",
"amount": 10,
"currency": "USD",
"customIdentifier": "ORDER32",
"callbackUrl": "https://webhook.site/448a4a2b-a442-44ce-b6a6-7e5eb8e17843",
"successUrl": "https://yoursite.com?status=success",
"failedUrl": "https://yoursite.com?status=failed",
"test": false
}'
Responses
200 OK
{
"success": "boolean",
"message": "string",
"redirectUrl": "string"
}
4xx - invalid input, object invalid
5xx - server Error
Callback DATA
{
"status": "string", //success or failed
"trxId": "string",
"amount": "number",
"currency": "string",
"customIdentifier": "string",
"paidBy": "string",
"timestamp": "string"
}
Verify checkout
Check payment status via customIdentifier or TrxId.
Request
Request URL: https://www.awdpay.com/api/checkout/v2/verify
Method: GET
Headers
NAME | VALUE | DESCRIPTION |
Content-Type | application/json | |
Authorization | Bearer {PrivateKey} | Get your {PrivateKey} on your merchant account on Awdpay platform. |
URL Parameters
NAME | TYPE | MANDATORY | DESCRIPTION |
trxId | string | Yes | Transaction ID of the initiated payment |
customIdentifier | string | Yes | Custom Identifier of the initiated payment |
Responses
200 OK - Transaction Found
{
"trxId": "16D5rEYGL0WZ",
"status": "success",
"amount": 9,
"currency": "USD",
"customIdentifier": "test@test.com",
"paidBy": "agency@gmail.com",
"test": false,
"updatedAt": "2023-07-11T10:16:47.000Z"
}
404 Not Found
5xx Internal Server Error
Initiate disbursement
Initiate a disbursement request and credit user balance
Request
Request URL: https://www.awdpay.com/api/disbursement/v2/initiate
Method: POST
Headers
NAME | VALUE | DESCRIPTION |
Content-Type | application/json | |
Authorization | Bearer {PrivateKey} | Get your {PrivateKey} on your merchant account on Awdpay platform. |
Body Parameters
NAME | TYPE | MANDATORY | DESCRIPTION |
customerEmail | string | Yes | valid Email of your customer |
amount | number | Yes | |
currency | string | Yes | 3 letter code (ex: USD or EUR or XOF) |
Exemple (curl)
curl --request POST \
--url https://www.awdpay.com/api/disbursement/v2/initiate \
--header 'Content-Type: application/json' \
--data '{
"amount": 10,
"currency": "USD",
"customerEmail": "test@test.com"
}'
Responses
200 OK
{
"success": true,
"message": "User credited with the balance",
"data": {
"trxId": "VXXXXXXXY",
"amount": 10,
"currency": "USD"
}
}
4xx - invalid input, object invalid
5xx - server Error
Verify checkout
Check disbursement status via TrxId
Request
Request URL: https://www.awdpay.com/api/disbursement/v2/check
Method: GET
Headers
NAME | VALUE | DESCRIPTION |
Content-Type | application/json | |
Authorization | Bearer {PrivateKey} | Get your {PrivateKey} on your merchant account on Awdpay platform. |
URL Parameters
NAME | TYPE | MANDATORY | DESCRIPTION |
trxId | string | Yes | Transaction ID of the initiated payment |
Responses
200 OK - Transaction Found
404 Not Found
5xx Internal Server Error