For the complete documentation index, see llms.txt. This page is also available as Markdown.

Make Payment

Allows user to initiate payment

GET {{BASE_URL}}/api/payments/stk-push

Headers

Name
Type
Description

Authentication

string

Authentication token to track down who is emptying our stocks.

Request Body

Name
Type
Description

paying_phone_number

string

Phone number used to make payment

amount

integer

Amount to pay

course_ids

list of integers

A list of course ids to pay for

{
    "status": 200,
    "response_code": 0,
    "success": true,
    "errors": [],
    "message": "STK push initiated successfully",
    "data": {
        "payment_id": 45,
        "amount": 1.0,
        "phone_number": "254742654803",
        "status": "pending",
        "message": "Success. Request accepted for processing",
        "merchant_request_id": "68b7-458a-a02b-cfbe240f00fe383201"
    }
}
{
  "status": 401,
  "response_code": 0,
  "success": false,
  "errors": [
    "No token provided"
  ],
  "message": "No token, Authorization denied"
}

Last updated