Skip to content

Refunds

A refund is money returned to a payer or the act of returning money received earlier. Refunds may be partial (only a part of the amount is refunded) or full (the entire amount is refunded).

You can request a refund of the payment from Corefy if the payment service used for the transaction provides such an option and if you have sufficient funds to refund in the linked currency account. You can also request multiple partial refunds until the sum of the transactions becomes 0.00 in the used currency.

Keep in mind

This page reflects the new refund model. For more information, please contact your support.

Note

You can retrieve the list of all refunds for an invoice via GET /payment-invoices.

API Reference — Create Refund

  • API: PRIVATE
  • Authentication: BasicAuth
  • Endpoint: /api/payment-invoices/{id}/refund
  • Method: POST

Required Fields

Field Type Description
type enum Operation type. For this API, set to refund.
amount number The refund amount (float). Example: 100.55.
invoiceId string The ID of the invoice to refund.

Additional Fields

Field Type Description
reference_id string Unique identifier of the operation on the merchant side. Required — if omitted, the system returns 422.
description string Free‑form description of the refund (e.g., “Refund by order”).

Request

{
  "data": {
    "type": "refund",
    "attributes": {
      "invoiceId": "cpi_E6GOlfKlHuG43dXq",
      "amount": 10,
      "reference_id": "8d1b7ba8-9db9-4153-bb61-4c0d72796b9b",
      "description": "Refund by order"
    }
  }
}

Response — Example

{
  "data": {
    "type": "refunds",
    "id": "ref_spgCbJh7HNH9JzvL",
    "attributes": {
      "reference_id": "8d1b7ba8-9db9-4153-bb61-4c0d72796b9b",
      "original_id": null,
      "description": "Refund by order",
      "status": "processed",
      "amount": 100,
      "fee": 0,
      "currency": "UAH",
      "created": 1758704170
    },
    "links": {
      "self": "/refunds/ref_spgCbJh7HNH9JzvL"
    }
  }
}

Statuses

The following table lists possible refund statuses and whether they are final (no more state changes) or non‑final (may transition further).

Status Description Final?
created Created.
processing In processing by the platform.
process_error Processing error; can be continued.
process_pending Waiting for finalisation.
process_failed Unsuccessful refund attempt.
processed Successful refund.
cancelled Refund cancelled.

Errors & Validation

Some problems during synchronous refunds. In such cases, attempting another refund before the previous one is final will fail.

HTTP Code Error (short) Explanation
422 Next refund attempted while the previous one isn’t final Since refunds can be processed synchronously, initiation of the next refund is available only after the previous one finishes.
422 Refund amount exceeds the remaining refundable balance The amount must not exceed the remaining refundable balance (cannot be lower than the invoice processed_amount).

Important Notes

  • For partial statements with incomplete amounts, the platform may apply hold rollback + correct refund or fail the current refund and create another.
  • Refund transactions have no reverse action. If funds were returned erroneously, request a chargeback.