Skip to main content
POST
/
v2
/
payouts
/
bulk
Initiate bulk payouts
curl --request POST \
  --url https://api.sandbox.pawapay.io/v2/payouts/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "payoutId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
    "recipient": {
      "type": "MMO",
      "accountDetails": {
        "phoneNumber": "260763456789",
        "provider": "MTN_MOMO_ZMB"
      }
    },
    "clientReferenceId": "INV-123456",
    "customerMessage": "Note of 4 to 22 chars",
    "amount": "15",
    "currency": "ZMW",
    "metadata": [
      {
        "orderId": "ORD-123456789"
      },
      {
        "customerId": "customer@email.com",
        "isPII": true
      }
    ]
  }
]'
[
{
"payoutId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
"status": "ACCEPTED",
"created": "2020-10-19T11:17:01Z"
},
{
"payoutId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
"status": "DUPLICATE_IGNORED",
"created": "2020-10-19T10:22:49Z"
},
{
"payoutId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
"status": "REJECTED",
"failureReason": {
"failureCode": "AMOUNT_TOO_LARGE",
"failureMessage": "Amount should not be greater than 1000"
}
}
]
The bulk payout endpoint allows you to pay multiple customers with a single request.

Check the guide!

Follow the step-by-step guide on how to build a payment flow using payouts.When sending them in bulk, the same logic applies for each individual payout.
  • Bulk requests with more than 20 payout transactions may be rejected by pawaPay.
  • This API call is idempotent, which means it is safe to submit a request with the same payoutId multiple times.
  • Duplicate requests with the same payoutId will be ignored with the DUPLICATE_IGNORED status in the response.
  • Since the request can be rejected, you must check the status code in the response for each submitted request. The failureReason in the response will contain information about the reason of the rejection.
  • Callback will be delivered separately for each payout in the bulk request as the payouts are resolved to their final status.
Each individual request can get one of the statuses on initiation:
StatusDescription
ACCEPTEDYesThe payout has been accepted by pawaPay for processing.
REJECTEDNoThe payout has been rejected. See failureReason for details.
DUPLICATE_IGNOREDNoThe payout has been ignored as a duplicate of an already accepted payout. Duplication logic relies upon payoutId.

How do i find out the final statuses of these payouts?

As the pawaPay Merchant API is an asynchronous API, you can find out the final status of the ACCEPTED payout by either:
Headers related to signatures must only be included if you have enabled “Only accept signed requests”. Read more about it from the pawaPay Dashboard documentation.

Authorizations

Authorization
string
header
required

Headers

Content-Digest
string<string>

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

Signature
string<string>

Signature of the request according to RFC-9421.

Signature-Input
string<string>

Signature input according to RFC-9421.

Accept-Signature
string<string>

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

Accept-Digest
string<string>

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

Body

application/json · object[]
payoutId
string<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.

Required string length: 36
Example:

"f4401bd2-1568-4140-bf2d-eb77d2b2b639"

recipient
object
required

Details about the customer who is paying or receiving the payment.

amount
string
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.
Required string length: 1 - 23
Example:

"15"

currency
string
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:

"ZMW"

clientReferenceId
string

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

Example:

"INV-123456"

customerMessage
string

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.

Required string length: 4 - 22
Example:

"Note of 4 to 22 chars"

metadata
object[]

A list of metadata that you can attach to the payment for providing additional context about the payment. For example, adding the channel from which the payment was initated, product ID or anything else that might help your operations team.

Metadata will be included in:

  • In the dashboard on payment details pages
  • Financial statements as JSON object
  • Callbacks

Metadata can be used when searching in the pawaPay Dashboard. Full value of the metadata field must be used for searches.

Metadata will not be visible to the customer that is involved in this payment.

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

Example:
[
{ "orderId": "ORD-123456789" },
{
"customerId": "customer@email.com",
"isPII": true
}
]

Response

Request has been processed by pawaPay

payoutId
string<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.

Required string length: 36
Example:

"f4401bd2-1568-4140-bf2d-eb77d2b2b639"

status
enum<string>
required

The initiation status of the payout:

  • ACCEPTED - The payout has been accepted by pawaPay for processing.
  • REJECTED - The payout request has been rejected by pawaPay. See failureReason for details.
  • DUPLICATE_IGNORED - The payout has been ignored as a duplicate of and already accepted payout. Deduplication is based on payoutId.
Available options:
ACCEPTED,
REJECTED,
DUPLICATE_IGNORED
created
string<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:

"2020-02-21T17:32:29Z"

failureReason
object