events
Batch estimate instant fees for a pay in advance charge
Changed onEstimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
post/events/batch_estimate_instant_fees
Request
- Base URLhttps://api.getlago.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"events": [
{
"code": "storage",
"external_subscription_id": "sub_1234567890",
"transaction_id": "transaction_1234567890"
}
]
}Response
Fees estimate
Example response
{
"fees": [
{
"lago_charge_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_charge_filter_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_subscription_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_customer_id": "external_id",
"external_subscription_id": "external_id",
"amount_cents": 100,
"precise_amount": 1.0001,
"precise_total_amount": 1.0212,
"amount_currency": "USD",
"taxes_rate": 20,
"units": "0.32",
"precise_unit_amount": 312.5,
"precise_coupons_amount_cents": "0.0",
"total_amount_cents": 120,
"total_amount_currency": "USD",
"events_count": 1,
"pay_in_advance": true,
"invoiceable": true,
"payment_status": "pending",
"event_transaction_id": "transaction_1234567890",
"item": {
"type": "charge",
"code": "startup",
"name": "Startup",
"description": "Startup description",
"invoice_display_name": "Setup Fee (SF1)",
"filter_invoice_display_name": "AWS eu-east-1",
"lago_item_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"item_type": "BillableMetric"
}
}
]
}Changes
- info
endpoint added
- info