Skip to main content
POST
Create Refund

Create Refund

Allows for the creation of a full or partial refund for a previously completed deposit.
- For credit card deposits, the refund is processed to the same card, requiring only deposit identification.
- For other payment methods, beneficiary bank account details are necessary.\

Headers

Content-Type
string
default:application/json
required

Media type of the body sent to the API.

X-Date
string<date-time>
required

ISO8601 Datetime with Timezone (e.g., 2023-05-27T10:00:00Z).

X-Login
string
required

Merchant X-Login API Key.

Authorization
string
required

Authorization control hash, calculated as explained in the Eron documentation.

X-Idempotency-Key
string

Unique idempotency key to prevent duplicate processing of the same request.

Body

application/json

Details for the refund request.

deposit_id
integer
required

Eron deposit_id. It is obtained when creating the deposit. Must be a valid deposit_id of a completed deposit.

invoice_id
string
required

The invoice_id you sent while creating the deposit or the merchant_invoice_id auto-generated by Eron. Must be a valid invoice_id of a completed deposit.

Maximum string length: 128
amount
number<double>

Amount to refund. Positive, up to 2 decimal places. Must be equal to or smaller than the deposit amount. If not sent, a full refund is assumed.

bank_account
BankAccount · object

Contains the beneficiary's bank account details. Required for refunds to bank accounts (not for credit card refunds).

comments
string

Optional comments about the refund.

Maximum string length: 200
notification_url
string<uri>

Valid HTTPS URL (URI) used to send asynchronous notifications about the refund's status changes.

Maximum string length: 2048

Response

Refund request accepted and processing initiated, or completed synchronously (for some credit card refunds). The response structure might be more detailed for synchronously processed credit card refunds.

refund_id
string

Unique ID for the created refund. This might be an integer or a string depending on the refund method.

deposit_id
integer

Eron deposit_id. Returned for synchronously processed credit card refunds.

merchant_invoice_id
string

The merchant_invoice_id. Returned for synchronously processed credit card refunds.

refund_info
RefundInfo · object

Detailed information about the refund, often provided for synchronous credit card refund processing.