post https://api.vendy.money/transactions/initiate
Initiate transaction via the API
To initiate transactions making use of Vendy API, make a "post" request;
POST
Example request
curl --location --request POST 'https://api.vendy.money/transactions/initiate' \
--data-raw '{
"businessId":1,
"amount":100,
"msisdn":"+2348101851915",
"channel":"ussd"
}'
Example response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"status": true,
"code": 200,
"msg": "Transaction Sent",
"data": {
"vended": "-1",
"reversed": "-1",
"debited": "-1",
"isreversing": "-1",
"processing": "-1",
"flag": "-1",
"id": 605513775,
"uid": 1,
"businessId": "1",
"msisdn": "+2348101851915",
"requestamount": 100,
"amount": 100,
"method": "ussd",
"currency": "NGN",
"refid": "4930517800770623045",
"failed": -1,
"delivered": -1,
"meta": {
"fee": 0,
"commission": 0,
"charge_customer": false,
"fee_structure": {
"fee": 0,
"percent": true,
"threshold": {
"max": 100,
"min": 0
},
"commission": 0,
"charge_customer": false
},
"total": 11
},
"walletId": 1689,
"commissionWallet": 1690,
"staffId": null,
"updated_on": "2023-05-18T15:37:50.523Z",
"created_on": "2023-05-18T15:37:50.523Z"
}
}
Where the data to initiate transactions are;
Field | Type | Description |
---|---|---|
Business Id | string | Merchant registered business Id. Transaction is only valid for one business id. |
Amount | integer | The amount being debited. |
Currency | NGA | The currency in which the transaction is paid. |
Channel | enum | "ussd" or "whatsapp" |
Msisdn | string | A valid identification phone number that is linked to a specific network. |
Possible errors;
Error code | Description |
---|---|
326 | Business not found |