Refunds
Update a Refund
Atualiza a metadata de um refund.
curl -X POST "https://api.chargefy.io/v1/refunds/re_123" \
-H "Authorization: Bearer {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"order_id": "1001",
"support_ticket": "SUP-42"
}
}'
{
"id": "re_123",
"object": "refund",
"amount": 5000,
"balance_transaction": null,
"charge": "ch_123",
"created_at": "2026-05-20T18:35:00Z",
"currency": "brl",
"customer": "cus_123",
"description": null,
"destination_details": null,
"failure_balance_transaction": null,
"failure_reason": null,
"instructions_email": null,
"livemode": true,
"metadata": {
"order_id": "1001",
"support_ticket": "SUP-42"
},
"next_action": null,
"payment_intent": "pi_123",
"pending_reason": null,
"reason": "requested_by_customer",
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": null,
"updated_at": "2026-05-20T18:40:00Z"
}
Atualiza apenas a
metadata de um refund. Os demais campos são controlados
pelo fluxo financeiro do refund.
ID do refund (
re_*).Pares chave-valor livres associados ao refund. O objeto enviado substitui a
metadata anterior.
curl -X POST "https://api.chargefy.io/v1/refunds/re_123" \
-H "Authorization: Bearer {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"order_id": "1001",
"support_ticket": "SUP-42"
}
}'
{
"id": "re_123",
"object": "refund",
"amount": 5000,
"balance_transaction": null,
"charge": "ch_123",
"created_at": "2026-05-20T18:35:00Z",
"currency": "brl",
"customer": "cus_123",
"description": null,
"destination_details": null,
"failure_balance_transaction": null,
"failure_reason": null,
"instructions_email": null,
"livemode": true,
"metadata": {
"order_id": "1001",
"support_ticket": "SUP-42"
},
"next_action": null,
"payment_intent": "pi_123",
"pending_reason": null,
"reason": "requested_by_customer",
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": null,
"updated_at": "2026-05-20T18:40:00Z"
}
⌘I
curl -X POST "https://api.chargefy.io/v1/refunds/re_123" \
-H "Authorization: Bearer {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"order_id": "1001",
"support_ticket": "SUP-42"
}
}'
{
"id": "re_123",
"object": "refund",
"amount": 5000,
"balance_transaction": null,
"charge": "ch_123",
"created_at": "2026-05-20T18:35:00Z",
"currency": "brl",
"customer": "cus_123",
"description": null,
"destination_details": null,
"failure_balance_transaction": null,
"failure_reason": null,
"instructions_email": null,
"livemode": true,
"metadata": {
"order_id": "1001",
"support_ticket": "SUP-42"
},
"next_action": null,
"payment_intent": "pi_123",
"pending_reason": null,
"reason": "requested_by_customer",
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": null,
"updated_at": "2026-05-20T18:40:00Z"
}

