Refund a payment
Refund all or part of an ICEPAY payment through the ICEPAY Checkout API.
Use the refund endpoint when funds need to be returned to the customer after a payment has been completed.
ICEPAY supports both full and partial refunds. Multiple partial refunds can be created, as long as the total refunded amount does not exceed the original payment amount.
For general information about refund availability and processing, see Refunds.
Payment key
Section titled “Payment key”To create a refund, use the unique payment key returned when the original payment was created.
For example:
pi-01j1ps8zf4jgnk0c3dnd477sp1The refund is created against this payment.
Request
Section titled “Request”Send the refund details to ICEPAY.
The refund amount uses the same currency as the original payment, so you only need to provide the amount value.
Use the refund reference to associate the refund with a record in your own system.
Store the refund key
Section titled “Store the refund key”A successfully created refund has its own unique key, separate from the payment key.
For example:
pr-01j1sr38kspvq2z5xek20y565wStore this key with the refund in your system so you can identify it when processing subsequent payment updates.
Refund status
Section titled “Refund status”A refund returned by the API can have the following statuses:
| Status | Description |
|---|---|
pending |
ICEPAY is still processing the refund. |
completed |
ICEPAY has completed its part of the refund process. |
A completed refund does not necessarily mean the funds are already visible in the customer’s account. The final processing time can depend on the payment method, issuer, or bank.
Process refund updates
Section titled “Process refund updates”If a refund is initially pending, do not continuously poll the API for its status.
When the refund changes to completed, ICEPAY sends a webhook to the webhookUrl that was provided when the original payment was created. The payment payload includes a refunds array containing the refunds associated with that payment.
If a payment has multiple refunds, the array contains each refund separately.
Use the refund key to determine which refund has changed and make sure you do not process the same completed refund more than once.
For details about receiving and verifying these notifications, see Process webhooks.
Continue with the API
Section titled “Continue with the API”Forward part of a payment to another ICEPAY merchant.
Return to the Checkout API integration overview.

