API documentation
Integrations
Analytics
Billable events
Companies
Coupons > Promotion codes
Custom properties
Customers
Customers > Credits
Customers > Payment methods
Integrations
Invoices
Invoices > Transactions
Invoicing entities
Organisations
Payments
Price configurations
Products
Quotes
Subscriptions
- GETGet subscriptions
- GETGet subscription
- GETGet subscription phases
- GETGet subscription phase
- POSTCreate subscription update
- POSTCreate subscription updates
- POSTCreate subscription
- PUTUpdate subscription
- POSTActivate subscription
- POSTCancel subscription
- POSTPause subscription
- POSTReactivate subscription
- POSTRefresh seat products
- POSTRefresh subscriptions
- POSTReinstate subscription
- POSTTransition subscription to next phase
Third-party apps
Wallets
Customers > Credits
Topup credits
Topup a number of free credits. This action will not charge the customer.
POST
/
v1
/
customers
/
{id}
/
credits
/
{productId}
/
topup
curl --request POST \
--url https://api.hyperline.co/v1/customers/{id}/credits/{productId}/topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"credit_count": 32
}'
{
"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",
"event_id": "<string>",
"type": "topup",
"source": "api",
"amount_excluding_tax": 24000,
"credit_count": 32,
"balance_after": 2000,
"created_at": "2024-10-13T07:00:01.860Z",
"updated_at": "2024-10-13T07:00:01.860Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Credit topup payload
The body is of type object
.
Response
201 - application/json
The created credit transaction
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.hyperline.co/v1/customers/{id}/credits/{productId}/topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"credit_count": 32
}'
{
"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",
"event_id": "<string>",
"type": "topup",
"source": "api",
"amount_excluding_tax": 24000,
"credit_count": 32,
"balance_after": 2000,
"created_at": "2024-10-13T07:00:01.860Z",
"updated_at": "2024-10-13T07:00:01.860Z"
}
Assistant
Responses are generated using AI and may contain mistakes.