Skip to main content
POST
Pausar una suscripción detiene todos los intentos de renovación sin cancelarla, preservando el registro de la suscripción y todo su historial. Reanudar restaura la facturación y recalcula la próxima fecha de facturación hacia adelante desde la fecha actual — al cliente no se le cobra por el tiempo transcurrido mientras estuvo pausada.

Pausar una suscripción

POST /subscription/{id}/pause suspende la facturación de una suscripción activa. Dispara el evento de webhook subscription.paused y mueve la suscripción al estado paused.
Solo las suscripciones en estado active, trialing o past_due se pueden pausar. Intentar pausar una suscripción cancelled, completed o ya paused devuelve un error 400.

Ejemplo


Reanudar una suscripción

POST /subscription/{id}/resume restaura la facturación de una suscripción pausada o suspendida, con un comportamiento ligeramente diferente según el estado actual.
Si reanudar desde suspended devuelve 402 (tarjeta rechazada), primero debes actualizar el método de pago usando POST /subscription/{id}/payment-method antes de reintentar la reanudación.
En caso de éxito, Therius dispara subscription.resumed. Si una suscripción suspended se revive con un cobro exitoso, también dispara subscription.reactivated.

Errores

Ejemplo

Autorizaciones

Authorization
string
header
requerido

Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).

Parámetros de ruta

id
string
requerido

Cuerpo

application/json
merchantCode
string
requerido

Your merchant account identifier. Validated against the Bearer key's merchant.

Respuesta

200 - application/json

Subscription paused

A customer enrollment in a plan. plan is embedded on single-subscription responses. Invoice/event history is not included here - use the invoice endpoints.

id
string

Subscription UUID.

merchantId
integer

The merchant account that owns the subscription.

planId
integer

ID of the plan this subscription is enrolled in.

customerEmail
string

Subscriber email, used for billing and dunning notifications.

customerName
string

Subscriber name as it appears on invoices.

customerDocument
string

Subscriber national ID / tax document, where a market requires it (e.g. Brazil CPF/CNPJ).

cardBrand
string

Brand of the card on the mandate, e.g. visa.

status
enum<string>

pending - awaiting first charge; trialing - in a free trial; active - billing normally; past_due - a renewal failed and dunning is running; suspended - dunning exhausted, needs a new CIT (POST /subscription/{id}/payment-method in CIT mode) to recover; paused - billing stopped on request, resumable; cancelled - terminated; completed - reached maxBillingCycles.

Opciones disponibles:
pending,
trialing,
active,
past_due,
suspended,
paused,
cancelled,
completed
currentPeriodStart
string<date-time>

Start of the current billing period.

currentPeriodEnd
string<date-time>

End of the current billing period.

nextBillingDate
string<date-time>

When the next renewal charge is scheduled.

trialStart
string<date-time>

Trial start, when the plan has a trial.

trialEnd
string<date-time>

Trial end - the first real charge date.

dunningAttemptCount
integer

Failed-renewal retry attempts made in the current dunning sequence.

activatedAt
string<date-time>

When the subscription first became active.

cancelledAt
string<date-time>
pausedAt
string<date-time>
suspendedAt
string<date-time>
startAt
string<date-time>

Deferred start, when creation set a future startAt.

cyclesCompleted
integer

Number of billing cycles charged so far.

completedAt
string<date-time>

When the subscription reached maxBillingCycles.

parentSubscriptionId
string

Parent subscription UUID, for add-on hierarchies.

propagateLifecycle
boolean

Whether pause/cancel on the parent cascades to this subscription.

pendingPlanId
integer

Plan the subscription will switch to at the next cycle, set by a next_billing change-plan.

createdAt
string<date-time>
updatedAt
string<date-time>
plan
object

A reusable billing plan. amount is a flat integer in the currency minor units (with separate currency + exponent) - not an Amount object.