Skip to main content
POST
/
v2
/
deposits
Initiate deposit
curl --request POST \
  --url https://api.sandbox.pawapay.io/v2/deposits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "depositId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
  "payer": {
    "type": "MMO",
    "accountDetails": {
      "phoneNumber": "260763456789",
      "provider": "MTN_MOMO_ZMB"
    }
  },
  "preAuthorisationCode": "<string>",
  "clientReferenceId": "INV-123456",
  "customerMessage": "Note of 4 to 22 chars",
  "amount": "15",
  "currency": "ZMW",
  "metadata": [
    {
      "orderId": "ORD-123456789"
    },
    {
      "customerId": "customer@email.com",
      "isPII": true
    }
  ]
}'
{
"depositId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
"status": "ACCEPTED",
"created": "2020-10-19T11:17:01Z"
}
The deposit endpoint allows you to request a payment from a customer.

Check the guide!

Follow the step-by-step guide on how to build a payment flow using deposits.
  • This API call is idempotent, which means it is safe to submit a request with the same depositId multiple times.
  • Duplicate requests with the same depositId will be ignored with the DUPLICATE_IGNORED status in the response.
  • Since the request can be rejected, you must check the status in the response for each submitted request. The failureReason in the response will contain information about the reason of the rejection.
Each request can get one of the statuses on initiation:
StatusDescription
ACCEPTEDYesThe deposit request has been accepted by pawaPay for processing.
REJECTEDNoThe deposit request has been rejected. See failureReason for details.
DUPLICATE_IGNOREDNoThe deposit request has been ignored as a duplicate of an already accepted deposit request. Duplication logic relies upon depositId.

How to find out the final status of this deposit?

As the pawaPay Merchant API is an asynchronous API, you can find out the final status of the ACCEPTED deposit 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>
Signature
string<string>
Signature-Input
string<string>
Accept-Signature
string<string>
Accept-Digest
string<string>

Body

application/json
depositId
string<uuid>
required
Required string length: 36
Example:
payer
object
required
amount
string
required
Required string length: 1 - 23
Example:
currency
string
required
Example:
preAuthorisationCode
string
Required string length: 1 - 36
clientReferenceId
string
Example:
customerMessage
string
Required string length: 4 - 22
Example:
metadata
object[]
Example:

Response

depositId
string<uuid>
required
Required string length: 36
Example:
status
enum<string>
required
Available options:
ACCEPTED,
REJECTED,
DUPLICATE_IGNORED
created
string<date-time>
Example:
failureReason
object