Commet
  • Precios
Iniciar SesiónRegistrarse
Adjust balance POSTCancel subscription POSTChange plan POSTCreate subscription POSTGet active subscription GETGet subscription by ID 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.

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
reason?string
type*string

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.