v1

latestOpenAPI 3.0.02026-07-2627149175.2 KB
payment-page

Deposit via Payment Page

post/v2/paymentpage

Request body

depositIdstring uuid required

A UUIDv4 based unique ID for this payment. We require you to provide the unique ID for all initiated payments to ensure you can always reconcile all payments. Please store this ID in your system before initiating the payment with PawaPay.

returnUrlstring uri required

The URL the customer should be redirected to after the payment is processed.

customerMessagestring

A short narration for the transaction. Depending on the 'provider', this message may be visible to the customer in the SMS receipt or within their transaction history.

Defaults to your company name as registered on your PawaPay account trimmed to fit the length limitations.

phoneNumberstring

The phone number (MSISDN) of the customer paying or receiving payment. The format is described in Wikipedia.

Use predict provider to validate and sanitise the phone number.

Phone number 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.
language'EN' | 'FR'

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.

countrystring

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 countries and providers 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.

reasonstring

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

Example request

{
  "depositId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "returnUrl": "https://merchant.example.com/checkout-result",
  "customerMessage": "Note of 4 to 22 chars",
  "amountDetails": {
    "amount": "15",
    "currency": "ZMW"
  },
  "phoneNumber": "260763456789",
  "language": "EN",
  "country": "ZMB",
  "reason": "Ticket to festival",
  "metadata": [
    {
      "orderId": "ORD-123456789"
    },
    {
      "customerId": "customer@email.com",
      "isPII": true
    }
  ]
}

Response

Payment Page session is created successfully

redirectUrlstring uri

The unique URL for this Payment Page. Customer has to be forwarded to this URL where they can complete the payment.

Please note! The URL is valid for 15 minutes.

Example response

{
  "redirectUrl": "https://paywith.pawapay.io/?token=AgV4aA3ZxKfGcdMIo6a6Upf7X2MRptdFUrc6Oi3U53CxC0YAkAADABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREFzdDR5WktOeWVTRTZ5bTdhVTJJeno3bG1ydkFYenFpUWZqNVQxbGQ2RUgweEpkZVZ0cWJGM3hwMzI1VWN6VGxEdz09AAdwdXJwb3NlAA5jcmVhdGUtc2Vzc2lvbgAFc3RhZ2UAD3NpZ24tY2xvdWRmcm9udAACAAdhd3Mta21zAE5hcm46YXdzOmttczpldS1jZW50cmFsLTE6MTAxOTQ0Mzc3ODY2OmtleS82ZTgzZmVjMS00MWRhLTQxMWQt"
}