### Create a wallet Source: https://getlago.com/docs/llms.txt Creates a new wallet with prepaid credits. ```APIDOC ## POST /wallets ### Description Creates a wallet with prepaid credits. ### Method POST ### Endpoint /wallets ### Parameters #### Request Body - **wallet** (object) - Required - The wallet object to create. ``` -------------------------------- ### Create a wallet alert Source: https://getlago.com/docs/llms.txt Creates a new alert for a wallet to monitor its credit consumption. ```APIDOC ## POST /wallets/{wallet_id}/alerts ### Description Allows you to create a new alert for a wallet. ### Method POST ### Endpoint /wallets/{wallet_id}/alerts ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet. #### Request Body - **alert** (object) - Required - The alert object to create. ``` -------------------------------- ### List all wallets Source: https://getlago.com/docs/llms.txt Lists all wallets with prepaid credits. ```APIDOC ## GET /wallets ### Description Lists all wallets with prepaid credits. ### Method GET ### Endpoint /wallets ``` -------------------------------- ### Top-up a wallet Source: https://getlago.com/docs/llms.txt Tops up an active wallet with credits. ```APIDOC ## POST /wallets/{wallet_id}/top_up ### Description Tops up an active wallet. ### Method POST ### Endpoint /wallets/{wallet_id}/top_up ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet to top up. #### Request Body - **wallet_transaction** (object) - Required - The wallet transaction object containing top-up details. ``` -------------------------------- ### Retrieve a wallet Source: https://getlago.com/docs/llms.txt Retrieves an existing wallet with prepaid credits. ```APIDOC ## GET /wallets/{wallet_id} ### Description Retrieves an existing wallet with prepaid credits. ### Method GET ### Endpoint /wallets/{wallet_id} ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet to retrieve. ``` -------------------------------- ### Create a subscription Source: https://getlago.com/docs/llms.txt This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades). ```APIDOC ## POST /subscriptions ### Description This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades). ### Method POST ### Endpoint /subscriptions ``` -------------------------------- ### Create a webhook endpoint Source: https://getlago.com/docs/llms.txt Creates a new webhook endpoint. ```APIDOC ## POST /webhook_endpoints ### Description Creates a webhook endpoint. ### Method POST ### Endpoint /webhook_endpoints ### Parameters #### Request Body - **webhook_endpoint** (object) - Required - The webhook endpoint object to create. ``` -------------------------------- ### Plans API Source: https://getlago.com/docs/changelog/product Endpoints for creating, updating, destroying, and fetching plans. ```APIDOC ## Plans ### Create a plan **Method:** POST **Endpoint:** `/api/v1/plans` ### Update a plan **Method:** PUT **Endpoint:** `/api/v1/plans/:code` ### Destroy a plan **Method:** DELETE **Endpoint:** `/api/v1/plans/:code` ### Fetch a specific plan **Method:** GET **Endpoint:** `/api/v1/plans/:code` ### Fetch all plans **Method:** GET **Endpoint:** `/api/v1/plans?per_page=2&page=1` ``` -------------------------------- ### List all wallet alerts Source: https://getlago.com/docs/llms.txt Retrieves all alerts for a specific wallet. ```APIDOC ## GET /wallets/{wallet_id}/alerts ### Description Allows you to retrieve all alerts for a wallet. ### Method GET ### Endpoint /wallets/{wallet_id}/alerts ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet. ``` -------------------------------- ### Add-ons API Source: https://getlago.com/docs/changelog/product Endpoints for creating, updating, destroying, and fetching add-ons. ```APIDOC ## Add-ons ### Create an add-on **Method:** POST **Endpoint:** `/api/v1/add_ons` ### Update an add-on **Method:** PUT **Endpoint:** `/api/v1/add_ons/:code` ### Destroy an add-on **Method:** DELETE **Endpoint:** `/api/v1/add_ons/:code` ### Fetch a specific add-on **Method:** GET **Endpoint:** `/api/v1/add_ons/:code` ### Fetch all add-ons **Method:** GET **Endpoint:** `/api/v1/add_ons?per_page=2&page=1` ``` -------------------------------- ### List all webhook endpoints Source: https://getlago.com/docs/llms.txt Lists all webhook endpoints. ```APIDOC ## GET /webhook_endpoints ### Description Lists all webhook endpoints. ### Method GET ### Endpoint /webhook_endpoints ``` -------------------------------- ### List all wallet transactions Source: https://getlago.com/docs/llms.txt Lists all wallet transactions. ```APIDOC ## GET /wallets/transactions ### Description Lists all wallet transactions. ### Method GET ### Endpoint /wallets/transactions ``` -------------------------------- ### Update a wallet Source: https://getlago.com/docs/llms.txt Updates an existing wallet with prepaid credits. ```APIDOC ## PUT /wallets/{wallet_id} ### Description Updates an existing wallet with prepaid credits. ### Method PUT ### Endpoint /wallets/{wallet_id} ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet to update. #### Request Body - **wallet** (object) - Required - The wallet object with updated fields. ``` -------------------------------- ### Terminate a wallet Source: https://getlago.com/docs/llms.txt Terminates an existing wallet with prepaid credits. ```APIDOC ## DELETE /wallets/{wallet_id} ### Description Terminates an existing wallet with prepaid credits. ### Method DELETE ### Endpoint /wallets/{wallet_id} ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet to terminate. ``` -------------------------------- ### List all charges Source: https://getlago.com/docs/llms.txt This endpoint retrieves all effective charges for a specific subscription. If the subscription has plan overrides with charge overrides, the overridden charges are returned. ```APIDOC ## GET /subscriptions/:subscription_id/charges ### Description Retrieves all effective charges for a specific subscription. ### Method GET ### Endpoint /subscriptions/:subscription_id/charges ``` -------------------------------- ### List all tax rates Source: https://getlago.com/docs/llms.txt Retrieves all existing taxes, which represent customizable tax rates applicable to either the organization or a specific customer. ```APIDOC ## GET /taxes ### Description Retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer. ### Method GET ### Endpoint /taxes ``` -------------------------------- ### List all charge filters for a subscription Source: https://getlago.com/docs/llms.txt This endpoint retrieves all filters for a specific charge on a subscription. ```APIDOC ## GET /subscriptions/:subscription_id/charges/filters ### Description This endpoint retrieves all filters for a specific charge on a subscription. ### Method GET ### Endpoint /subscriptions/:subscription_id/charges/filters ``` -------------------------------- ### Create a tax rate Source: https://getlago.com/docs/llms.txt This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer. ```APIDOC ## POST /taxes ### Description Creates a new tax rate. ### Method POST ### Endpoint /taxes ``` -------------------------------- ### List all fundings for a wallet transaction Source: https://getlago.com/docs/llms.txt Lists all funding records for an outbound wallet transaction, showing which inbound transactions funded it. Only available for traceable wallets. ```APIDOC ## GET /wallets/transactions/{transaction_id}/fundings ### Description Lists all funding records for an outbound wallet transaction. It shows which inbound transactions funded this outbound transaction. Only available for traceable wallets. ### Method GET ### Endpoint /wallets/transactions/{transaction_id}/fundings ### Parameters #### Path Parameters - **transaction_id** (string) - Required - The unique identifier of the wallet transaction. ``` -------------------------------- ### List all subscriptions Source: https://getlago.com/docs/llms.txt This endpoint retrieves all active subscriptions. ```APIDOC ## GET /subscriptions ### Description Retrieves all active subscriptions. ### Method GET ### Endpoint /subscriptions ``` -------------------------------- ### List all consumptions for a wallet transaction Source: https://getlago.com/docs/llms.txt Lists all consumption records for an inbound wallet transaction, showing how credits were consumed by outbound transactions. Only available for traceable wallets. ```APIDOC ## GET /wallets/transactions/{transaction_id}/consumptions ### Description Lists all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets. ### Method GET ### Endpoint /wallets/transactions/{transaction_id}/consumptions ### Parameters #### Path Parameters - **transaction_id** (string) - Required - The unique identifier of the wallet transaction. ``` -------------------------------- ### List all fixed charges Source: https://getlago.com/docs/llms.txt This endpoint retrieves all effective fixed charges for a specific subscription. The `units` of each fixed charge reflect any per-subscription unit override applied to the subscription. ```APIDOC ## GET /subscriptions/:subscription_id/fixed_charges ### Description Retrieves all effective fixed charges for a specific subscription. ### Method GET ### Endpoint /subscriptions/:subscription_id/fixed_charges ``` -------------------------------- ### Generate a payment URL Source: https://getlago.com/docs/llms.txt Generates a checkout link for a specific wallet transaction. ```APIDOC ## POST /wallets/transactions/{transaction_id}/payment_url ### Description Generates a checkout link for a specific wallet transaction. ### Method POST ### Endpoint /wallets/transactions/{transaction_id}/payment_url ### Parameters #### Path Parameters - **transaction_id** (string) - Required - The unique identifier of the wallet transaction. ``` -------------------------------- ### Retrieve a wallet alert Source: https://getlago.com/docs/llms.txt Retrieves a specific alert for a wallet. ```APIDOC ## GET /wallets/{wallet_id}/alerts/{alert_id} ### Description Allows you to retrieve a specific alert for a wallet. ### Method GET ### Endpoint /wallets/{wallet_id}/alerts/{alert_id} ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet. - **alert_id** (string) - Required - The unique identifier of the alert to retrieve. ``` -------------------------------- ### Coupons API Source: https://getlago.com/docs/changelog/product Endpoints for creating, updating, destroying, and fetching coupons. ```APIDOC ## Coupons ### Create a coupon **Method:** POST **Endpoint:** `/api/v1/coupons` ### Update a coupon **Method:** PUT **Endpoint:** `/api/v1/coupons/:code` ### Destroy a coupon **Method:** DELETE **Endpoint:** `/api/v1/coupons/:code` ### Fetch a specific coupon **Method:** GET **Endpoint:** `/api/v1/coupons/:code` ### Fetch all coupons **Method:** GET **Endpoint:** `/api/v1/coupons?per_page=2&page=1` ``` -------------------------------- ### Update a wallet alert Source: https://getlago.com/docs/llms.txt Updates an existing alert for a wallet. ```APIDOC ## PUT /wallets/{wallet_id}/alerts/{alert_id} ### Description Allows you to update an existing alert for a wallet. ### Method PUT ### Endpoint /wallets/{wallet_id}/alerts/{alert_id} ### Parameters #### Path Parameters - **wallet_id** (string) - Required - The unique identifier of the wallet. - **alert_id** (string) - Required - The unique identifier of the alert to update. #### Request Body - **alert** (object) - Required - The alert object with updated fields. ``` -------------------------------- ### Lago Agent SDK Source: https://getlago.com/docs/llms.txt Bill LLM token usage directly from your application using the Lago Agent SDK. This SDK allows you to wrap your provider client and ship events to Lago without maintaining middleware. ```APIDOC ## Lago Agent SDK ### Description Integrate LLM token usage billing directly into your application. ### Usage Wrap your LLM provider client with the Lago Agent SDK to automatically track and bill token consumption. ### Features - Seamless integration with LLM providers. - Automatic event shipping to Lago. - No middleware required. ``` -------------------------------- ### Create a charge filter for a subscription Source: https://getlago.com/docs/llms.txt This endpoint creates a new filter for a specific charge on a subscription. ```APIDOC ## POST /subscriptions/:subscription_id/charges/filters ### Description This endpoint creates a new filter for a specific charge on a subscription. ### Method POST ### Endpoint /subscriptions/:subscription_id/charges/filters ```