Skip to main content
POST
Create a charge
v1 · Base URL https://api.fintoc.com/v1

Authorizations

Authorization
string
header
required

Body

application/json
amount
integer
required

A positive integer in the smallest unit of currency (for example, 1000 for $1000 CLP, since CLP has no minor unit). The maximum depends on the bank of the subscription.

Example:

5000

currency
enum<string>
required

Three-letter ISO 4217 currency code. CLP is the only supported currency.

Available options:
CLP
Example:

"CLP"

subscription_id
string
required

The id of the subscription to charge. The subscription must be active and match the live or test mode of the API key used.

Example:

"sub_m7N9rAWJS9dWDKEe"

business_profile
object

Business on whose behalf the charge is collected. Required for organizations that collect charges on behalf of enrolled merchants.

metadata
object

Set of key-value pairs you can attach to the charge. Useful for storing additional information about the charge in a structured format.

Example:
recipient_account
object

Bank account that receives the funds of the charge. Only used for organizations with recipient accounts enabled; otherwise it is ignored.

Response

The created charge, with status pending. In test mode, the charge status updates asynchronously after creation to simulate the collection.

A charge is a single collection from the bank account of a subscription. You create a charge on an active subscription, and Fintoc collects the charge from the subscription's bank account on the next collection cycle. A charge starts as pending and ends as succeeded, failed, or canceled.

id
string
required

Unique identifier of the charge.

Example:

"ch_o9YDuRzUez2GqV4x"

object
any
required

Type of the object. Always charge.

amount
integer
required

A positive integer in the smallest unit of currency (for example, 1000 for $1000 CLP, since CLP has no minor unit).

Example:

5000

created_at
string<date-time>
required

ISO 8601 timestamp of when the charge was created.

Example:

"2021-05-17T17:04:10.284Z"

currency
string
required

Three-letter ISO 4217 currency code. CLP is the only supported currency.

Example:

"CLP"

failure_code
enum<string> | null
required

Reason why the charge failed. Always null unless status is failed. One of insufficient_funds (the bank account did not have enough funds), subscription_inactive (the subscription is no longer active at the bank), charge_amount_limit_exceeded (the amount exceeds the bank's per-charge limit), bank_account_unavailable (the bank account is closed, blocked, or could not be found), or other.

Available options:
insufficient_funds,
subscription_inactive,
charge_amount_limit_exceeded,
bank_account_unavailable,
other,
null
Example:

"insufficient_funds"

metadata
object
required

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

Example:
mode
enum<string>
required

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

Available options:
test,
live
Example:

"live"

status
enum<string>
required

Current state of the charge. One of pending (not yet sent to the bank), in_progress (being processed by the bank), succeeded, failed, or canceled.

Available options:
pending,
in_progress,
succeeded,
failed,
canceled
Example:

"succeeded"

subscription_id
string
required

Identifier of the subscription the charge belongs to.

Example:

"sub_nMNejK7BT8oGbvO4"

recipient_account
object | null

Bank account that receives the funds of the charge. Only present when the charge has a recipient account attached.