curl --request POST \
--url https://ingest.hyperline.co/v1/events/prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "cus_CrqwefTRWBWRT",
"event_type": "api_call",
"timestamp": "2024-12-20T16:04:11Z",
"record": {
"id": "D32NAA8",
"durationInMs": 32,
"isVerified": true
}
}
'{
"id": "cal_1234567890",
"result": [
{
"product_id": "itm_AweveQEoewer",
"amount_excluding_tax": 10000,
"currency": "EUR",
"customer_id": "<string>",
"subscription_id": "<string>",
"price_group": {
"id": "grp_QalW2vTAdkR6IY",
"name": "mastercard"
},
"tax_amount": 2000,
"total_amount": 12000
}
]
}Ingest and calculate prices for a single billable event. After the first ingestion, events are not ingested again and the prices won’t be calculated again. The initially calculated prices will be returned in subsequent calls.
curl --request POST \
--url https://ingest.hyperline.co/v1/events/prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "cus_CrqwefTRWBWRT",
"event_type": "api_call",
"timestamp": "2024-12-20T16:04:11Z",
"record": {
"id": "D32NAA8",
"durationInMs": 32,
"isVerified": true
}
}
'{
"id": "cal_1234567890",
"result": [
{
"product_id": "itm_AweveQEoewer",
"amount_excluding_tax": 10000,
"currency": "EUR",
"customer_id": "<string>",
"subscription_id": "<string>",
"price_group": {
"id": "grp_QalW2vTAdkR6IY",
"name": "mastercard"
},
"tax_amount": 2000,
"total_amount": 12000
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Hyperline ID of the product.
"itm_AweveQEoewer"
Hyperline ID of the subscription.
"sub_QalW2vTAdkR6IY"
Whether to include amounts with tax
true
Event payload
Hyperline ID or external ID of the existing customer.
"cus_CrqwefTRWBWRT"
Type corresponding to the event. When creating a dynamic product, this type will be used to map the related events to specific prices.
"api_call"
Payload of the event containing an ID and any additional metadata.
Show child attributes
{
"id": "D32NAA8",
"durationInMs": 32,
"isVerified": true
}Was this page helpful?