Skip to main content
POST
/
payment-method
/
{id}
/
payment
/
{paymentId}
/
refund
Refund a payment
curl --request POST \
  --url https://demo.api.harmony.compago.com/api/payment-method/{id}/payment/{paymentId}/refund \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "reason": "Customer requested cancellation"
}
'
{
  "id": "11111111-2222-3333-4444-555555555555",
  "status": "REFUNDED",
  "amount": 123,
  "currency": "MXN"
}

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required

The unique identifier of the payment method

paymentId
string<uuid>
required

The unique identifier of the payment to refund

Body

application/json

Request body for refunding a payment. Refunds are always for the full charge amount.

reason
string

Reason for the refund. Useful for accounting and auditing purposes.

Example:

"Customer requested cancellation"

Response

Payment refunded successfully

Response after refunding a payment

id
string<uuid>
required

Unique identifier of the payment

Example:

"11111111-2222-3333-4444-555555555555"

status
enum<string>
required

Payment status after refund

Available options:
REFUNDED
amount
number<decimal>
required

The refunded amount

currency
string
required
Example:

"MXN"