Purchase credits
Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance.
Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance.
ApiKeyAuth In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= lengthapplication/json
application/json
curl -X POST "https://commet.co/api/v1/subscriptions/string/credits" \ -H "Content-Type: application/json" \ -d '{ "creditPackId": "string" }'application/json
Credit pack public ID
Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance.
Subscription public ID
{
"success": true,
"data": {
"object": "credit_pack",
"livemode": true,
"credits": 0
}
}{
"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"
}
}