Skip to main content
PATCH

Autorizaciones

Authorization
string
header
requerido

Parámetros de ruta

id
string
requerido

The id of the subscription to update.

Cuerpo

application/json
trial_end
string<date-time>
requerido

ISO 8601 datetime, in UTC, when the trial ends and the first paid billing period begins. Must be at least one day in the future. Fintoc sets the subscription's billing_cycle_anchor to this time.

Ejemplo:

"2026-07-01T15:00:00Z"

payment_method
string

Payment method ID to charge every next payment against, including any invoice that is already open. Must belong to the subscription's customer, be one of pac or card, and be active.

Ejemplo:

"pm_2c4mDhAbCdEfGhIjKlMnOpQrStu"

collection_method
enum<string>

The way Fintoc collects every invoice the subscription generates. One of charge_automatically or send_invoice. With charge_automatically, Fintoc charges payment_method on every billing cycle. With send_invoice, Fintoc leaves each invoice open for you to collect, through hosted_invoice_url or outside Fintoc. Switching to charge_automatically requires a payment method.

Opciones disponibles:
charge_automatically,
send_invoice
Ejemplo:

"charge_automatically"

cancel_at
string<date-time> | null

ISO 8601 datetime, in UTC, of the scheduled cancellation. Must be in the future and after the subscription's billing_cycle_anchor. Fintoc cancels the subscription at this datetime and issues no invoice for a billing period that starts at or after it. Set to null to remove a scheduled cancellation.

Ejemplo:

"2027-06-01T15:00:00Z"

split
object[]

Rules for dividing every charge of the subscription between entities. Replaces the current rules as a whole, so send every entry you want to keep. Applies to the invoices the subscription issues from then on. Available for organizations with splits enabled. Provide 1 to 10 entries. All entries must use the same type, and each entity_id can appear only once. When Fintoc deducts processing fees from your payouts, at least one entry must pay the processing fee. When Fintoc invoices you for processing fees, no entry can pay the fee. For flat splits, amounts must add up to the total of the subscription items, and flat is not allowed when an item is priced in CLF. For percentage splits, amounts must add up to 10000 basis points (100%).

Respuesta

The updated subscription. When you set trial_end, status is trialing until the trial ends. When you set payment_method, the subscription points to the new payment method. When you set collection_method, the subscription uses the new collection method from the next billing cycle. When you set cancel_at, the subscription stays active until the scheduled cancellation time. When you set split, the response includes the new split rules.

id
string
requerido

Unique identifier of the subscription.

Ejemplo:

"sub_2c4mDcMaVxDx7nT3o5GbPMQbS2v"

object
any
requerido

Type of the object. Always subscription.

billing_cycle_anchor
string<date-time>
requerido

ISO 8601 timestamp that anchors the billing cycle. Fintoc measures every billing period from this anchor. Unless you set the anchor when creating the subscription, Fintoc uses the creation time, or trial_end when a trial applies. Fintoc issues no invoice before the anchor.

Ejemplo:

"2026-06-01T15:00:00Z"

cancel_at
string<date-time> | null
requerido

ISO 8601 timestamp in UTC of the scheduled cancellation, or null if the subscription renews until you cancel it. Fintoc cancels the subscription at this timestamp and issues no invoice for a billing period that starts at or after it.

Ejemplo:

"2027-06-01T15:00:00Z"

collection_method
enum<string>
requerido

Method Fintoc uses to collect the invoices the subscription generates. One of charge_automatically (Fintoc charges the saved payment method) or send_invoice (Fintoc leaves each invoice open for you to collect).

Opciones disponibles:
charge_automatically,
send_invoice
Ejemplo:

"charge_automatically"

created_at
string<date-time>
requerido

ISO 8601 timestamp of when the subscription was created.

Ejemplo:

"2026-06-01T15:00:00Z"

customer
string
requerido

ID of the customer the subscription bills.

Ejemplo:

"cus_2c4mDe9NJyGmMzvCqLkXqAtjnRu"

items
object[]
requerido

Items the subscription bills for on every billing cycle.

metadata
object
requerido

Set of key-value pairs attached to the subscription.

Ejemplo:
mode
enum<string>
requerido

Mode of the object. One of live or test. test subscriptions use fake data for integration testing and do not collect real money.

Opciones disponibles:
live,
test
Ejemplo:

"live"

payment_method
string | null
requerido

ID of the payment method associated with the subscription, or null if it has none. Fintoc charges it on every billing cycle when collection_method is charge_automatically.

Ejemplo:

"pm_2c4mDhAbCdEfGhIjKlMnOpQrStu"

reason
enum<string> | null
requerido

Reason the subscription reports inconsistent. split_amount_mismatch means the flat split amounts do not add up to the total of the items, or a percentage split leaves an entity with no amount. Fintoc skips this check when an item is priced in a currency other than the subscription's. The invoice amount depends on the exchange rate of each billing cycle. null for every other status.

Opciones disponibles:
split_amount_mismatch,
null
Ejemplo:

null

split
object[] | null
requerido

Rules for dividing the payment of every invoice between entities. These rules match the split rules you provided when creating the subscription. null when the subscription was created without a split.

status
enum<string>
requerido

Current status of the subscription. One of active, incomplete, trialing, paused, inconsistent, or canceled. incomplete means the first invoice payment has not yet succeeded. trialing means the trial period has not ended. paused means Fintoc stops generating invoices while the organization cannot access subscriptions, but still charges invoices that are already open. inconsistent means the split can no longer be applied to the total of the items. Update the split or the items before the next invoice. Fintoc cannot finalize the invoice until the totals match, and reason explains the mismatch. canceled means the subscription stopped generating invoices.

Opciones disponibles:
active,
canceled,
incomplete,
paused,
trialing,
inconsistent
Ejemplo:

"active"

trial_end
string<date-time> | null
requerido

ISO 8601 timestamp at which the trial period ends, or null if the subscription has no trial.

Ejemplo:

null