Skip to main content
POST
/
events
/
estimate_instant_fees
Estimate instant fees for a pay in advance charge
curl --request POST \
  --url https://core.nozle.app/api/v1/events/estimate_instant_fees \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": {
    "code": "storage",
    "external_subscription_id": "sub_1234567890",
    "properties": {},
    "transaction_id": "transaction_1234567890"
  }
}
'
{
  "fees": [
    {
      "amount_cents": 100,
      "amount_currency": "EUR",
      "taxes_amount_cents": 0,
      "taxes_rate": 20,
      "units": "0.32",
      "precise_unit_amount": 312.5,
      "total_amount_cents": 120,
      "total_amount_currency": "EUR",
      "pay_in_advance": true,
      "invoiceable": true,
      "payment_status": "pending",
      "item": {
        "type": "charge",
        "code": "startup",
        "name": "Startup",
        "lago_item_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
        "item_type": "BillableMetric",
        "description": "Startup description",
        "invoice_display_name": "Setup Fee (SF1)",
        "filter_invoice_display_name": "AWS eu-east-1",
        "filters": {},
        "grouped_by": {}
      },
      "lago_id": null,
      "lago_charge_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "lago_charge_filter_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "lago_invoice_id": null,
      "lago_true_up_fee_id": null,
      "lago_true_up_parent_fee_id": null,
      "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",
      "precise_amount": 1.0001,
      "precise_total_amount": 1.0212,
      "taxes_precise_amount": 0,
      "description": null,
      "precise_coupons_amount_cents": "0.0",
      "events_count": 1,
      "created_at": null,
      "succeeded_at": null,
      "failed_at": null,
      "refunded_at": null,
      "event_transaction_id": "transaction_1234567890",
      "amount_details": null
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Event estimate instant payload

event
object
required

Response

Fees estimate

fees
object[]