---
updatedAt: 2025-10-31T16:43:34.000Z
agentTools:
  projectIndex: https://dev.iugu.com/llms.txt
---

# Remover Créditos da Assinatura

Remove créditos de uma assinatura.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "assinaturas",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.iugu.com/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "query",
        "name": "api_token"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/subscriptions/{id}/remove_credits": {
      "put": {
        "summary": "Remover Créditos da Assinatura",
        "description": "Remove créditos de uma assinatura.",
        "operationId": "remover-créditos",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quantity": {
                    "type": "integer",
                    "description": "Quantidade de créditos que devem ser removidos",
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"ECF36F9AAF374D76A48646EDE8FE806D\",\n    \"suspended\": false,\n    \"plan_identifier\": \"id2\",\n    \"price_cents\": 200,\n    \"currency\": \"BRL\",\n    \"features\": {\n        \"feat\": {\n            \"name\": \"Feature\",\n            \"value\": 10\n        }\n    },\n    \"expires_at\": null,\n    \"created_at\": \"2013-11-19T11:24:29-02:00\",\n    \"updated_at\": \"2013-11-19T11:24:43-02:00\",\n    \"customer_name\": \"Nome do Cliente\",\n    \"customer_email\": \"email@email.com\",\n    \"cycled_at\": null,\n    \"credits_min\": 0,\n    \"credits_cycle\": null,\n    \"customer_id\": \"FF3149CE52CB4A789925F154B489BFDD\",\n    \"plan_name\": \"plan1\",\n    \"customer_ref\": \"Nome do Cliente\",\n    \"plan_ref\": \"plan1\",\n    \"active\": true,\n    \"in_trial\": null,\n    \"credits\": 5,\n    \"credits_based\": false,\n    \"recent_invoices\": null,\n    \"subitems\": [{\n        \"id\": \"6D518D88B33F48FEA8964D5573E220D3\",\n        \"description\": \"Item um\",\n        \"quantity\": 1,\n        \"price_cents\": 1000,\n        \"price\": \"R$ 10,00\",\n        \"total\": \"R$ 10,00\"\n    }],\n    \"logs\": [{\n        \"id\": \"477388CC4C024520B552641724A62970\",\n        \"description\": \"Fatura criada\",\n        \"notes\": \"Fatura criada 1x Ativação de Assinatura: plan1 = R$ 2,00;1x Item um = R$ 10,00;\",\n        \"created_at\": \"2013-11-19T11:24:43-02:00\"\n    }, {\n        \"id\": \"706436F169CE465B806163964A25400A\",\n        \"description\": \"Assinatura Criada\",\n        \"notes\": \"Assinatura Criada\",\n        \"created_at\": \"2013-11-19T11:24:29-02:00\"\n    }],\n    \"custom_variables\":[]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "ECF36F9AAF374D76A48646EDE8FE806D"
                    },
                    "suspended": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "plan_identifier": {
                      "type": "string",
                      "example": "id2"
                    },
                    "price_cents": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "currency": {
                      "type": "string",
                      "example": "BRL"
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "feat": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "Feature"
                            },
                            "value": {
                              "type": "integer",
                              "example": 10,
                              "default": 0
                            }
                          }
                        }
                      }
                    },
                    "expires_at": {},
                    "created_at": {
                      "type": "string",
                      "example": "2013-11-19T11:24:29-02:00"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2013-11-19T11:24:43-02:00"
                    },
                    "customer_name": {
                      "type": "string",
                      "example": "Nome do Cliente"
                    },
                    "customer_email": {
                      "type": "string",
                      "example": "email@email.com"
                    },
                    "cycled_at": {},
                    "credits_min": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "credits_cycle": {},
                    "customer_id": {
                      "type": "string",
                      "example": "FF3149CE52CB4A789925F154B489BFDD"
                    },
                    "plan_name": {
                      "type": "string",
                      "example": "plan1"
                    },
                    "customer_ref": {
                      "type": "string",
                      "example": "Nome do Cliente"
                    },
                    "plan_ref": {
                      "type": "string",
                      "example": "plan1"
                    },
                    "active": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "in_trial": {},
                    "credits": {
                      "type": "integer",
                      "example": 5,
                      "default": 0
                    },
                    "credits_based": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "recent_invoices": {},
                    "subitems": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "6D518D88B33F48FEA8964D5573E220D3"
                          },
                          "description": {
                            "type": "string",
                            "example": "Item um"
                          },
                          "quantity": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "price_cents": {
                            "type": "integer",
                            "example": 1000,
                            "default": 0
                          },
                          "price": {
                            "type": "string",
                            "example": "R$ 10,00"
                          },
                          "total": {
                            "type": "string",
                            "example": "R$ 10,00"
                          }
                        }
                      }
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "477388CC4C024520B552641724A62970"
                          },
                          "description": {
                            "type": "string",
                            "example": "Fatura criada"
                          },
                          "notes": {
                            "type": "string",
                            "example": "Fatura criada 1x Ativação de Assinatura: plan1 = R$ 2,00;1x Item um = R$ 10,00;"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2013-11-19T11:24:43-02:00"
                          }
                        }
                      }
                    },
                    "custom_variables": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```