Payment

Overview

Base URLs: https://api.rumbapay.online/v1/

Data Format: JSON

HTTP Methods: POST, PUT, GET


Initialize payment

When creating a payment using the method https://api.rumbapay.online/v1/payment you must inspect the challenge.challenge_type field to determine the appropriate flow.

For this type of payment, you must set widget.method = mobile_money and use the currency KES.

Otherwise, you may receive the following error: 273:Invalid adapter route configuration

List of available operators

Country
ISO A-2
Operator

Kenya

KE

mpesa, airtel

Tanzania

TZ

vodacom, tigo, halopesa, airtel

Ghana

GH

vodafone, mtn, airteltigo

Gambia

GM

qcell, wave, africel

Cameroon

CM

mtn, orange

Ivory Coast

CI

orange, mtn, moov, wave

Method: HTTP POST

URL: https://api.rumbapay.online/v1/payment

Request Body Type HPP:

Request Body Type H2H:

Response (Success):

Response - 200 OK

  1. First, you should check error_code field of response.

    If error_code field is not equals to 0 - transaction is Failed.

  2. Second, you should check status field.

    The status field will always be set to created if there are no errors.

    Make check request or wait for a callback to get final transaction status.

Challenge type: redirect

If the challenge.challenge_type is set to redirect, you must send your Customer to the URL specified in challenge.challenge_redirect.url.


Customer can complete the payment by either scanning the barcode with their banking app or manually transferring the funds using the payment details — both the barcode and payment information are available on the page at challenge.challenge_redirect.url.

Rumbapay sends a callback to the merchant's callback URL when the payment reaches a terminal state (success, error, etc.)

Challenge type: stk

If the challenge.challenge_type is set to redirect, you must send your Customer to the URL specified in challenge.challenge_redirect.url.

Challenge type: otp

If the challenge.challenge_type is set to redirect, you must send your Customer to the URL specified in challenge.challenge_redirect.url.

Complete otp

Use the URL: https://api.rumbapay.online/v1/payment/challenge/otp

Response


Response - 400 Bad request

If incorrect values are provided for widget.method or currency, you may receive the following response:


Callback

On every completed Payout we send a callback notification to the URL you passed in the request in the callback_url field.

Callback flow

The callback flow follows these steps:

  1. Rumbapay processes the payment request

  2. When the payment status changes to a terminal state, Rumbapay sends an HTTP POST request to your callback URL

  3. Your server should process the callback, validate the signature, and update your system

  4. Your server should respond with HTTP 200 OK to acknowledge receipt

Example


Check Payment Status

Method: HTTP GET

URL: https://api.rumbapay.online/v1/transaction/{request_id}

Response (Success):

Response (Not Found):

Transaction not found

Last updated