v1
latestOpenAPI 3.1.02026-07-222392081.7 MBCustomers > Credits
Topup credits
Topup a number of free credits. This action will not charge the customer.
post/v1/customers/{id}/credits/{productId}/topup
Path parameters
idstring required
productIdstring required
Request body
Example request
{
"credit_count": 32,
"expires_at": "2024-12-20T16:04:11Z"
}Response
The created credit transaction
Example response
{
"id": "cdt_BPZ19obsBS2qyo",
"product_id": "itm_3kXODDF42QXtnL",
"price": {
"id": "pri_0Jv8EbMDOGsHcn",
"amount": 20000,
"pack_size": 120
},
"customer_id": "cus_Typ0px2W0aiEtl",
"payment_method_id": "pm_1xMpj5bwRqN7LM",
"invoice_id": "inv_1eTaiytfA0i2Va",
"type": "topup",
"source": "system",
"credit_count": 32,
"balance_after": 2000,
"created_at": "2024-10-13T07:00:01.860Z",
"updated_at": "2024-10-13T07:00:01.860Z"
}