POST
/
v1
/
widget
/
sessions

Initiates a payment session using the pawaPay Payment Page.

Learn more!

See how the Payment Page works for your customers.

  • The request will return a redirectURL.
  • The customer should be forwarded to this URL to start the payment process.
  • Once the customer completes the payment process on the Payment Page, they will be forwarded to the returnUrl.
  • The original depositId will be passed as a query parameter.

Your page on the returnUrl has two options to determine the status of the payment. You can do that by either:

The customer experience of the Payment Page can be changed through the following parameters during initiation.

ParameterBehaviour if specifiedBehaviour if not specified
amountThe specified amount will be used for the payment. Customer is not able to change it.The customer is able to enter the amount they wish to pay. For example, when depositing into their eWallet.
msisdnThe payment will be initiated from the specified mobile money wallet. Customer is not able to change it.The customer can specify the phone number of the mobile money wallet they wish to pay from.
countryThe customer can pay only using a mobile money wallet from the specified country.The customer can pay with a mobile money wallet from any country that is configured on your pawaPay account.
reasonThe reason will be shown to the customer on the Payment PageThe customer will not be shown what they are paying for.

Authorizations

Authorization
string
headerrequired

Body

application/json
depositId
string
required

A UUIDv4 based ID specified by you, that uniquely identifies the deposit.

returnUrl
string
required

The URL to which the user will be redirected after completion of the operation.

statementDescription
string

Short description for the transaction. Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.

Must be between 4 and 22 alphanumeric characters.

amount
string

If specified, the amount will be displayed to the customer as the payment amount. For example, when paying for specific goods or services.

If not specified, the customer will have to specify the amount they wish to pay. For example, when depositing money into their eWallet.

Amount must follow below requirements or the request will be rejected:

  • Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
  • The minimum and maximum amounts depend on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
  • Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
  • Trailing zeroes are permitted.

Valid examples: 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5

Not valid examples: 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32

msisdn
string

If specified, this phone number will be used to collect the deposit. If not specified, the customer paying can specify the phone number that they want to pay from.

The format is described in Wikipedia.

MSISDN validation has following rules:

  • Only digits without whitespaces or any other separators or prefixes like '+'.
  • Should not start with zero.
  • Country code is mandatory.
  • Should not exceed or be less than the valid length of specified country.

Valid examples for Zambia: 260763456789

Not valid examples for Zambia: +260763456789, 260 763 456789, 260-7634-56789, 0260763456789, 2607634567, 260763456789543, 999558708954, 37255870895

language
enum<string>

The language in which the Payment Page will be presented to the customer. If the user has explicitly changed their languages preferences, their selection will override this parameter.

Available options:
EN,
FR
country
string

If specifified, allows payment from phone numbers only from a specific country. If not specified, the customer can select any country that is configured for your account in pawaPay.

You can use the active configuration endpoint to verify which counrties and MMOs have been configured for your account.

Format must be the ISO 3166-1 alpha-3, three character country code in upper case. Read more from Wikipedia.

reason
string

Optional text which will be displayed to the customer on the payment page to specify what they are paying for.

metadata
object[]

A list of metadata that you can attach to the payment for providing additional context about the payment. For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to.

Metadata will not be visible to the customer that is party to this payment. It will be visible in the pawaPay Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation. It is also possible to search for recent payments in the pawaPay Dashboard using global search based on the values of metadata.

Up to 10 metadata fields can be attached to a payment.

Response

200 - application/json
redirectUrl
string

The unique URL of the payment page for this specific payment session. Customer has to be forwarded to this URL where they can complete the payment. The session is valid for 15 minutes for the customer to complete the payment.

Please note! The URL is valid for 5 minutes.