Refund
Overview
The API endpoint for the live server is https://api.peachpayments.com/v1/checkout/refund
.
Perform a refund against a successful payment by 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. Set the paymentType
parameter to RF
.
Parameters
Parameter | Description | Format | Condition |
---|---|---|---|
authentication.entityId | The entity for the request. By default this is the channel's ID. | AN32 [a-f0-9]{32} | Required |
amount | The amount of the payment request. The dot is the decimal separator. | N10.N2 [0-9]{1,10}(.[0-9]{2})? | Required |
paymentType | The payment type for the request. The RF type is supported. | A2 | Required |
currency | The currency code of the payment request amount. | A3 [A-Z]{3} | Required |
id | The unique identifier of the initial payment that is being refunded | AN32 [a-f0-9]{32} | Required |
signature | The signature for the request. | AN64 [a-f0-9]{64} | Required |
All refund requests require a signature and the API signs all responses 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
Updated 22 days ago