Pochipay Apis

Pochipay Payment Gateway Integration

Welcome to the Pochipay Payment Gateway API docs. This guide provides details on how to integrate with Pochipay for various payment and disbursement functionalities. The APIs are designed to be asynchronous by default which means the final status of a transaction is communicated back to the client through a http callback.

Getting Started

Before you start integrating with Pochipay, ensure you have the following:

  • Your API credentials (email, password)

  • Proper authorization headers in each request using the Bearer token

Authentication

The Pochipay API uses JWT for authentication. To interact with the endpoints, you must first retrieve an access token using the /account/token endpoint. The token expires after 3600 seconds.

Token Request

  • Endpoint: POST https://app.pochipay.com/api/v1/account/token

  • Headers: None

  • Body Parameters:

    • email: Your email address

    • password: Your password

Sample Request/Response

Request:

Response (200 OK - Success):

Save the access_token and use it in the Authorization header for subsequent requests: Bearer your-access-token


Disbursement

Get Banks

  • Endpoint: GET https://app.pochipay.com/api/v1/disbursement/banks

  • Description: Retrieves a list of available banks for disbursement

  • Headers: Authorization

Sample Response (200 OK - Success):

Send to Mobile

  • Endpoint: POST https://app.pochipay.com/api/v1/disbursement/send-to-mobile

  • Description: Sends funds to a valid Mpesa mobile number

  • Headers: Authorization

Sample Request/Response

Request:

Response (200 OK - Success):

Response (400 - Bad Request):


Send to Bank

  • Endpoint: POST https://app.pochipay.com/api/v1/disbursement/send-to-bank

  • Description: Sends funds to a supported bank account. See Get Banks above to fetch a list of supported banks

  • Headers: Authorization

Sample Request/Response

Request:

Response (200 OK - Success):

Response (400 Bad Request):


Send to Paybill or Till Number

  • Endpoint: POST https://app.pochipay.com/api/v1/disbursement/send-to-business

  • Description: Allows funds transfer to Mpesa Paybill and Till numbers

  • Headers: Authorization

Sample Request/Response

Request:

Response (200 OK - Success):

Response (400 Bad Request):

Disbursement Callback

A callback is dispatched to your callback URL once transaction processing is completed. Please ensure that your endpoint accepts POST request and is not behind any authentication.

The structure of the json is shown below:

Disbursement Status

You can call this endpoint in cases where you have missed your disbursement callback.

  • Endpoint: POST https://app.pochipay.com/api/v1/disbursement/transaction-status

  • Description: Retrieves the status of a disbursement

  • Headers:

    • Authorization: Bearer {token}

    • Content-Type: application/json

    • accept: text/plain

Sample cURL Request:

Request Body:

Response with Pending Status (200 OK):

Response with Completed Status (200 OK):

Response (404 Not Found):

Response (400 Bad Request):

Retry Pending Disbursement

If the status is pending and has a narrationId, the transaction can be retried using the endpoint below:

  • Endpoint: POST https://app.pochipay.com/api/v1/disbursement/execute-narration

  • Description: Retries a pending disbursement using the narration ID

  • Headers:

    • Authorization: Bearer {token}

    • Content-Type: application/json

    • accept: text/plain

Sample cURL Request:

Request Body:

Response (200 OK):

Cancel Pending Disbursement

A transaction can only be cancelled if it's been pending for at least 24 hours.

  • Endpoint: POST https://app.pochipay.com/api/v1/disbursement/cancel

  • Description: Cancels a pending disbursement transaction

  • Headers:

    • Authorization: Bearer {token}

    • Content-Type: application/json

    • accept: text/plain

Sample cURL Request:

Request Body:

Response (200 OK):


Account

Balance

  • Endpoint: GET https://app.pochipay.com/api/v1/account/balance

  • Description: Retrieves the current balance

  • Headers: Authorization

Sample Response (200 OK - Success):

Transactions

Summaries

  • Endpoint: GET https://app.pochipay.com/api/v1/transactions/summaries

  • Description: Retrieves transaction summaries

  • Headers: Authorization

Sample Response (200 OK - Success):

Collections

Mpesa Collections

  • Endpoint: POST https://app.pochipay.com/api/v1/collections/mpesa

  • Description: Initiates an Mpesa collection

  • Headers: Authorization

Sample Request/Response

Request:

Response (200 OK - Success):

Response (400 Bad Request):

Collection Callback

A callback is dispatched to your callback URL once transaction processing is completed. Please ensure that your endpoint accepts POST request and is not behind any authentication.

The structure of the json is shown below:

Collection Query

You can query collections using different parameters: MpesaReference, BillReferenceNumber, or OrderId.

  • Endpoint: GET https://app.pochipay.com/api/v1/collections/mpesa/collection-query

  • Description: Query collection details using various reference parameters

  • Headers:

    • Authorization: Bearer {token}

    • accept: */*

Sample cURL Requests:

Using MpesaReference:

Using BillReferenceNumber:

Using OrderId:

Success Response (200 OK):

Failed Response (200 OK):

Pending Response (200 OK):

Not Found Response (404):

Collection Status

This endpoint can be called to query the status of a collection in cases where you have missed the collection callback.

  • Endpoint: POST https://app.pochipay.com/api/v1/collections/mpesa/transaction-status

  • Description: Checks status of a mpesa collection

  • Headers: Authorization

Sample Request/Response

Request:

Response (200 OK):

Response (404 Not Found):

Response (400 Bad Request):

Conclusion

This documentation outlines the main endpoints available in the Pochipay API, covering authentication, disbursement, account balance, transactions, and collections.

Always ensure your requests include the proper authorization headers using the Bearer token.

For more details, refer to the specific endpoint sections above and the sample requests/responses provided.

Key Points to Remember:

  • All APIs use JWT authentication with Bearer tokens

  • Tokens expire after 3600 seconds (1 hour)

  • Most operations are asynchronous and use callbacks

  • Currently only KES currency is supported

  • Ensure callback URLs accept POST requests and are not behind authentication

  • Keep track of your requestId and trackingReference for status queries

Base URL

Support

For additional support or questions about the API, please contact the Pochipay support team.


Last updated: October 2025

Last updated