v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
plans

List all charges for a plan

This endpoint retrieves all charges for a specific plan.

get/plans/{code}/charges

Query parameters

pageinteger
Example:1

Page number.

per_pageinteger
Example:20

Number of records per page.

Response

List of charges

Example response

{
  "charges": [
    {
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "code": "api_requests_charge",
      "billable_metric_code": "requests",
      "invoice_display_name": "Setup",
      "created_at": "2022-09-14T16:35:31Z",
      "pay_in_advance": true,
      "invoiceable": true,
      "regroup_paid_fees": "invoice",
      "min_amount_cents": 1200,
      "properties": {
        "grouped_by": [
          "agent_name"
        ],
        "pricing_group_keys": [
          "agent_name"
        ],
        "graduated_ranges": [
          {
            "to_value": 10,
            "flat_amount": "10",
            "per_unit_amount": "0.5"
          }
        ],
        "graduated_percentage_ranges": [
          {
            "to_value": 10,
            "rate": "1",
            "flat_amount": "10"
          }
        ],
        "amount": "30",
        "free_units": 100,
        "package_size": 1000,
        "rate": "1",
        "fixed_amount": "0.5",
        "free_units_per_events": 5,
        "free_units_per_total_aggregation": "500",
        "per_transaction_max_amount": "3.75",
        "per_transaction_min_amount": "1.75",
        "volume_ranges": [
          {
            "to_value": 10,
            "flat_amount": "10",
            "per_unit_amount": "0.5"
          }
        ],
        "presentation_group_keys": [
          {
            "value": "region",
            "options": {
              "display_in_invoice": true
            }
          }
        ]
      },
      "filters": [
        {
          "invoice_display_name": "AWS",
          "properties": {
            "grouped_by": [
              "agent_name"
            ],
            "pricing_group_keys": [
              "agent_name"
            ],
            "graduated_ranges": [
              {
                "to_value": 10,
                "flat_amount": "10",
                "per_unit_amount": "0.5"
              }
            ],
            "graduated_percentage_ranges": [
              {
                "to_value": 10,
                "rate": "1",
                "flat_amount": "10"
              }
            ],
            "amount": "30",
            "free_units": 100,
            "package_size": 1000,
            "rate": "1",
            "fixed_amount": "0.5",
            "free_units_per_events": 5,
            "free_units_per_total_aggregation": "500",
            "per_transaction_max_amount": "3.75",
            "per_transaction_min_amount": "1.75",
            "volume_ranges": [
              {
                "to_value": 10,
                "flat_amount": "10",
                "per_unit_amount": "0.5"
              }
            ]
          },
          "values": {
            "region": [
              "us-east-1"
            ]
          }
        }
      ],
      "taxes": [
        {
          "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
          "name": "TVA",
          "code": "french_standard_vat",
          "description": "French standard VAT",
          "rate": 20,
          "applied_to_organization": true,
          "created_at": "2023-07-06T14:35:58Z"
        }
      ],
      "applied_pricing_unit": {
        "code": "unit_code",
        "conversion_rate": "0.5"
      },
      "lago_parent_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
    }
  ],
  "meta": {
    "current_page": 2,
    "next_page": 3,
    "prev_page": 1,
    "total_pages": 4,
    "total_count": 70
  }
}