POST
/
v1
/
widget
/
sessions
curl --request POST \
  --url https://api.sandbox.pawapay.io/v1/widget/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "depositId": "<INSERT_UUID_FOR_DEPOSIT>",
  "returnUrl": "https://merchant.com/paymentProcessed",
  "statementDescription": "Note of 4 to 22 chars",
  "amount": "15",
  "msisdn": "260763456789",
  "language": "EN",
  "country": "ZMB",
  "reason": "Ticket to festival",
  "metadata": [
    {
      "fieldName": "orderId",
      "fieldValue": "ORD-123456789"
    },
    {
      "fieldName": "customerId",
      "fieldValue": "customer@email.com",
      "isPII": true
    }
  ]
}'
{
  "redirectUrl": "https://paywith.pawapay.io/?token=AgV4aA3ZxKfGcdMIo6a6Upf7X2MRptdFUrc6Oi3U53CxC0YAkAADABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREFzdDR5WktOeWVTRTZ5bTdhVTJJeno3bG1ydkFYenFpUWZqNVQxbGQ2RUgweEpkZVZ0cWJGM3hwMzI1VWN6VGxEdz09AAdwdXJwb3NlAA5jcmVhdGUtc2Vzc2lvbgAFc3RhZ2UAD3NpZ24tY2xvdWRmcm9udAACAAdhd3Mta21zAE5hcm46YXdzOmttczpldS1jZW50cmFsLTE6MTAxOTQ0Mzc3ODY2OmtleS82ZTgzZmVjMS00MWRhLTQxMWQt"
}

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
header
required

Body

application/json

Response

200
application/json
Payment Page session is created successfully

The response is of type object.