Skip to main content

Refunds

Refunds allow PSPs only to return funds for a previously completed pay-in.
The refunded amount is sent back to the original external customer who made the payment to your merchant/customer.

Developers cannot initiate refunds.
Refunds are strictly a PSP operation.

Refund Types

Celar supports two refund types:

  • Full refund

    • Refunds the entire original pay-in amount
    • amount must not be provided
  • Partial refund

    • Refunds a portion of the original pay-in
    • amount mustbe provided

Create a Refund

Endpoint: POST /payments/refund

Request

curl --request POST \
--url https://api.sandbox.celar.io/api/v1/payments/refund \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <your_api_key>' \
--header 'Idempotency-Key: <random_uuid>' \
--header 'Content-Type: application/json' \
--data '{
"celar_walletId": "cw_91806496a0987bed",
"type": "partial",
"paymentId": "payin_0696c85b83d0d946",
"amount": 10
}'

Parameters

FieldRequiredDescription
celar_walletIdYesPSP wallet funding the refund
typeYesRefund type: partial or full
paymentIdYesPay-in ID being refunded
amountConditionalRequired for partial, omitted for full

Response

{
"message": "Refund completed successfully",
"refundId": "refund_eb8ce7aa1602f17d",
"amount": 10,
"tx_hash": "0x9da442bbb3e48800c5260dce6dac2ef5c2d2ce471512c621f8ec94b3fa8f9fbf"
}

Key Fields

  • refundId → unique identifier for the refund
  • tx_hash → on-chain transaction hash for the refund
  • amount → refunded amount (equals full pay-in amount for full refunds)

Attempting to refund more than the original pay-in will fail