A captured transaction can be refunded by calling the POST /transactions/{transaction_id}/refunds API. Refunds can be full or partial.

If the transaction was not yet successfully captured, the operation will fail. Authorized transactions can be voided instead.

curl -i -X POST "https://api.example.gr4vy.app/transactions/fe26475d-ec3e-4884-9553-f7356683f7f9/refunds" \
    -H "Authorization: Bearer [JWT_TOKEN]"
    -H "Content-Type: application/json" \
    -d '{
          "amount": 1299
        }'