v1

latestOpenAPI 3.1.02026-07-228956435.8 KB
Payment intents

Create a payment intent

Creates a payment intent that charges a previously saved payment method, in the live or test mode of the API key used. Unlike POST /v1/payment_intents, which starts a customer-present flow completed through the Fintoc widget, this endpoint charges the payment_method directly, with no customer interaction and no widget token. This endpoint does not accept v1-only parameters such as recipient_account, customer_email, payment_type, or expires_at. The charge starts in the created status; Fintoc processes the charge asynchronously, so subscribe to webhooks to track the charge's progress. Available for organizations on API version 2026-02-01 or later.

post/payment_intents

Request body

amountinteger required

Amount to charge, in the smallest unit of the currency. CLP has no decimals, so 5000 is $5000 CLP; MXN amounts are expressed in centavos, so 5000 is $50.00 MXN. Must be greater than zero and at most 2147483647.

currency'CLP' | 'MXN' required

Three-letter ISO 4217 currency code, in uppercase. One of CLP or MXN.

payment_methodstring required

The id of the payment method to charge. The payment method must belong to your organization and match the mode of the API key used.

metadataobject

Set of key-value pairs to attach to the payment intent. Up to 50 pairs, with keys of up to 40 characters and values of up to 500 characters. Nested objects and arrays are not allowed.

Example request

{
  "amount": 5000,
  "currency": "CLP",
  "payment_method": "pm_2bArifJWQ6CiZSofWxBNL1Hri2u",
  "metadata": {
    "order_id": "12345"
  }
}

Response

Payment intent created. The charge starts in the created status; Fintoc processes the charge asynchronously.

idstring required

Unique identifier of the payment intent.

object'payment_intent' required

Type of the object. Always payment_intent.

amountinteger required

Amount of the payment intent, in the smallest unit of the currency (for example, 100000 for 100000 CLP, since CLP has no minor unit, or 7050 for 70.50 MXN).

created_atstring date-time required

ISO 8601 timestamp of when the payment intent was created.

currency'CLP' | 'MXN' required

Three-letter ISO 4217 currency code of the payment intent. One of CLP or MXN.

customer_emailstring nullable required

Email address of the customer that receives payment notifications. null when not provided.

error_reasonstring nullable required

Reason why the payment failed, was rejected, or expired. null while the payment is in progress and when it succeeds.

expires_atstring date-time nullable required

ISO 8601 timestamp of when the payment expires and can no longer be paid. Only set for cash payments; null otherwise.

metadataobject required

Set of key-value pairs attached to the payment intent.

mode'test' | 'live' required

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

next_actionobject nullable required

Action the customer must complete to continue the payment, as reported by the widget. null when no action is pending.

payment_methodstring nullable required

Identifier of the payment method used to pay, when the payment intent comes from a checkout session or a subscription. null otherwise.

payment_typestring required

Payment type used to pay, such as bank_transfer or cash.

reference_idstring nullable required

Identifier of the transfer assigned by the institution. null until the transfer is executed.

status'created' | 'failed' | 'succeeded' | 'rejected' | 'in_progress' | 'pending' | 'expired' required

Status of the payment intent. One of created (the customer has not started the payment), in_progress (the customer is paying), succeeded (the money reached the recipient account), rejected (the institution rejected the transfer), failed (the payment could not be completed), expired (the payment intent expired before being paid), or pending (the final status is not yet known; only used if your organization has the pending status enabled).

subscriptionstring nullable required

Identifier of the subscription that originated the payment intent. null for one-off payments.

transaction_datestring date-time nullable required

ISO 8601 timestamp of when the institution executed the transfer. null until the transfer is executed.

widget_tokenstring nullable required

Token used to initialize the Fintoc widget for this payment intent. Only returned when the payment intent is created; null in every other response.

Example response

{
  "id": "pi_BO381oEATXonG6bj",
  "amount": 100000,
  "created_at": "2021-10-15T15:23:11.474Z",
  "currency": "CLP",
  "customer_email": "jon.snow@example.com",
  "error_reason": "insufficient_funds",
  "metadata": {
    "order_id": "9182"
  },
  "mode": "live",
  "payment_method": "pm_1x7vKQ8oEATXonG6",
  "payment_type": "bank_transfer",
  "payment_type_options": {},
  "recipient_account": {
    "holder_id": "111111111",
    "institution_id": "cl_banco_de_chile",
    "number": "123456789",
    "type": "checking_account"
  },
  "reference_id": "90123712",
  "sender_account": {
    "holder_id": "111111111",
    "institution_id": "cl_banco_estado",
    "number": "123456789",
    "type": "checking_account"
  },
  "status": "succeeded",
  "subscription": "sub_dJOd4hcZby9XK1Lm",
  "transaction_date": "2021-10-15T15:24:15.474Z",
  "widget_token": "pi_BO381oEATXonG6bj_sec_aBcDeFgHiJkLmNoP"
}