v1

latestOpenAPI 3.1.02026-07-261420929.5 KB

Ativar Assinatura

Ativa uma Assinatura. Uma Fatura poderá ser gerada para o cliente.

post/subscriptions/{id}/activate

Path parameters

idstring required

ID da Assinatura

Response

200

idstring
suspendedboolean
plan_identifierstring
price_centsinteger
currencystring
featuresobject
customer_namestring
customer_emailstring
cycled_atstring
credits_mininteger
{"stackTrail":"paths:/subscriptions/{id}/activate:post:responses:200:content:application/json:schema:properties:credits_cycle","oasType":"schema","type":"unknown"}
payable_withstring
{"stackTrail":"paths:/subscriptions/{id}/activate:post:responses:200:content:application/json:schema:properties:ignore_due_email","oasType":"schema","type":"unknown"}
max_cyclesinteger
cycles_countinteger
{"stackTrail":"paths:/subscriptions/{id}/activate:post:responses:200:content:application/json:schema:properties:return_url","oasType":"schema","type":"unknown"}
subitemsobject[]
custom_variablesobject[]
{"stackTrail":"paths:/subscriptions/{id}/activate:post:responses:200:content:application/json:schema:properties:expires_at","oasType":"schema","type":"unknown"}
created_atstring
updated_atstring
customer_idstring
plan_namestring
customer_refstring
plan_refstring
activeboolean
two_stepboolean
suspend_on_invoice_expiredboolean
{"stackTrail":"paths:/subscriptions/{id}/activate:post:responses:200:content:application/json:schema:properties:in_trial","oasType":"schema","type":"unknown"}
creditsinteger
credits_basedboolean

Example response

{
  "id": "DCBE079B93F54D81BE883A60D916E5B8",
  "suspended": true,
  "plan_identifier": "Plano_iugu",
  "price_cents": 60000,
  "currency": "BRL",
  "customer_name": "iugu",
  "customer_email": "iugu.iugu@iugu.com",
  "cycled_at": "2024-08-15",
  "payable_with": "credit_card",
  "max_cycles": 20,
  "recent_invoices": [
    {
      "id": "07FC440F90E343109DE841EB45F76E68",
      "due_date": "2024-08-20",
      "status": "pending",
      "total": "R$ 600,00",
      "secure_url": "https://faturas.iugu.com/07fc440f-90e3-4310-9de8-41eb45f76e68-9faf"
    }
  ],
  "logs": [
    {
      "id": "6BA95E94BF6247C0979D8050E2C90458",
      "description": "Fatura criada",
      "notes": "Fatura criada com os items:  1x Ativação de Assinatura: Plano Anual Assinatura teste desconto = R$ 600,00;",
      "subscription_changes": "{}",
      "created_at": "2024-08-15T17:36:56-03:00"
    }
  ],
  "created_at": "2023-11-01T10:10:05-03:00",
  "updated_at": "2024-08-15T17:36:56-03:00",
  "customer_id": "92E9297399E94CF1BBE456B7D8DEB7BE",
  "plan_name": "Plano Anual Iugu",
  "customer_ref": "iugu",
  "plan_ref": "Plano Anual Iugu",
  "two_step": true,
  "suspend_on_invoice_expired": true
}