Request payment Via API

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.
expiryDateFuture date in UTC when this transactions expires - yyyy-MM-dd HH:mm:ss (2025-08-28 00:00:00), defaults to 7 days from creation
metaJSON ObjectObject containing any extra information you want recorded with the transaction.

Example request

curl --location 'https://api.myvendy.com/transactions/initiate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
		"businessId":1,
    "amount":100,
    "msisdn":"2348112345678",
    "channel":"whatsapp",
    "meta": {
       "email": "[email protected]",
       "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": "[email protected]",
            "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
enum
required
Defaults to whatsapp

Specify how customers should pay

Allowed:
json
Defaults to {"email":"[email protected]", "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

string

Future date in UTC when this transactions expires - yyyy-MM-dd HH:mm:ss defaults to 7 days from creation

Responses

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