- The base endpoint is: /
- All endpoints return JSON objects
- HTTP 4XX return codes are used for malformed requests; the issue is on the sender's side
- HTTP 5XX return codes are used for internal errors; the issue is on Viddatech's side. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success
- For GET, POST endpoints, parameters must be sent along the request body
- Parameters may be sent in any order
- All endpoints returns success flag
Sample Payload below:
{
"success": true,
"message": ""
}
- Any endpoint can return an ERROR
Sample Payload below:
{
"success": false,
"message": ""
}
GET /
Says hello to the Rest API to test connectivity.
Response
{
"success": true,
"message": "Hello World!"
}
POST /new-transaction/
Create a new transaction
Parameters
Name | Type | Mandatory |
---|---|---|
STRING | YES | |
amount | INTEGER | YES |
reference | STRING | YES |
Response
{
"success": true,
"message": "",
"reference": "",
"payment_url": ""
}
GET /transactions/
Get all account transactions
Parameters
Name | Type | Mandatory |
---|
Response
{
"success": true,
"total": 0,
"total_volume": 0,
"message": "",
"transactions": []
}
POST /verify-transaction/
Verify a particular transaction
Parameters
Name | Type | Mandatory |
---|---|---|
reference | STRING | YES |
Response
{
"success": true,
"message": "",
"data": []
}
GET /get-balance/
Get Account Balance
Parameters
Name | Type | Mandatory |
---|
Response
{
"success": true,
"message": "",
"balance": 0
}
GET /get-banks/
Get Paystack Supported Banks
Parameters
Name | Type | Mandatory |
---|
Response
{
"success": true,
"message": "",
"data": []
}