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.
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.
creditPackId*string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/subscriptions/string/credits" \ -H "Content-Type: application/json" \ -d '{ "creditPackId": "string" }'{ "success": true, "data": { "credits": -9007199254740991, "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" }}