Payouts API

Overview

A payments request submits data for a payments batch, which can be for creditors, salaries, or wages. After submitting a payment batch, the API performs a CDV check on the provided account details and the response includes any accounts that fail the check. Processing continues for any accounts that pass the CDV check.

If a bank rejects an account (often because of account closure), the API creates an unpaids response and POSTs it back to the callback URL provided. The API submits all response data as form data in a POST action, that is application/x-www-form-urlencoded with the key response.

Request URL

https://www.peachpay.co.za/API/Payments?key=yourkey

Request structure

A payments request consists of three separate sections with a root parameter called APIPaymentsRequest. The Header section contains information on the payments batch, the Payments section is a collection of account details that you must use as the destination for the payments, and the Totals section verifies that the information sent is complete and correct.

Header

A payments request has a single Header section with the following parameters:

ParameterDescriptionCondition
PsVerThe version of the Peach Payments file format. 2.0.1.Required
ClientYour unique client code.Required
ServiceThe code of the service. See below for the service codes.Required
ServiceTypeThe payment service type. See below for the service types.Required
DueDateThe date to submit the batch to the bank for processing.Required
BankAccountThe bank account used to deposit the funds. Used to display the Peach Payments account details for your bank account.Optional
CallBackUrlUse this callback URL to send back unpaids.Required
ReferenceThe reference used to identify the batch for reporting.Required
UniqueIdUsed to prevent duplicate requests.Optional

Payment service codes

The following service codes are available for payments:

  • Wages: For wage payments.
  • Salaries: For salary payments.
  • Creditors: For creditor payments.

Payment service types

The following service types are available for payments:

  • 1Day: For 1-day payments.
  • SDV: For SDV payments.
  • RTC: For real-time payments.

Payments

A payments request has a single Payments section with multiple FileContents sections with the following parameters:

ParameterDescriptionCondition
InitialsThe payment recipient's initials.Optional
FirstNamesThe payment recipient's first names.Required
SurnameThe payment recipient's surname or company name.Required
BranchCodeThe branch code of the account where you're depositing the payment.Required
AccountNumberThe account number where you're depositing the payment.Required
FileAmountThe deposit amount.Required
AmountMultiplier1 if the FileAmount is in rands, otherwise 100 if the FileAmount is in cents.Required
AccountTypeThe account type where the funds will be deposited. Leave it blank or use 0 if the account type isn't known. 06 are accepted.Optional
CustomerCodeThe customer code used to identify the payment in your system.Optional
ReferenceThe reference that appears on the recipient's bank statement.Required

Totals

A payments request has a single Totals section with the following parameters:

ParameterDescriptionCondition
RecordsThe total number of payment records you're submitting.Required
AmountThe total value of the payment records you're submitting.Required
BranchHashThe sum of all the branch codes for the payment records.Required
AccountHashThe sum of all the account numbers for the payment records.Required

Example request

<APIPaymentsRequest>
 <Header>
  <PsVer>2.0.1</PsVer>
  <Client>ZER001</Client>
  <DueDate>20200625</DueDate>
  <Service>Creditors</Service>
  <ServiceType>1day</ServiceType>
  <Reference>Example Batch</Reference>
  <CallBackUrl>https://example.com/Callback</CallBackUrl>
 </Header>
 <Payments>
  <FileContents>
   <Initials>EX</Initials>
   <FirstNames>Example</FirstNames>
   <Surname>Recipient</Surname>
   <BranchCode>632009</BranchCode>
   <AccountNumber>123456789</AccountNumber>
   <FileAmount>549.01</FileAmount>
   <AccountType>0</AccountType>
   <AmountMultiplier>1</AmountMultiplier>
   <CustomerCode>EXA9292</CustomerCode>
   <Reference>Example Reference</Reference>
  </FileContents>
 </Payments>
 <Totals>
  <Records>1</Records>
  <Amount>549.01</Amount>
  <BranchHash>632009</BranchHash>
  <AccountHash>123456789</AccountHash>
 </Totals>
</APIPaymentsRequest>

Response structure

The standard response structure includes an extra parameter called BatchValueSubmitted which contains the total value of the batch submitted (less any accounts that failed the CDV check).

If any of the payments FileContents records failed the CDV check, the API returns them as a CDVResults parameter with a collection of Result parameters describing the rejection reasons. The Result section consists of the following parameters:

ParameterDescription
ResultThe result of the CDV check. Always Invalid for a failed account.
MessageThe rejection reason.
AccountNumberThe account number that failed the CDV test.

📘

If any of the accounts pass the CDV check, the bank accepts the batch for processing.

Example response

<Response>
 <Result>OK</Result>
 <BatchCode>285902</BatchCode>
 <BatchValueSubmitted>549.01</BatchValueSubmitted>
 <TotalFeeExcludingVAT>2.00</TotalFeeExcludingVAT>
 <CDVResults>
  <Result>
   <AccountNumber>123456789</AccountNumber>
   <BranchCode>632009</BranchCode>
   <CustomerCode>EXA9292</CustomerCode>
   <Reference>Example Reference</Reference>
   <Result>Valid</Result>
  </Result>
 </CDVResults>
</Response>

Unpaids

An unpaid occurs when the bank rejects a payment. This can happen for different reasons, such as the closure of the recipient's account. When this happens, the API POSTs an unpaid response back to your server using the CallBackUrl provided in the initial request.

🚧

The unpaid responses can continue for several days after the batch submission.

The Response root parameter consists of the following parameters:

ParameterDescription
ResultAlways OK.
BatchCodeThe unique code for the batch that the unpaids belong to.
PaymentResultsThe collection of Results parameters with more information about each unpaid.

The PaymentResults section consists of the following parameters:

ParameterDescription
FirstNameThe payment recipient's first name.
SurnameThe payment recipient's surname.
BranchCodeThe branch code of the account where you're depositing the payment.
AccountNumberThe account number where you're depositing the payment.
CustomerCodeThe customer code used to identify the payment in your system.
ReferenceThe reference that would have appeared on the recipient's bank statement.
ResultThe result status. Always Rejected for an unpaid.
ResultMessageThe unpaid reason.

Example unpaids

<Response>
 <Result>OK</Result>
 <BatchCode>30104</BatchCode>
 <PaymentResults>
  <Result>
   <AccountNumber>123456789</AccountNumber>
   <BranchCode>632005</BranchCode>
   <FirstName>Example</FirstName>
   <Surname>Callback</Surname>
   <Reference>SALARY</Reference>
   <CustomerCode>000001</CustomerCode>
   <Result>Rejected</Result>
   <ResultMessage>ACCOUNT CLOSED</ResultMessage>
  </Result>
 </PaymentResults>
</Response>

Postman collection

See the Peach Payments Postman collection for sample calls.

Run in Postman