S2S MoMo (KES and GHS)

Initiate S2S

Authorization
Set to Bearer PUBLIC_KEY

Content-Type

Set value to application/json

circle-info

The public key can be gotten from the 'Settings' page on your Startbutton dashboard.

Post a request to the URL below, where the base URL is determined by the environment you are in.

chevron-rightBaseUrlhashtag

Sandbox/PROD : https://api.startbutton.tech

POST {{baseurl}}/transaction/initialize/s2s/mobile_money

Here's a sample request below

{
    "provider": "mpesa",
    "phone": "+254710000000",
    "email": "kass1-pms@customer.com",
    "amount": 3000,
    "currency": "KES"
}
{
    "provider": "MTN",
    "phone": "0551234987",
    "amount": 300000,
    "currency": "GHS",
    "email": "test-pms@customer.com"
}
circle-info

We have 3 providers for GHS: - MTN- passed as "MTN" - AIRTEL passed as "ATL" - VODAFONE- passed as "VOD"

circle-info

The amount should be in fractional units.

Here's a sample response

The next step can either be OTP or PIN. If your customer is new to the service, they'll receive an OTP initially. Afterwards, for subsequent transactions, they'll be provided with a PIN.

When it is an OTP; you need to present the User with a screen to enter OTP and then call the endpoint below

OTP Verify

POST {{baseurl}}/transaction/initialize/s2s/mobile_money/otp-verify

Authorization
Set to Bearer PUBLIC_KEY

Here's a sample response

Here's a sample response

However, if the next step is a PIN your users only need to enter their PIN on the prompt on their phone.

Last updated