v1

latestOpenAPI 3.1.02026-07-228956435.8 KB
Refunds

Cancel a refund

Cancels a refund by its id. Only refunds in pending status can be canceled; once Fintoc starts disbursing the funds, the refund cannot be canceled.

post/refunds/{id}/cancel

Path parameters

idstring required

The id of the refund to cancel.

Response

Refund canceled. The returned refund has canceled status.

idstring required

Unique identifier of the refund.

object'refund' required

Type of the object. Always refund.

amountinteger required

Amount refunded, as an integer in the smallest unit of currency (for example, 5000 for $5000 CLP, since CLP has no minor unit).

created_atstring date-time required

ISO 8601 timestamp of when the refund was created.

currency'CLP' | 'MXN' required

Three-letter ISO 4217 currency code. Always matches the currency of the refunded resource.

failure_codestring nullable required

Reason why the refund failed. One of fraud_risk (the disbursement was blocked by Fintoc's fraud checks) or insufficient_funds (your organization did not have enough funds to cover the refund). null unless the refund failed.

metadataobject required

Set of key-value pairs attached to the refund when it was created.

mode'test' | 'live' required

Mode of the object. live objects use real institution data, test objects use fake data for integration testing.

resource_idstring required

ID of the refunded resource.

resource_type'payment_intent' required

Type of the refunded resource. Always payment_intent.

status'pending' | 'in_progress' | 'succeeded' | 'failed' | 'canceled' required

Current status of the refund. One of pending (the disbursement has not started), in_progress (Fintoc is disbursing the funds), succeeded (the funds reached the recipient account), failed (the disbursement failed; see failure_code), or canceled (the refund was canceled before disbursing).

updated_atstring date-time required

ISO 8601 timestamp of when the refund was last updated.

Example response

{
  "id": "ref_8XzNbCv1LqKjWp4R",
  "amount": 5000,
  "created_at": "2026-03-04T17:04:10Z",
  "currency": "CLP",
  "metadata": {
    "order_id": "9182"
  },
  "mode": "live",
  "recipient_account": {
    "holder_id": "111111111",
    "holder_name": "Jane Doe",
    "institution_id": "cl_banco_de_chile",
    "number": "123456789",
    "type": "checking_account"
  },
  "resource_id": "pi_jsperFI9bnyM2RTo",
  "resource_type": "payment_intent",
  "status": "succeeded",
  "updated_at": "2026-03-04T17:04:10Z"
}