Commet
  • Pricing
Log InTry out
Adjust balance POSTCancel subscription POSTChange plan POSTCreate a recovery payment link for a past due subscription POSTCreate subscription POSTGet active subscription GETGet subscription by ID GETList subscriptions GETPreview plan change POSTReactivate a past due or canceled subscription POSTTop up balance POSTRevert scheduled cancellation POSTUpdate payment method POST
System status
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Adjust balance

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

POST
/subscriptions/{id}/balance/adjust

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

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
Range-9007199254740991 <= value <= 9007199254740991
reason?string
type*string
Default"balance"

Value in

  • "credits"
  • "balance"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/subscriptions/string/balance/adjust" \  -H "Content-Type: application/json" \  -d '{    "amount": -9007199254740991,    "type": "credits"  }'
{  "success": true,  "data": {    "amount": -9007199254740991,    "newBalance": -9007199254740991,    "reason": "string",    "object": "subscription",    "livemode": true  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Set seats PUT

Set seats to an exact count.

Cancel subscription POST

Cancel immediately or at period end.