Invoice management APIs

To accept a payment using IremboPay API, the first step is to create an invoice. An invoice can have an expiration date which defines until when it can be paid.

API Authentication

The IremboPay API uses a secret key to authenticate requests. Merchants can view and manage their API secret key in the IremboPay merchant portal. All requests shall be authenticated by providing:

Header Key: irembopay-secretkey


API Response

IrenboPay API calls return HTTP status codes and JSON response bodies.

HTTP Status codes

Status code
Description

200, 201

The request was successfully executed.

400

Missing required parameters, or parameters not correctly formatted.

401

Authentication has failed.

404

A specified resource in the request does not exist.

429

Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.

500, 502, 503, 504

An internal server error has occurred.

Response body

The response body is a JSON object structured as follows:

    {
       "success" : <true or false>,
       "message" : “string”,
       "data" : {},
       "errors" : []
    }

Fields Description:

  1. success

    • Type: Boolean (true or false)

    • Description: Indicates whether the request was successful and a payload has been returned. If false, the errors field will contain details.

  2. message

    • Type: String

    • Description: A human-readable message providing additional context about the request's result (success or failure).

  3. data

    • Type: Object

    • Description: The actual response payload. Its structure is specific to each endpoint and is returned when the HTTP status code is 200 or 201.

  4. errors

    • Type: Array of Error Objects

    • Description: Contains an array of error objects, returned when the HTTP status code is not 200 or 201. Each error object includes the following fields:

    • code: A string representing the error code.

    • detail: A human-readable description of the error.

    Error code for authentication error

    Status code
    Description
    Error message

    401

    AUTHENTICATION_FAILED

    Invalid IremboPay secret key

Last updated