Skip to main content
Use refunds for paid transactions that need full or partial reversal.

Refund operation

PUT /v2/transactions/{id}/refund

Example request

curl --request PUT \
  --url https://api.pagou.ai/v2/transactions/tr_1001/refund \
  --header "Authorization: Bearer YOUR_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "amount": 500,
    "reason": "requested_by_customer"
  }'

Example response

{
  "success": true,
  "requestId": "req_1202",
  "data": {
    "transaction_id": "tr_1001",
    "status": "partially_refunded",
    "refunded_amount": 500
  }
}

Common error

Status 409
{
  "type": "https://api.pagou.ai/problems/conflict",
  "title": "Conflict",
  "status": 409,
  "detail": "The transaction cannot be refunded in its current state."
}
Fix: reconcile the transaction first and allow refunds only from eligible paid states in your own product and operator tooling.

Operational rules

  • Use your own refund request ID or ticket ID to prevent duplicate actions.
  • Persist the refund request, the transaction ID, and the resulting transaction status.
  • Update customer-visible finance state only after webhook confirmation or reconciliation.

Next steps