Log in to see full request history

Endpoint to initiate transactions on Vendy.

Request:

FieldTypeDescription
businessIdIntegerMerchant registered business Id. Transaction is only valid for one business id. BusinessId can be found on the Settings > API section of the dashboard
amountDoubleThe amount being debited.
msisdnstringA valid identification phone number that is linked to a specific network.
channelEnum (String)Payment checkout channel where transaction will be processed; 'ussd' or 'whatsapp'
currencyEnum(String)ISO currency code (USD,NGN,KES). Defaults to the currency for the business upon creation.
metaJSON ObjectObject containing any extra information you want recorded with the transaction.

Example request

curl --location 'https://api.vendy.money/transactions/initiate' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "businessId":1, "amount":100, "msisdn":"2348112345678", "channel":"ussd", "meta": { "email": "example@test.com", "narration": "Any narration", "custom_field": "custom field" } }'

Response:

FieldTypeDescription
statusBooleanStates if request was successfully executed or not
codeIntegerInternal code, success if 200
msgStringA description of the status of the request
dataTransactionNewly initiated transaction details

Example response

{ "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": "2348112345678", "requestamount": 100, "amount": 100, "method": "ussd", "currency": "NGN", "refid": "4930517800770623045", "failed": -1, "delivered": -1, "meta": { "email": "example@test.com", "custom_field": "custom field", "narration": "Any narration", "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" } }

Possible errors;

Error codeDescription
326Business not found
Body Params
double
required
Defaults to 10

Amount to be paid in currency

string
required
Defaults to 2348112345678

country code and phonenumber

string
required
Defaults to ussd

Specify how customers should pay

json
Defaults to {"email":"test@email.com", "your-reference":"reference"}

Object containing any extra information you want recorded with the transaction. Fields within the custom_field object will show up on merchant receipt.

string
Defaults to NGN

ISO 4217 three-letter code. Defaults to the currency for the business

Responses

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json