Manage card payments
Introduction
After processing a preauthorisation transaction (see the paymentType
parameter in the Checkout API reference), you must capture or reverse it.
API endpoints
The API endpoints for the live and sandbox servers are:
- Live:
https://card.peachpayments.com/v1
- Sandbox:
https://sandbox-card.peachpayments.com/v1
Capture a preauthorisation
Use a capture to clear a preauthorisation transaction by transferring funds from the shopper to the merchant. You can capture full or partial amounts and can execute multiple capture requests against the same preauthorisation.
Perform a capture against a preauthorisation transaction by sending a POST request that includes paymentType=CP
over HTTPS to the https://sandbox-card.peachpayments.com/v1/payments/{id}
endpoint and referencing the PA transaction's payment ID.
curl https://sandbox-card.peachpayments.com/v1/payments/{id} \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "amount=10.00" \
-d "currency=ZAR" \
-d "paymentType=CP" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8cXl5ZkhDTjgzZQ=="
Reverse a preauthorisation
Use a reversal to void a preauthorised amount. You can reverse full or partial amounts.
Perform a reversal against a preauthorisation transaction by sending a POST request that includes paymentType=RV
over HTTPS to the https://sandbox-card.peachpayments.com/v1/payments/{id}
endpoint and referencing the PA transaction's payment ID. You cannot reverse a preauthorisation that you have already captured. Since the amount has not cleared, there is no movement of funds and the customer does not see a payment on their account statement.
For full reversals, you do not need to include the amount or currency. If the acquirer supports it, partial reversals are also possible. For partial reversals, you must include the amount and currency in the request.
curl https://sandbox-card.peachpayments.com/v1/payments/{id} \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "paymentType=RV" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8cXl5ZkhDTjgzZQ=="
Updated 3 months ago