Commet
  • Precios
Iniciar SesiónRegistrarse
Adjust balance POSTCancel subscription POSTChange plan POSTCreate subscription POSTGet active subscription GETList subscriptions GETPreview plan change POSTTop up balance POSTRevert scheduled cancellation POST
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Adjust balance

Adjust a subscription's balance or credits by a signed amount. Positive adds, negative subtracts.

Set seats PUT

Set seats to an exact count.

Cancel subscription POST

Cancel immediately or at period end.

POST
/subscriptions/{id}/balance/adjust

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

amount*integer
reason?string
type?string
Default"balance"
Value in"credits" | "balance"

Response Body

application/json

application/json

curl -X POST "https://commet.co/api/v1/subscriptions/string/balance/adjust" \  -H "Content-Type: application/json" \  -d '{    "amount": 0  }'

application/json

Signed integer amount to adjust. Positive adds, negative subtracts.

Reason for the adjustment

Type of balance to adjust

Adjust a subscription's balance or credits by a signed amount. Positive adds, negative subtracts.

Subscription public ID

{
  "success": true,
  "data": {
    "object": "subscription",
    "livemode": true,
    "amount": 0,
    "newBalance": 0,
    "reason": "string"
  }
}
{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}