v1

latestOpenAPI 3.1.02026-07-261420929.5 KB

Remover Créditos da Assinatura

Remove créditos de uma assinatura.

put/subscriptions/{id}/remove_credits

Path parameters

idstring required

Request body

quantityinteger

Quantidade de créditos que devem ser removidos

Response

200

idstring
suspendedboolean
plan_identifierstring
price_centsinteger
currencystring
{"stackTrail":"paths:/subscriptions/{id}/remove_credits:put:responses:200:content:application/json:schema:properties:expires_at","oasType":"schema","type":"unknown"}
created_atstring
updated_atstring
customer_namestring
customer_emailstring
{"stackTrail":"paths:/subscriptions/{id}/remove_credits:put:responses:200:content:application/json:schema:properties:cycled_at","oasType":"schema","type":"unknown"}
credits_mininteger
{"stackTrail":"paths:/subscriptions/{id}/remove_credits:put:responses:200:content:application/json:schema:properties:credits_cycle","oasType":"schema","type":"unknown"}
customer_idstring
plan_namestring
customer_refstring
plan_refstring
activeboolean
{"stackTrail":"paths:/subscriptions/{id}/remove_credits:put:responses:200:content:application/json:schema:properties:in_trial","oasType":"schema","type":"unknown"}
creditsinteger
credits_basedboolean
{"stackTrail":"paths:/subscriptions/{id}/remove_credits:put:responses:200:content:application/json:schema:properties:recent_invoices","oasType":"schema","type":"unknown"}
custom_variablesobject[]

Example response

{
  "id": "ECF36F9AAF374D76A48646EDE8FE806D",
  "plan_identifier": "id2",
  "price_cents": 200,
  "currency": "BRL",
  "features": {
    "feat": {
      "name": "Feature",
      "value": 10
    }
  },
  "created_at": "2013-11-19T11:24:29-02:00",
  "updated_at": "2013-11-19T11:24:43-02:00",
  "customer_name": "Nome do Cliente",
  "customer_email": "email@email.com",
  "customer_id": "FF3149CE52CB4A789925F154B489BFDD",
  "plan_name": "plan1",
  "customer_ref": "Nome do Cliente",
  "plan_ref": "plan1",
  "active": true,
  "credits": 5,
  "subitems": [
    {
      "id": "6D518D88B33F48FEA8964D5573E220D3",
      "description": "Item um",
      "quantity": 1,
      "price_cents": 1000,
      "price": "R$ 10,00",
      "total": "R$ 10,00"
    }
  ],
  "logs": [
    {
      "id": "477388CC4C024520B552641724A62970",
      "description": "Fatura criada",
      "notes": "Fatura criada 1x Ativação de Assinatura: plan1 = R$ 2,00;1x Item um = R$ 10,00;",
      "created_at": "2013-11-19T11:24:43-02:00"
    }
  ]
}