v1

latestOpenAPI 3.1.02026-07-222392081.7 MB
Billable events

Simulate billable event prices

Simulate prices for a single billable event without ingesting it.

post/v1/events/simulate-prices

Query parameters

product_idstring

Hyperline ID of the product.

Example:itm_AweveQEoewer

Hyperline ID of the product.

subscription_idstring

Hyperline ID of the subscription.

Example:sub_QalW2vTAdkR6IY

Hyperline ID of the subscription.

include_taxboolean nullable

Whether to include amounts with tax

Example:true

Whether to include amounts with tax

Request body

event_typestring required

Type corresponding to the event. When creating a dynamic product, this type will be used to map the related events to specific prices.

customer_idstring

Hyperline ID or external ID of the existing customer.

timestampstring date-time

UTC date time string in the ISO 8601 format, or milliseconds since the epoch. The event timestamp is used to retrieve the events related to a specific billing period.

Example request

{
  "event_type": "api_call",
  "record": {
    "id": "D32NAA8",
    "durationInMs": 32,
    "isVerified": true
  },
  "customer_id": "cus_CrqwefTRWBWRT",
  "timestamp": "2024-12-20T16:04:11Z"
}

Response

Event prices simulated

idstring required

ID of the calculation.

Example response

{
  "id": "cal_1234567890",
  "result": [
    {
      "product_id": "itm_AweveQEoewer",
      "price_group": {
        "id": "grp_QalW2vTAdkR6IY",
        "name": "mastercard"
      },
      "amount_excluding_tax": 10000,
      "tax_amount": 2000,
      "total_amount": 12000,
      "currency": "EUR"
    }
  ]
}