Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 8 Next »

In order to configure an app for payments the following details need to be specified in your support request:

  1. The Helium server where the app is located
  2. The unique identifier (UUID) of your app
  3. The M-Pesa account number also known as the shortcode
  4. All objects that are involved in payments. In other words the objects that represent entities making payments and receiving payments in the app. In the example shown in Lesson 12 of the tutorial, the objects are Farmer and Shop. For each object the following should also be specified:
    • The field on the object that is to be used as an M-Pesa identifier
    • The type of M-Pesa identifier that is represented by the field mentioned above. This can, for example, be an MSISDN (such as a mobile number) or a till number.

If there are multiple accounts being used in your app, please also specify the following in addition to the above items:

  1. The M-Pesa account number also known as the shortcode for all accounts
  2. A field on one of the payment objects or an object related to a payment object that represents an account to be used.
  3. The values used to represent accounts on the field mentioned above, can be arbitrary, but a mapping also needs to be specified that maps possible values of this field with actual accounts represented by the account number specified in point 1 of this section.

 

Configuring apps for M-pesa payments is a complex topic. To assist with the understanding of this please see the two examples shown in the sections that follow. 

Once the content of your request has been finalised it can be sent using the following channels:

  • For internal Mezzanine developers, create a JIRA ticket on the HE project.
  • For external PaaS client developers, send an e-mail with your request to Mezzanine Support at support@mezzanineware.com.

Note that after the request has been sent, you will be contacted for additional details such as

  • the Initiator user name and password for each M-Pesa account
  • additional information on the relevant data model objects should this be needed

 

 

Example 1: Single M-Pesa Account

 

Pay Built-In Function Usage

.
.
.
int cost = 10;
UUID paymentId = payer.pay(payee, "KES", cost);

 

Relevant Model

persistent object Payer {
	string name;
	string description;
	string mobileNumber;
}
persistent object Payee {
	string name;
	string description;
	string mobileNumber;
}

 

 

 

Request Example

Good day,

I would like to request that my app with appId on https://some-server.mezzaninewe.com be configured for payments with the following details:

M-Pesa account number (shortcode): 111222

 

Relavent data model objects and fields:

Object: Payer

M-Pesa Identifier field: modbileNumber

M-Pesa Identifier type: MSISDN

 

Object: Payee

M-Pesa Identifier field: mobileNumber

M-Pesa Identifier type: MSISDN

 

 

Example 2: Mutiple M-Pesa Accounts

 

Pay Built-In Function Usage

 

Relevant Model

 

Request Example

 

  • No labels