Saltar al contenido principal
GET
List charges
v1 · Base URL https://api.fintoc.com/v1

Autorizaciones

Authorization
string
header
requerido

Parámetros de consulta

since
string<date-time>

ISO 8601 datetime in UTC. If present, only charges created at or after this datetime are returned.

Ejemplo:

"2021-01-01T00:00:00.000Z"

until
string<date-time>

ISO 8601 datetime in UTC. If present, only charges created at or before this datetime are returned.

Ejemplo:

"2021-12-31T23:59:59.000Z"

status
enum<string>

If present, only charges with this status are returned. One of pending, in_progress, succeeded, failed, or canceled.

Opciones disponibles:
pending,
in_progress,
succeeded,
failed,
canceled
Ejemplo:

"succeeded"

subscription_id
string

If present, only charges of this subscription are returned. The subscription must belong to your organization.

Ejemplo:

"sub_m7N9rAWJS9dWDKEe"

page
integer

Page number to retrieve. Starts at 1.

Ejemplo:

1

per_page
integer

Number of charges per page. Defaults to 30. The maximum is 300.

Ejemplo:

30

Respuesta

List of charges for the current mode, sorted by creation date with the most recent charges first.

id
string
requerido

Unique identifier of the charge.

Ejemplo:

"ch_o9YDuRzUez2GqV4x"

object
any
requerido

Type of the object. Always charge.

amount
integer
requerido

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

Ejemplo:

5000

created_at
string<date-time>
requerido

ISO 8601 timestamp of when the charge was created.

Ejemplo:

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

currency
string
requerido

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

Ejemplo:

"CLP"

failure_code
enum<string> | null
requerido

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.

Opciones disponibles:
insufficient_funds,
subscription_inactive,
charge_amount_limit_exceeded,
bank_account_unavailable,
other,
null
Ejemplo:

"insufficient_funds"

metadata
object
requerido

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

Ejemplo:
mode
enum<string>
requerido

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

Opciones disponibles:
test,
live
Ejemplo:

"live"

status
enum<string>
requerido

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.

Opciones disponibles:
pending,
in_progress,
succeeded,
failed,
canceled
Ejemplo:

"succeeded"

subscription_id
string
requerido

Identifier of the subscription the charge belongs to.

Ejemplo:

"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.