Documentation

Mobile Money

Ghana has recently enacted a policy to encourage the use of mobile money and reduce the flow of cash. Mobile Money was greatly adopted due to some of its advantageous benefits. People can transfer money or make payments wherever they are, in a simple, fast, convenient, and affordable way.

Mobile Money Create Or Verify Invoice Endpoint

https://gateway.mobivate.com/api/mobilemoney/<account_id>/<country>/<action>

Create a new invoice or validate an existing one.

URL Parameters:

    account_id – your Account ID
    country – Country for the MobileMoney service. Currently, only GH is supported
    action – either “initiate” or “validate”

HTTP Method(s): POST

Payload Type: JSON

Headers: “Content-Type”: “application/json”

Request body parameters for the INITIATE action


Parameter

Required

Description

msisdn

Yes

String, representing the international formatted phone number.

service

Yes

String. Identifies the service associated with a certain Account ID.

Example request: POST:

https://gateway.mobivate.com/api/mobilemoney/example/GH/initiate

{

“msisdn”: “1234567890”,

“service”: “123-my-service”

}

Returns

The following parameters will be returned as a JSON payload.


Parameter

Description

id

MT/response id. This needs to be saved and passed back to us when verifying the invoice.

responseCode

Represents the status of the transaction.

message

Provides a description of the response code.

data

Example response:

{

“id”: “MT-00000000000000000000000000000000”,

“responseCode”: “0001”,

“message”: “Your request has been processed successfully”,

“data”: {

“recurringInvoiceId”: “1238977yhfw08261”,

“requestId”: “kjlf9ew8012986r7”,

“otpCode”: “ABCD-9514”

}

}

Request body parameters for the VALIDATE action


Parameter

Required

Description

id

Yes

The id that we returned in the response to the INITIATE action/flow.

recurringInvoiceId

Yes

Received in the response from the INITIATE flow.

requestId

Yes

Received in the response from the INITIATE flow.

otpCode

Yes

Prefix received in the INITIATE flow alongside the code sent to the customer.

Example request: POST: https://gateway.mobivate.com/api/mobilemoney/example/GH/validate

{

“id”: “MT-00000000000000000000000000000000”,

“recurringInvoiceId”: “1238977yhfw08261”,

“requestId”: “kjlf9ew8012986r7”,

“otpCode”: “ABCD-9514”

}

Returns:

The following parameters will be returned as a JSON payload.


Parameter

Description

responseCode

Represents the status of the transaction.

message

Provides a description of the response code.

data

Example response:

{

“responseCode”: “0001”,

“message”: “Your request has been processed successfully. You will receive a callback on the final status”,

“data”: {

“recurringInvoiceId”: “1238977yhfw08261”,

}

}