v1

latestOpenAPI 3.1.02026-07-228956435.8 KB
Payment links

Cancel a payment link

Cancels an active payment link. A canceled payment link stops accepting payments and cannot be reactivated. Only payment links matching the live or test mode of the API key can be canceled.

patch/payment_links/{id}/cancel

Path parameters

idstring required

Unique identifier of the payment link to cancel.

Response

The canceled payment link, with status set to canceled.

idstring required

Unique identifier of the payment link.

object'payment_link' required

Type of the object. Always payment_link.

amountinteger required

Amount to collect, in the smallest unit of currency. For example, 5000 represents 5000 CLP, since CLP has no minor unit, or 50.00 MXN.

checkoutobject required

Checkout customization. The description key holds the text shown next to the buy button, or null when you do not set it.

created_atstring date-time required

ISO 8601 datetime in UTC of when the payment link was created.

currency'CLP' | 'MXN' required

Three-letter ISO 4217 currency code. One of CLP (Chilean peso) or MXN (Mexican peso).

customer_emailstring nullable required

Email address of your customer, used for transaction notifications. null when not provided on creation.

expires_atstring date-time nullable required

ISO 8601 datetime in UTC of when the payment link expires. null when the payment link does not expire.

metadataobject required

Set of key-value pairs attached to the payment link on creation.

mode'test' | 'live' required

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

status'active' | 'expired' | 'canceled' required

Status of the payment link. One of active (accepts payments), expired (the expiration date passed), or canceled (you canceled the link).

urlstring required

URL of the page where your customer pays.

Example response

{
  "id": "plink_K2zwNNSxPyx8w3GZ",
  "amount": 5000,
  "checkout": {
    "description": "Premium subscription"
  },
  "created_at": "2024-04-04T15:23:11.474Z",
  "currency": "CLP",
  "customer_email": "customer@example.com",
  "expires_at": "2024-04-05T15:23:11.474Z",
  "metadata": {
    "order_id": "1234"
  },
  "mode": "live",
  "recipient_account": {
    "holder_id": "111111111",
    "institution_id": "cl_banco_de_chile",
    "number": "123456789",
    "type": "checking_account"
  },
  "status": "active",
  "url": "https://pay.fintoc.com/plink_K2zwNNSxPyx8w3GZ"
}