v1

latestOpenAPI 3.1.02026-07-261420929.5 KB

Buscar Assinatura

Retorna os dados de uma Assinatura.

get/subscriptions/{id}

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}:get:responses:200:content:application/json:schema:properties:credits_cycle","oasType":"schema","type":"unknown"}
payable_withstring[]
{"stackTrail":"paths:/subscriptions/{id}:get:responses:200:content:application/json:schema:properties:ignore_due_email","oasType":"schema","type":"unknown"}
max_cyclesinteger
cycles_countinteger
subitemsobject[]
custom_variablesobject[]
{"stackTrail":"paths:/subscriptions/{id}:get: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}:get:responses:200:content:application/json:schema:properties:in_trial","oasType":"schema","type":"unknown"}
creditsinteger
credits_basedboolean

Example response

{
  "id": "282BF13F9DBF4D3D8C5D344FEA370F78",
  "plan_identifier": "basicplan",
  "price_cents": 1000,
  "currency": "BRL",
  "customer_name": "José",
  "customer_email": "jose_silva@teste.com",
  "cycled_at": "2024-04-29",
  "payable_with": [
    "credit_card"
  ],
  "recent_invoices": [
    {
      "id": "011709254C2347ACAFFCB6C80097917E",
      "due_date": "2024-04-29",
      "status": "pending",
      "total": "R$ 10,00",
      "secure_url": "https://checkout.iugu.com/invoices/01170925-4c23-47ac-affc-b6c80097917e-5455"
    }
  ],
  "logs": [
    {
      "id": "F56499BE161746078628C13601437A0A",
      "description": "Fatura criada",
      "notes": "Fatura criada com os items:  1x Ativação de Assinatura: Plano Básico = R$ 10,00;",
      "subscription_changes": "{\"plan_identifier\":[null,\"basicplan\"],\"customer_id\":[null,\"796B9E7392444DAA971D3F1E0BE83F89\"],\"price_cents\":[0,1000],\"interval\":[null,1],\"interval_type\":[null,\"months\"],\"payable_with\":[null,\"credit_card,bank_slip,pix\"],\"created_at\":[null,\"2024-04-29T12:03:57-03:00\"],\"updated_at\":[null,\"2024-04-29T12:03:57-03:00\"],\"id\":[null,\"282BF13F9DBF4D3D8C5D344FEA370F78\"]}",
      "created_at": "2024-04-29T12:04:00-03:00"
    }
  ],
  "created_at": "2024-04-29T12:03:57-03:00",
  "updated_at": "2024-04-29T12:04:00-03:00",
  "customer_id": "796B9E7392444DAA971D3F1E0BE83F89",
  "plan_name": "Plano Básico",
  "customer_ref": "José",
  "plan_ref": "Plano Básico",
  "active": true,
  "two_step": true,
  "suspend_on_invoice_expired": true
}