POST
/
v1
/
customers
/
{id}
/
credits
/
{productId}
/
purchase
curl --request POST \
  --url https://api.hyperline.co/v1/customers/{id}/credits/{productId}/purchase \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "credit_count": 32,
  "amount_excluding_tax": 24000,
  "price_id": "<string>"
}'
{
  "invoice_id": "<string>",
  "new_credit_balance": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required
productId
string
required

Body

application/json

Credit purchase payload

The body is of type object.

Response

201 - application/json

Invoice ID and balance after purchase

The response is of type object.