split-payments

Initiate split payment

Changed on
post/v2/split-payments

Request

  • Base URL
    https://api.sandbox.pawapay.io
  • URL
    https://api.sandbox.pawapay.io/v2/split-payments
  • Auth
    HTTP bearer

Headers

Content-Digeststring string

SHA-256 or SHA-512 hash of the request body.

Signaturestring string

Signature of the request according to RFC-9421.

Signature-Inputstring string

Signature input according to RFC-9421.

Accept-Signaturestring string

Expected signature algorithm of the response according to RFC-9421.

Accept-Digeststring string

Expected digest algorithm of the response according to RFC-9421.

Request body

splitPaymentIdstring 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.

clientReferenceIdstring

A reference to an entity in your system that this payment relates to. For example, an invoice ID, customer ID etc.

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.

amountstring required

The amount of the payment.

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

  • Not all providers support decimals. Find which ones do from providers or dynamically using active configuration endpoint.
  • Transaction limits apply. 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.
currencystring required

The currency in which the amount is specified.

Format must be the ISO 4217 three character currency code in upper case. Read more from Wikipedia.

Find the supported currencies for the provider.

The active configuration endpoint has all the providers configured for your account together with the supported currencies.

Example request

{
  "splitPaymentId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "payer": {
    "type": "MMO",
    "accountDetails": {
      "phoneNumber": "260763456789",
      "provider": "MTN_MOMO_ZMB"
    }
  },
  "clientReferenceId": "INV-123456",
  "customerMessage": "Note of 4 to 22 chars",
  "splits": [
    {
      "amount": "15",
      "recipient": {
        "type": "MMO",
        "accountDetails": {
          "phoneNumber": "260763456789",
          "provider": "MTN_MOMO_ZMB"
        }
      },
      "customerMessage": "Note of 4 to 22 chars"
    }
  ],
  "amount": "15",
  "currency": "ZMW",
  "metadata": [
    {
      "orderId": "ORD-123456789"
    },
    {
      "customerId": "customer@email.com",
      "isPII": true
    }
  ]
}

Response

Request has valid payload. See status to confirm if the split payment was accepted for processing.

splitPaymentIdstring 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.

status'ACCEPTED' | 'REJECTED' | 'DUPLICATE_IGNORED' required

The initiation status of the split payment:

  • ACCEPTED - The split payment has been accepted by PawaPay for processing.
  • REJECTED - The split payment has been rejected. See failureReason for details.
  • DUPLICATE_IGNORED - The split payment has been ignored as a duplicate of an already accepted split payment. Deduplication is based on splitPaymentId.
createdstring date-time

The timestamp of when the payment was created in the PawaPay platform. Format defined by 'date-time' in RFC3339 section 5.6 from IETF

Example response

{
  "splitPaymentId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "created": "2020-02-21T17:32:29Z",
  "failureReason": {
    "failureCode": "PAYOUT_EXCEEDS_DEPOSIT",
    "failureMessage": "The total split payout amount is greater than the deposit amount."
  }
}

Changes