Atualize um plano de assinatura
Atualize o nome, a descrição, o status ativo ou a disponibilidade por país de um plano. O valor e o intervalo não podem ser alterados.
PATCH /subscription/plan/{id} atualiza os campos mutáveis de um plano existente. Você pode renomeá-lo, atualizar a descrição dele, alternar o status ativo dele para parar de aceitar novos assinantes, ou ajustar os países onde ele está disponível — tudo sem afetar os assinantes existentes.
amount, interval, intervalCount e currency são imutáveis e não podem ser alterados por este endpoint. Para mudar o preço ou a cadência de faturamento, crie um novo plano usando POST /subscription/plan e migre os assinantes usando change-plan.availableCountries é uma substituição completa, não uma mesclagem).
Devolve 200 OK com o objeto de plano atualizado completo.
Erros
Autorizações
Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).
Parâmetros de caminho
Corpo
Your merchant account identifier.
New plan name.
New description.
Set false to stop the plan accepting new subscribers. amount and interval cannot be changed - create a new plan and use change-plan instead.
Replacement list of ISO 3166-1 alpha-2 codes. Send [] to make the plan global.
Resposta
Updated plan
A reusable billing plan. amount is a flat integer in the currency minor units (with separate currency + exponent) - not an Amount object.
The plan unique integer ID.
The merchant account that owns the plan.
Billing interval unit. Immutable after creation.
day, week, month, year Number of interval units between charges - month + 3 bills quarterly.
Recurring charge in the currency minor units (e.g. 2999 = $29.99 at exponent 2). Immutable after creation.
ISO 4217 currency code. Immutable after creation.
Decimal places for amount / introAmount - 2 for USD, 0 for JPY.
Free-trial length in days before the first charge. 0 for no trial.
Introductory charge in minor units for the first introBillingCycles cycles, if set.
How many initial cycles are billed at introAmount before the rate reverts to amount.
Total cycles after which the subscription auto-completes. 0 = open-ended.
ISO 3166-1 alpha-2 codes the plan is offered in. Empty = available everywhere.
Whether the plan accepts new subscribers. Existing subscriptions are unaffected when this is false.

