v1

latestOpenAPI 3.1.02026-07-261420929.5 KB

Remover Assinatura

Remove uma Assinatura permanentemente.

delete/subscriptions/{id}

Path parameters

idstring required

ID da Assinatura

Response

200

idstring
suspendedboolean
plan_identifierstring
price_centsinteger
currencystring
customer_namestring
customer_emailstring
cycled_atstring
credits_mininteger
{"stackTrail":"paths:/subscriptions/{id}:delete:responses:200:content:application/json:schema:properties:credits_cycle","oasType":"schema","type":"unknown"}
payable_withstring
ignore_due_emailboolean
max_cyclesinteger
cycles_countinteger
custom_variablesobject[]
{"stackTrail":"paths:/subscriptions/{id}:delete: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}:delete:responses:200:content:application/json:schema:properties:in_trial","oasType":"schema","type":"unknown"}
creditsinteger
credits_basedboolean

Example response

{
  "id": "13D9CB0C2DA4427A8D0DAA76F10F4248",
  "plan_identifier": "trimestral",
  "price_cents": 300,
  "currency": "BRL",
  "features": {
    "Trimestral": {
      "name": "Trimestre",
      "value": 400
    }
  },
  "customer_name": "documentação",
  "customer_email": "teste@teste.com",
  "cycled_at": "2024-05-15",
  "payable_with": "credit_card",
  "ignore_due_email": true,
  "max_cycles": 4,
  "recent_invoices": [
    {
      "id": "AC5BB46D0F99476C8356D8862FD3141B",
      "due_date": "2024-05-15",
      "status": "pending",
      "total": "R$ 3,00",
      "secure_url": "https://checkout.iugu.com/invoices/ac5bb46d-0f99-476c-8356-d8862fd3141b-1882"
    }
  ],
  "subitems": [
    {
      "id": "5281AD7F7F7A4CB381ED699E202C9936",
      "description": "Teste Descrição",
      "quantity": 1,
      "price_cents": 11111,
      "price": "R$ 111,11",
      "total": "R$ 111,11"
    }
  ],
  "logs": [
    {
      "id": "E3F19D4FACE34E289CB7EE222C7EA0E2",
      "description": "Fatura criada",
      "notes": "Fatura criada com os items:  1x Mudança de Plano: Plano Trismestral = R$ 3,00;",
      "subscription_changes": "{\"features\":[{\"Trimestral\":{\"name\":\"Trimestre\",\"value\":400}},{\"Trimestral\":{\"name\":\"Trimestre\",\"value\":400}}],\"expires_at\":[\"2024-06-15\",null],\"plan_identifier\":[\"Trimestral\",\"trimestral\"],\"updated_at\":[\"2024-05-15T16:22:13-03:00\",\"2024-05-15T16:25:00-03:00\"]}",
      "created_at": "2024-05-15T16:25:02-03:00"
    }
  ],
  "created_at": "2024-05-15T16:13:24-03:00",
  "updated_at": "2024-05-15T16:25:00-03:00",
  "customer_id": "D15B9AA0D8964D6EBBC6F9B11A49B442",
  "plan_name": "Plano Trismestral",
  "customer_ref": "documentação",
  "plan_ref": "Plano Trismestral",
  "active": true,
  "suspend_on_invoice_expired": true
}