Pular para o conteúdo principal
POST
Subscribe or change plan

Autorizações

api_access_token
string
header
obrigatório

Token de acesso do usuário (Perfil → Token de acesso). Dá acesso conforme o papel do usuário e age em nome dele.

Parâmetros de caminho

account_id
string
obrigatório

The numeric ID of the account

Corpo

price_id
integer
obrigatório

Price of the plan to subscribe to, from the plan catalog.

gateway_id
integer

Gateway to charge with. Only needed when several gateways charge the account currency.

items
object

Add-on quantities to include in the checkout, keyed by add-on slug.

Exemplo:

Resposta

Success

Outcome of the plan change. A first subscription returns redirect_url and the customer completes the checkout at the gateway. An upgrade is applied immediately, a downgrade is scheduled for the end of the paid period.

redirect_url
string<uri>

Gateway checkout URL. Returned when a payment is needed to complete the change.

status
enum<string>
Opções disponíveis:
unchanged,
upgraded,
scheduled,
applied,
pending_payment,
processing
scheduled_change_at
string<date-time>

When a scheduled downgrade takes effect.