v1

latestOpenAPI 3.0.02026-07-2627149175.2 KB
refunds

Initiate refund

post/v2/refunds

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

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

depositIdstring uuid required

The depositId of the deposit to be refunded.

clientReferenceIdstring

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

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

{
  "refundId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "depositId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "clientReferenceId": "INV-123456",
  "amount": "15",
  "currency": "ZMW",
  "metadata": [
    {
      "orderId": "ORD-123456789"
    },
    {
      "customerId": "customer@email.com",
      "isPII": true
    }
  ]
}

Response

Request has been accepted for processing by PawaPay

refundIdstring uuid required

The unique ID for this payment in PawaPay as specified by you during initiation.

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

Possible refund initiation statuses:

  • ACCEPTED - The refund has been accepted by PawaPay for processing.
  • REJECTED - The refund has been rejected by PawaPay. See failureReason for details.
  • DUPLICATE_IGNORED - The refund has been ignored as a duplicate of an already accepted refund. Duplication logic relies upon refundId.
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

{
  "refundId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "created": "2020-02-21T17:32:29Z"
}