Overview

The API endpoint for the live server is https://api.peachpayments.com/v1/checkout/refund.

A refund can be performed against a successful payment, referencing the unique payment ID provided in the payment status request or in the successful payment webhook.

Perform the refund by sending a POST request over HTTPS to the API endpoint. The POST request must contain the authentication parameters, a payment type, refund amount, refund, and currency. The paymentType parameter must be set to RF.

Parameters

ParameterDescriptionFormatCondition
authentication.entityIdThe entity for the
request. By default this
is the channel's ID.
AN32
[a-f0-9]{32}
Required
amountIndicates the amount of
the payment request.
The dot is used as the
decimal separator.
N10.N2
[0-9]{1,10}(.[0-9]{2})?
Required
paymentTypeThe payment type for
the request. The RF type is supported.
A2Required
currencyThe currency code of
the payment request
amount.
A3
[A-Z]{3}
Required
idThe unique identifier of
the initial payment that
is being refunded
AN32
[a-f0-9]{32}
Required
signatureThe signature for the
request.
AN64
[a-f0-9]{64}
Required

📘

All refund requests require a signature and all responses are signed with a signature using the secret token as the key.

Example request

curl --location --head 'https://testapi.peachpayments.com/v1/checkout/refund' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'amount=5' \
--data-urlencode 'authentication.entityId=8ac7a4ca7802ed8e0178176ca52222dz' \
--data-urlencode 'id=8ac7a4a284c684140184c7a8f19a553z' \
--data-urlencode 'currency=ZAR' \
--data-urlencode 'paymentType=RF' \
--data-urlencode 'signature=714187e25b25052701ad05cd28ef2be17707868197124595ab5747b3573b7e0z'

Example concatenated string: amount5.00authentication.entityId8ac7a4ca7802ed8e0178176ca52222dzcurrencyZARid8ac7a4a284c684140184c7a8f19a553zpaymentTypeRF