v1

latestOpenAPI 3.1.02026-07-261420929.5 KB

Suspender Assinatura

Suspende uma Assinatura.

post/subscriptions/{id}/suspend

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}/suspend:post:responses:200:content:application/json:schema:properties:credits_cycle","oasType":"schema","type":"unknown"}
payable_withstring
ignore_due_emailboolean
max_cyclesinteger
cycles_countinteger
expires_atstring
created_atstring
updated_atstring
customer_idstring
plan_namestring
customer_refstring
plan_refstring
activeboolean
two_stepboolean
suspend_on_invoice_expiredboolean
{"stackTrail":"paths:/subscriptions/{id}/suspend:post:responses:200:content:application/json:schema:properties:in_trial","oasType":"schema","type":"unknown"}
creditsinteger
credits_basedboolean

Example response

{
  "id": "13D9CB0C2DA4427A8D0DAA76F10F4248",
  "suspended": true,
  "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": "E29D43A77F6949E89B883959463FA50D",
      "due_date": "2024-05-15",
      "status": "canceled",
      "total": "R$ 114,11",
      "secure_url": "https://checkout.iugu.com/invoices/e29d43a7-7f69-49e8-9b88-3959463fa50d-5ca2"
    }
  ],
  "subitems": [
    {
      "id": "5281AD7F7F7A4CB381ED699E202C9936",
      "description": "Teste Descrição",
      "quantity": 1,
      "price_cents": 11111,
      "price": "R$ 111,11",
      "total": "R$ 111,11"
    }
  ],
  "logs": [
    {
      "id": "24A3BB31015F4D4B9AB594DB2AEF453E",
      "description": "Assinatura Suspensa",
      "notes": "Assinatura Suspensa ",
      "subscription_changes": "{\"suspended\":[false,true],\"suspended_at\":[null,\"2024-05-15\"],\"updated_at\":[\"2024-05-15T16:13:27-03:00\",\"2024-05-15T16:13:53-03:00\"]}",
      "created_at": "2024-05-15T16:13:54-03:00"
    }
  ],
  "custom_variables": [
    {
      "name": "Teste name"
    }
  ],
  "expires_at": "2024-05-15",
  "created_at": "2024-05-15T16:13:24-03:00",
  "updated_at": "2024-05-15T16:13:53-03:00",
  "customer_id": "D15B9AA0D8964D6EBBC6F9B11A49B442",
  "plan_name": "Plano Trismestral",
  "customer_ref": "documentação",
  "plan_ref": "Plano Trismestral",
  "suspend_on_invoice_expired": true
}