AXCS Refund
A refund sends the money from a card payment back to the customer’s card. You start it with one API call from your backend.
Before you start
You can refund a payment when:
- It is a card payment taken through the Card Payment SDK.
- Its status is
AUTHORIZED. - It has not been refunded already. Each payment can be refunded only once.
You need the payment’s transaction ID. It is the ulid returned when you confirmed the payment.
Refund a payment
From your backend, call the Refund transaction API with the transaction ID in the URL. There is no request body. Authenticate with your API key (see Authentication).
Never call this API from the browser. Your API key must stay on your server.
If the refund works, you get back the transaction ID and its new status:
When a refund fails
If the payment can’t be refunded, you get a 400 response with an error message:
If the transaction ID doesn’t exist, or belongs to another company, you get a 404 response instead.
Try it on demo
On the demo environment (https://public-api.demo.alphax.asia), take a payment with one of the AXCS test cards, then refund it with the call above.
