lago-javascript-client 1.33.4 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,6 +59,16 @@ export interface BillingEntityObject {
59
59
  * @example 0
60
60
  */
61
61
  invoice_grace_period: number;
62
+ /**
63
+ * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
64
+ * @default "next_period_start"
65
+ */
66
+ subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
67
+ /**
68
+ * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
69
+ * @default "align_with_finalization_date"
70
+ */
71
+ subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
62
72
  /**
63
73
  * Whether this billing entity is the default billing entity for the organization. Default billing entity will be used as fallback in services if no billing entity is specified when billing_entity is not provided. Default billing entity is the billing entity that will be used to generate invoices if no billing entity is specified when invoice is created. is the oldest active billing entity and this flag cannot be changed
64
74
  * @example false
@@ -219,6 +229,16 @@ export interface BillingEntityCreateInput {
219
229
  * @example 0
220
230
  */
221
231
  invoice_grace_period?: number;
232
+ /**
233
+ * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
234
+ * @default "next_period_start"
235
+ */
236
+ subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
237
+ /**
238
+ * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
239
+ * @default "align_with_finalization_date"
240
+ */
241
+ subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
222
242
  };
223
243
  /**
224
244
  * The net payment term (in days) for this billing entity
@@ -468,6 +488,16 @@ export interface BillingEntityUpdateInput {
468
488
  * @example 0
469
489
  */
470
490
  invoice_grace_period?: number;
491
+ /**
492
+ * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
493
+ * @default "next_period_start"
494
+ */
495
+ subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
496
+ /**
497
+ * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
498
+ * @default "align_with_finalization_date"
499
+ */
500
+ subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
471
501
  };
472
502
  /**
473
503
  * The net payment term (in days) for this billing entity
@@ -2008,6 +2038,12 @@ export interface FeeObject {
2008
2038
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2009
2039
  */
2010
2040
  lago_charge_filter_id?: string | null;
2041
+ /**
2042
+ * Unique identifier assigned to the fixed charge that the fee belongs to
2043
+ * @format uuid
2044
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2045
+ */
2046
+ lago_fixed_charge_id?: string | null;
2011
2047
  /**
2012
2048
  * Unique identifier assigned to the invoice that the fee belongs to
2013
2049
  * @format uuid
@@ -2093,6 +2129,11 @@ export interface FeeObject {
2093
2129
  * @example "312.5"
2094
2130
  */
2095
2131
  precise_unit_amount: string;
2132
+ /**
2133
+ * The total number of units that have been aggregated for this specific fee.
2134
+ * @example "0.32"
2135
+ */
2136
+ total_aggregated_units: string;
2096
2137
  /**
2097
2138
  * The cost of this specific fee, including any applicable taxes.
2098
2139
  * @example 120
@@ -2119,13 +2160,13 @@ export interface FeeObject {
2119
2160
  */
2120
2161
  invoiceable: boolean;
2121
2162
  /**
2122
- * The beginning date of the period that the fee covers. It is applicable only to `subscription` and `charge` fees. This field indicates the start date of the billing period or subscription period associated with the fee.
2163
+ * The beginning date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the start date of the billing period or subscription period associated with the fee.
2123
2164
  * @format date-time
2124
2165
  * @example "2022-04-29T08:59:51Z"
2125
2166
  */
2126
2167
  from_date?: string | null;
2127
2168
  /**
2128
- * The ending date of the period that the fee covers. It is applicable only to `subscription` and `charge` fees. This field indicates the end date of the billing period or subscription period associated with the fee.
2169
+ * The ending date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the end date of the billing period or subscription period associated with the fee.
2129
2170
  * @format date-time
2130
2171
  * @example "2022-05-29T08:59:51Z"
2131
2172
  */
@@ -2184,12 +2225,12 @@ export interface FeeObject {
2184
2225
  /** Item attached to the fee */
2185
2226
  item: {
2186
2227
  /**
2187
- * The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or `commitment`.
2228
+ * The fee type. Possible values are `add-on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.
2188
2229
  * @example "subscription"
2189
2230
  */
2190
- type: "charge" | "add_on" | "subscription" | "credit" | "commitment";
2231
+ type: "charge" | "fixed_charge" | "add_on" | "subscription" | "credit" | "commitment";
2191
2232
  /**
2192
- * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
2233
+ * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `fixed_charge`, the code of the `credit` or the code of the `subscription`.
2193
2234
  * @example "startup"
2194
2235
  */
2195
2236
  code: string;
@@ -2240,7 +2281,7 @@ export interface FeeObject {
2240
2281
  */
2241
2282
  lago_item_id: string;
2242
2283
  /**
2243
- * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription` or `Commitment`.
2284
+ * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription`.
2244
2285
  * @example "Subscription"
2245
2286
  */
2246
2287
  item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
@@ -2282,6 +2323,12 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
2282
2323
  /** @example 100 */
2283
2324
  base_amount_cents?: number;
2284
2325
  };
2326
+ /**
2327
+ * Custom metadata stored as key-value pairs.
2328
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2329
+ * @example {"external_id":"ext-123","synced_at":"2024-01-15","source":null}
2330
+ */
2331
+ export type MetadataObject = object | null;
2285
2332
  export interface CreditNoteErrorDetailsObject {
2286
2333
  /**
2287
2334
  * The credit note error details unique identifier, created by Lago.
@@ -2405,6 +2452,11 @@ export interface CreditNoteObject {
2405
2452
  * @example 0
2406
2453
  */
2407
2454
  refund_amount_cents: number;
2455
+ /**
2456
+ * The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
2457
+ * @example 0
2458
+ */
2459
+ offset_amount_cents: number;
2408
2460
  /**
2409
2461
  * The pro-rated amount of the coupons applied to the source invoice.
2410
2462
  * @example 20
@@ -2435,12 +2487,22 @@ export interface CreditNoteObject {
2435
2487
  * @example false
2436
2488
  */
2437
2489
  self_billed?: boolean;
2490
+ /**
2491
+ * Custom metadata stored as key-value pairs.
2492
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2493
+ */
2494
+ metadata?: MetadataObject;
2438
2495
  error_details?: any[] | null;
2439
2496
  }
2440
2497
  export interface CreditNotesPaginated {
2441
2498
  credit_notes: CreditNoteObject[];
2442
2499
  meta: PaginationMeta;
2443
2500
  }
2501
+ /**
2502
+ * Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2503
+ * @example {"external_id":"ext-123","synced_at":"2024-01-15"}
2504
+ */
2505
+ export type MetadataInput = Record<string, string | null>;
2444
2506
  export interface CreditNoteCreateInput {
2445
2507
  credit_note: {
2446
2508
  /**
@@ -2461,18 +2523,23 @@ export interface CreditNoteCreateInput {
2461
2523
  */
2462
2524
  description?: string;
2463
2525
  /**
2464
- * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund or credit, the amount in cents must include both the item amount and the applicable tax. The refunded and credited amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2526
+ * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2465
2527
  * @example 100
2466
2528
  */
2467
2529
  credit_amount_cents?: number | null;
2468
2530
  /**
2469
- * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund or credit, the amount in cents must include both the item amount and the applicable tax. The refunded and credited amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2531
+ * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2470
2532
  * @example 500
2471
2533
  */
2472
2534
  refund_amount_cents?: number | null;
2535
+ /**
2536
+ * The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2537
+ * @example 200
2538
+ */
2539
+ offset_amount_cents?: number | null;
2473
2540
  /**
2474
2541
  * The list of credit note's items.
2475
- * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500}]
2542
+ * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","amount_cents":200}]
2476
2543
  */
2477
2544
  items: {
2478
2545
  /**
@@ -2487,6 +2554,8 @@ export interface CreditNoteCreateInput {
2487
2554
  */
2488
2555
  amount_cents: number;
2489
2556
  }[];
2557
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
2558
+ metadata?: MetadataInput;
2490
2559
  };
2491
2560
  }
2492
2561
  export interface CreditNote {
@@ -2503,6 +2572,8 @@ export interface CreditNoteUpdateInput {
2503
2572
  * @example "succeeded"
2504
2573
  */
2505
2574
  refund_status: "pending" | "succeeded" | "failed";
2575
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
2576
+ metadata?: MetadataInput;
2506
2577
  };
2507
2578
  }
2508
2579
  export interface CreditNoteEstimateInput {
@@ -2580,6 +2651,11 @@ export interface CreditNoteEstimated {
2580
2651
  * @example 0
2581
2652
  */
2582
2653
  max_refundable_amount_cents: number;
2654
+ /**
2655
+ * The ofsetted amount of the credit note, expressed in cents.
2656
+ * @example 0
2657
+ */
2658
+ max_offsettable_amount_cents: number;
2583
2659
  /**
2584
2660
  * The pro-rated amount of the coupons applied to the source invoice.
2585
2661
  * @example 20
@@ -2657,6 +2733,13 @@ export interface ApiErrorNotAllowed {
2657
2733
  /** @example "not_allowed" */
2658
2734
  code: string;
2659
2735
  }
2736
+ export interface CreditNoteMetadataResponse {
2737
+ /**
2738
+ * Custom metadata stored as key-value pairs.
2739
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2740
+ */
2741
+ metadata: MetadataObject;
2742
+ }
2660
2743
  /** @example "US" */
2661
2744
  export type CountryOrNull = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
2662
2745
  /** @example "America/Los_Angeles" */
@@ -2668,6 +2751,18 @@ export interface CustomerBillingConfiguration {
2668
2751
  * @example 3
2669
2752
  */
2670
2753
  invoice_grace_period?: number;
2754
+ /**
2755
+ * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
2756
+ * @default null
2757
+ * @example "next_period_start"
2758
+ */
2759
+ subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
2760
+ /**
2761
+ * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
2762
+ * @default null
2763
+ * @example "keep_anchor"
2764
+ */
2765
+ subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
2671
2766
  /**
2672
2767
  * The payment provider utilized to initiate payments for invoices issued by Lago.
2673
2768
  * Accepted values: `stripe`, `adyen`, `gocardless` or null. This field is required if you intend to assign a `provider_customer_id`.
@@ -3876,6 +3971,11 @@ export interface WalletRecurringTransactionRule {
3876
3971
  * @example "Tokens for models 'high-fidelity-boost'"
3877
3972
  */
3878
3973
  transaction_name: string | null;
3974
+ /**
3975
+ * When true, allows rule to topped up wallet with transactions that exceed the paid top-up limits. Defaults to false.
3976
+ * @example false
3977
+ */
3978
+ ignore_paid_top_up_limits: boolean;
3879
3979
  }
3880
3980
  export interface WalletObject {
3881
3981
  /**
@@ -3910,6 +4010,13 @@ export interface WalletObject {
3910
4010
  * @example "Prepaid"
3911
4011
  */
3912
4012
  name?: string | null;
4013
+ /**
4014
+ * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
4015
+ * @min 1
4016
+ * @max 50
4017
+ * @example 50
4018
+ */
4019
+ priority?: number;
3913
4020
  /**
3914
4021
  * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
3915
4022
  * @pattern ^[0-9]+.?[0-9]*$
@@ -4005,6 +4112,21 @@ export interface WalletObject {
4005
4112
  * @example "2.0"
4006
4113
  */
4007
4114
  credits_ongoing_usage_balance: string;
4115
+ /**
4116
+ * Minimum amount of cents that can be top-up with a single paid transaction.
4117
+ * @example 100
4118
+ */
4119
+ paid_top_up_min_amount_cents?: number | null;
4120
+ /**
4121
+ * Maximum amount of cents that can be top-up with a single paid transaction.
4122
+ * @example 1000
4123
+ */
4124
+ paid_top_up_max_amount_cents?: number | null;
4125
+ /**
4126
+ * Custom metadata stored as key-value pairs.
4127
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
4128
+ */
4129
+ metadata?: MetadataObject;
4008
4130
  }
4009
4131
  export interface WalletsPaginated {
4010
4132
  wallets: WalletObject[];
@@ -4036,6 +4158,12 @@ export type CustomerChargeFiltersUsageObject = {
4036
4158
  * @example "0.9"
4037
4159
  */
4038
4160
  units?: string;
4161
+ /**
4162
+ * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4163
+ * @pattern ^[0-9]+.?[0-9]*$
4164
+ * @example "1.0"
4165
+ */
4166
+ total_aggregated_units?: string;
4039
4167
  /**
4040
4168
  * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
4041
4169
  * @example 1000
@@ -4077,6 +4205,12 @@ export type CustomerChargeGroupedUsageObject = {
4077
4205
  * @example "0.9"
4078
4206
  */
4079
4207
  units?: string;
4208
+ /**
4209
+ * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4210
+ * @pattern ^[0-9]+.?[0-9]*$
4211
+ * @example "1.0"
4212
+ */
4213
+ total_aggregated_units?: string;
4080
4214
  /** Details about the pricing unit used for charge usage. */
4081
4215
  pricing_unit_details?: UsagePricingUnitDetailsObject;
4082
4216
  /** Key value list of event properties aggregated by the charge model */
@@ -4091,6 +4225,12 @@ export interface CustomerChargeUsageObject {
4091
4225
  * @example "1.0"
4092
4226
  */
4093
4227
  units: string;
4228
+ /**
4229
+ * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4230
+ * @pattern ^[0-9]+.?[0-9]*$
4231
+ * @example "1.0"
4232
+ */
4233
+ total_aggregated_units: string;
4094
4234
  /**
4095
4235
  * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
4096
4236
  * @example 10
@@ -4303,7 +4443,7 @@ export interface EventObject {
4303
4443
  * @format uuid
4304
4444
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4305
4445
  */
4306
- lago_id: string;
4446
+ lago_id?: string | null;
4307
4447
  /**
4308
4448
  * This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
4309
4449
  * @example "transaction_1234567890"
@@ -4356,7 +4496,7 @@ export interface EventObject {
4356
4496
  * @format date-time
4357
4497
  * @example "2022-04-29T08:59:51Z"
4358
4498
  */
4359
- created_at: string;
4499
+ created_at?: string | null;
4360
4500
  }
4361
4501
  export interface EventsPaginated {
4362
4502
  events: EventObject[];
@@ -5601,6 +5741,138 @@ export interface ChargeObject {
5601
5741
  conversion_rate: string;
5602
5742
  };
5603
5743
  }
5744
+ export interface FixedChargeProperties {
5745
+ /**
5746
+ * - The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.
5747
+ * - The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.
5748
+ * @pattern ^[0-9]+.?[0-9]*$
5749
+ * @example "30"
5750
+ */
5751
+ amount?: string;
5752
+ /** Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model. */
5753
+ graduated_ranges?: {
5754
+ /**
5755
+ * Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
5756
+ * @example 0
5757
+ */
5758
+ from_value: number;
5759
+ /**
5760
+ * Specifies the highest value of a tier for a `graduated` charge model.
5761
+ * - This value must be higher than the from_value of the same tier.
5762
+ * - This value must be null for the last tier.
5763
+ * @example 10
5764
+ */
5765
+ to_value: number | null;
5766
+ /**
5767
+ * The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.
5768
+ * @pattern ^[0-9]+.?[0-9]*$
5769
+ * @example "10"
5770
+ */
5771
+ flat_amount: string;
5772
+ /**
5773
+ * The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.
5774
+ * @pattern ^[0-9]+.?[0-9]*$
5775
+ * @example "0.5"
5776
+ */
5777
+ per_unit_amount: string;
5778
+ }[];
5779
+ /** Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model. */
5780
+ volume_ranges?: {
5781
+ /**
5782
+ * Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
5783
+ * @example 0
5784
+ */
5785
+ from_value: number;
5786
+ /**
5787
+ * Specifies the highest value of a tier for a `volume` charge model.
5788
+ * - This value must be higher than the `from_value` of the same tier.
5789
+ * - This value must be `null` for the last tier.
5790
+ * @example 10
5791
+ */
5792
+ to_value: number | null;
5793
+ /**
5794
+ * The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.
5795
+ * @pattern ^[0-9]+.?[0-9]*$
5796
+ * @example "10"
5797
+ */
5798
+ flat_amount: string;
5799
+ /**
5800
+ * The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.
5801
+ * @pattern ^[0-9]+.?[0-9]*$
5802
+ * @example "0.5"
5803
+ */
5804
+ per_unit_amount: string;
5805
+ }[];
5806
+ }
5807
+ export interface FixedChargeObject {
5808
+ /**
5809
+ * Unique identifier of the fixed charge, created by Lago.
5810
+ * @format uuid
5811
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5812
+ */
5813
+ lago_id: string;
5814
+ /**
5815
+ * Unique identifier of the add-on associated with this fixed charge.
5816
+ * @format uuid
5817
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5818
+ */
5819
+ lago_add_on_id: string;
5820
+ /**
5821
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
5822
+ * @example "Setup fee"
5823
+ */
5824
+ invoice_display_name: string;
5825
+ /**
5826
+ * Unique code used to identify the add-on.
5827
+ * @example "setup_fee"
5828
+ */
5829
+ add_on_code: string;
5830
+ /**
5831
+ * The date and time when the fixed charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
5832
+ * @format date-time
5833
+ * @example "2023-06-27T19:43:42Z"
5834
+ */
5835
+ created_at: string;
5836
+ /**
5837
+ * Unique code for the fixed charge.
5838
+ * @example "setup_fee"
5839
+ */
5840
+ code?: string;
5841
+ /**
5842
+ * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
5843
+ * @example "standard"
5844
+ */
5845
+ charge_model: "standard" | "graduated" | "volume";
5846
+ /**
5847
+ * This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
5848
+ * @example false
5849
+ */
5850
+ pay_in_advance: boolean;
5851
+ /**
5852
+ * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
5853
+ *
5854
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
5855
+ * - If set to `false`, the charge is billed in full.
5856
+ * - If not defined in the request, default value is `false`.
5857
+ * @example false
5858
+ */
5859
+ prorated: boolean;
5860
+ /** List of all thresholds utilized for calculating the fixed charge. */
5861
+ properties: FixedChargeProperties;
5862
+ /**
5863
+ * The number of units for the fixed charge.
5864
+ * @example 1
5865
+ */
5866
+ units: number;
5867
+ /**
5868
+ * Unique identifier of the parent fixed charge (for plan versions).
5869
+ * @format uuid
5870
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5871
+ */
5872
+ lago_parent_id?: string | null;
5873
+ /** List of taxes applied to the fixed charge. */
5874
+ taxes?: TaxObject[];
5875
+ }
5604
5876
  export type PlanEntitlementPrivilegeObject = FeaturePrivilegeObject & {
5605
5877
  /**
5606
5878
  * Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.
@@ -5696,18 +5968,33 @@ export interface PlanObject {
5696
5968
  * @example null
5697
5969
  */
5698
5970
  bill_charges_monthly?: boolean | null;
5971
+ /**
5972
+ * This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
5973
+ * @example null
5974
+ */
5975
+ bill_fixed_charges_monthly?: boolean | null;
5699
5976
  minimum_commitment?: MinimumCommitmentObject;
5700
5977
  /**
5701
5978
  * Additional usage-based charges for this plan.
5702
5979
  * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
5703
5980
  */
5704
5981
  charges?: ChargeObject[];
5982
+ /**
5983
+ * List of fixed charges for this plan.
5984
+ * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","lago_add_on_id":"2b802b80-2b80-2b80-2b80-2b802b802b80","code":"setup_fee","invoice_display_name":"Setup Fee","add_on_code":"setup","created_at":"2026-01-15T10:30:00Z","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":1,"lago_parent_id":null,"taxes":[{"lago_id":"3c703c70-3c70-3c70-3c70-3c703c703c70","name":"VAT","code":"vat_20","rate":20,"description":"Standard VAT rate","applied_to_organization":true,"created_at":"2026-01-01T00:00:00Z"}]},{"lago_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","lago_add_on_id":"5e505e50-5e50-5e50-5e50-5e505e505e50","code":"support_tier","invoice_display_name":"Support Tier","add_on_code":"premium_support","created_at":"2026-01-15T10:30:00Z","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":1,"lago_parent_id":null,"taxes":[]},{"lago_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","lago_add_on_id":"7a307a30-7a30-7a30-7a30-7a307a307a30","code":"storage","invoice_display_name":"Storage Allocation","add_on_code":"cloud_storage","created_at":"2026-01-15T10:30:00Z","charge_model":"volume","pay_in_advance":false,"prorated":false,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":50,"lago_parent_id":null,"taxes":[]}]
5985
+ */
5986
+ fixed_charges?: FixedChargeObject[];
5705
5987
  /** All taxes applied to the plan. */
5706
5988
  taxes?: TaxObject[];
5707
5989
  /** List of usage thresholds applied to the plan. */
5708
5990
  usage_thresholds?: UsageThresholdObject[];
5709
5991
  /** List of all feature entitlements and their privileges available for this plan. */
5710
5992
  entitlements?: PlanEntitlement[];
5993
+ /**
5994
+ * Custom metadata stored as key-value pairs.
5995
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
5996
+ */
5997
+ metadata?: MetadataObject;
5711
5998
  }
5712
5999
  export interface PlansPaginated {
5713
6000
  plans: PlanObject[];
@@ -5767,52 +6054,57 @@ export interface PlanCreateInput {
5767
6054
  * The name of the plan.
5768
6055
  * @example "Startup"
5769
6056
  */
5770
- name?: string;
6057
+ name: string;
5771
6058
  /**
5772
6059
  * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
5773
6060
  * @example "Startup plan"
5774
6061
  */
5775
- invoice_display_name?: string;
6062
+ invoice_display_name?: string | null;
5776
6063
  /**
5777
6064
  * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
5778
6065
  * @example "startup"
5779
6066
  */
5780
- code?: string;
6067
+ code: string;
5781
6068
  /**
5782
6069
  * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.
5783
6070
  * @example "monthly"
5784
6071
  */
5785
- interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
6072
+ interval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
5786
6073
  /**
5787
6074
  * The description on the plan.
5788
6075
  * @example "Plan for early stage startups."
5789
6076
  */
5790
- description?: string;
6077
+ description?: string | null;
5791
6078
  /**
5792
6079
  * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
5793
6080
  * @example 10000
5794
6081
  */
5795
- amount_cents?: number;
6082
+ amount_cents: number;
5796
6083
  /**
5797
6084
  * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
5798
6085
  * @example "USD"
5799
6086
  */
5800
- amount_currency?: Currency;
6087
+ amount_currency: Currency;
5801
6088
  /**
5802
6089
  * The duration in days during which the base cost of the plan is offered for free.
5803
6090
  * @example 5
5804
6091
  */
5805
- trial_period?: number;
6092
+ trial_period?: number | null;
5806
6093
  /**
5807
6094
  * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
5808
6095
  * @example true
5809
6096
  */
5810
- pay_in_advance?: boolean;
6097
+ pay_in_advance: boolean;
5811
6098
  /**
5812
6099
  * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
5813
6100
  * @example null
5814
6101
  */
5815
6102
  bill_charges_monthly?: boolean | null;
6103
+ /**
6104
+ * This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
6105
+ * @example null
6106
+ */
6107
+ bill_fixed_charges_monthly?: boolean | null;
5816
6108
  /** List of unique code used to identify the taxes. */
5817
6109
  tax_codes?: TaxCodes;
5818
6110
  /** Minimum commitment for this plan. */
@@ -5827,7 +6119,7 @@ export interface PlanCreateInput {
5827
6119
  * @format uuid
5828
6120
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5829
6121
  */
5830
- billable_metric_id?: string;
6122
+ billable_metric_id: string;
5831
6123
  /**
5832
6124
  * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
5833
6125
  * - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
@@ -5838,7 +6130,7 @@ export interface PlanCreateInput {
5838
6130
  * - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
5839
6131
  * - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
5840
6132
  */
5841
- charge_model?: ChargeModelEnum;
6133
+ charge_model: ChargeModelEnum;
5842
6134
  /**
5843
6135
  * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
5844
6136
  * @example false
@@ -5899,8 +6191,65 @@ export interface PlanCreateInput {
5899
6191
  conversion_rate?: string;
5900
6192
  };
5901
6193
  }[];
6194
+ /**
6195
+ * Additional fixed charges for this plan.
6196
+ * @example [{"add_on_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","code":"setup_fee","invoice_display_name":"Setup Fee","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":1,"tax_codes":["french_standard_vat"]},{"add_on_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","invoice_display_name":"Support Tier","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":2},{"add_on_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","charge_model":"volume","properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":50}]
6197
+ */
6198
+ fixed_charges?: {
6199
+ /**
6200
+ * Unique identifier of the add-on associated with this fixed charge.
6201
+ * @format uuid
6202
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6203
+ */
6204
+ add_on_id: string;
6205
+ /**
6206
+ * Unique code for the fixed charge. If not provided, it will be automatically generated based on the add-on code.
6207
+ * @example "setup_fee"
6208
+ */
6209
+ code?: string;
6210
+ /**
6211
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
6212
+ * @example "Setup fee"
6213
+ */
6214
+ invoice_display_name?: string;
6215
+ /**
6216
+ * The number of units for the fixed charge. Defaults to 0 if not provided.
6217
+ * @default 0
6218
+ * @example 1
6219
+ */
6220
+ units?: number;
6221
+ /**
6222
+ * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
6223
+ * @example "standard"
6224
+ */
6225
+ charge_model: "standard" | "graduated" | "volume";
6226
+ /**
6227
+ * This field determines the billing timing for this specific fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period. Defaults to `false` if not provided.
6228
+ * @default false
6229
+ * @example false
6230
+ */
6231
+ pay_in_advance?: boolean;
6232
+ /**
6233
+ * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
6234
+ *
6235
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
6236
+ * - If set to `false`, the charge is billed in full.
6237
+ * - Defaults to `false` if not provided.
6238
+ *
6239
+ * Note: Prorated fixed charges with `graduated` model and `pay_in_advance` are not allowed.
6240
+ * @default false
6241
+ * @example false
6242
+ */
6243
+ prorated?: boolean;
6244
+ /** List of all thresholds utilized for calculating the fixed charge. */
6245
+ properties?: FixedChargeProperties;
6246
+ /** List of taxes applied to the fixed charge. */
6247
+ tax_codes?: TaxCodes;
6248
+ }[];
5902
6249
  /** List of usage thresholds to apply to the plan. */
5903
6250
  usage_thresholds?: UsageThresholdInput[];
6251
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
6252
+ metadata?: MetadataInput;
5904
6253
  };
5905
6254
  }
5906
6255
  export interface Plan {
@@ -5917,7 +6266,7 @@ export interface PlanUpdateInput {
5917
6266
  * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
5918
6267
  * @example "Startup plan"
5919
6268
  */
5920
- invoice_display_name?: string;
6269
+ invoice_display_name?: string | null;
5921
6270
  /**
5922
6271
  * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
5923
6272
  * @example "startup"
@@ -5932,7 +6281,7 @@ export interface PlanUpdateInput {
5932
6281
  * The description on the plan.
5933
6282
  * @example "Plan for early stage startups."
5934
6283
  */
5935
- description?: string;
6284
+ description?: string | null;
5936
6285
  /**
5937
6286
  * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
5938
6287
  * @example 10000
@@ -5947,7 +6296,7 @@ export interface PlanUpdateInput {
5947
6296
  * The duration in days during which the base cost of the plan is offered for free.
5948
6297
  * @example 5
5949
6298
  */
5950
- trial_period?: number;
6299
+ trial_period?: number | null;
5951
6300
  /**
5952
6301
  * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
5953
6302
  * @example true
@@ -5958,6 +6307,11 @@ export interface PlanUpdateInput {
5958
6307
  * @example null
5959
6308
  */
5960
6309
  bill_charges_monthly?: boolean | null;
6310
+ /**
6311
+ * This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
6312
+ * @example null
6313
+ */
6314
+ bill_fixed_charges_monthly?: boolean | null;
5961
6315
  /** List of unique code used to identify the taxes. */
5962
6316
  tax_codes?: TaxCodes;
5963
6317
  /** Minimum commitment for this plan. */
@@ -6045,6 +6399,72 @@ export interface PlanUpdateInput {
6045
6399
  conversion_rate?: string;
6046
6400
  };
6047
6401
  }[];
6402
+ /**
6403
+ * Additional fixed charges for this plan.
6404
+ * @example [{"id":"1a901a90-1a90-1a90-1a90-1a901a901a90","invoice_display_name":"New Setup Fee","charge_model":"standard","apply_units_immediately":true,"units":5},{"add_on_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","code":"setup_fee","invoice_display_name":"Setup Fee","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":1,"apply_units_immediately":false,"tax_codes":["french_standard_vat"]},{"add_on_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","invoice_display_name":"Support Tier","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":2},{"add_on_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","charge_model":"volume","properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":50}]
6405
+ */
6406
+ fixed_charges?: {
6407
+ /**
6408
+ * Unique identifier of the fixed charge created by Lago (required for updates).
6409
+ * @format uuid
6410
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6411
+ */
6412
+ id?: string;
6413
+ /**
6414
+ * Unique identifier of the add-on associated with this fixed charge.
6415
+ * @format uuid
6416
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6417
+ */
6418
+ add_on_id?: string;
6419
+ /**
6420
+ * Unique code for the fixed charge. If not provided, it will be automatically generated based on the add-on code.
6421
+ * @example "setup_fee"
6422
+ */
6423
+ code?: string;
6424
+ /**
6425
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
6426
+ * @example "Setup fee"
6427
+ */
6428
+ invoice_display_name?: string;
6429
+ /**
6430
+ * The number of units for the fixed charge. Defaults to 0 if not provided.
6431
+ * @default 0
6432
+ * @example 1
6433
+ */
6434
+ units?: number;
6435
+ /**
6436
+ * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
6437
+ * @example "standard"
6438
+ */
6439
+ charge_model?: "standard" | "graduated" | "volume";
6440
+ /**
6441
+ * This field determines the billing timing for this specific fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period. Defaults to `false` if not provided.
6442
+ * @default false
6443
+ * @example false
6444
+ */
6445
+ pay_in_advance?: boolean;
6446
+ /**
6447
+ * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
6448
+ *
6449
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
6450
+ * - If set to `false`, the charge is billed in full.
6451
+ * - Defaults to `false` if not provided.
6452
+ *
6453
+ * Note: Prorated fixed charges with `graduated` model and `pay_in_advance` are not allowed.
6454
+ * @default false
6455
+ * @example false
6456
+ */
6457
+ prorated?: boolean;
6458
+ /** List of all thresholds utilized for calculating the fixed charge. */
6459
+ properties?: FixedChargeProperties;
6460
+ /** List of taxes applied to the fixed charge. */
6461
+ tax_codes?: TaxCodes;
6462
+ /**
6463
+ * Determines if the units should be applied immediately upon assignment or deferred to the next billing cycle.
6464
+ * @example true
6465
+ */
6466
+ apply_units_immediately?: boolean;
6467
+ }[];
6048
6468
  /** List of usage thresholds to apply to the plan. */
6049
6469
  usage_thresholds?: UsageThresholdInput[];
6050
6470
  /**
@@ -6052,6 +6472,8 @@ export interface PlanUpdateInput {
6052
6472
  * @example true
6053
6473
  */
6054
6474
  cascade_updates?: boolean;
6475
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
6476
+ metadata?: MetadataInput;
6055
6477
  };
6056
6478
  }
6057
6479
  export interface PlanEntitlements {
@@ -6064,6 +6486,13 @@ export interface EntitlementUpdateInput {
6064
6486
  */
6065
6487
  entitlements: Record<string, Record<string, number | boolean | string>>;
6066
6488
  }
6489
+ export interface PlanMetadataResponse {
6490
+ /**
6491
+ * Custom metadata stored as key-value pairs.
6492
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
6493
+ */
6494
+ metadata: MetadataObject;
6495
+ }
6067
6496
  /** Based plan overrides. */
6068
6497
  export interface PlanOverridesObject {
6069
6498
  /**
@@ -6152,32 +6581,63 @@ export interface PlanOverridesObject {
6152
6581
  conversion_rate?: string;
6153
6582
  };
6154
6583
  }[];
6584
+ /** Additional fixed charges for this plan. */
6585
+ fixed_charges?: {
6586
+ /**
6587
+ * Unique identifier of the fixed charge created by Lago.
6588
+ * @format uuid
6589
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6590
+ */
6591
+ id: string;
6592
+ /**
6593
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
6594
+ * @example "Setup fee"
6595
+ */
6596
+ invoice_display_name?: string;
6597
+ /**
6598
+ * The number of units for the fixed charge. Defaults to 0 if not provided.
6599
+ * @default 0
6600
+ * @example 1
6601
+ */
6602
+ units?: number;
6603
+ /**
6604
+ * Determines if the units should be applied immediately upon assignment or deferred to the next billing cycle.
6605
+ * @example true
6606
+ */
6607
+ apply_units_immediately?: boolean;
6608
+ /** List of all thresholds utilized for calculating the fixed charge. */
6609
+ properties?: FixedChargeProperties;
6610
+ /** List of taxes applied to the fixed charge. */
6611
+ tax_codes?: TaxCodes;
6612
+ }[];
6155
6613
  /** List of usage thresholds applied to the subscription. */
6156
6614
  usage_thresholds?: UsageThresholdInput[];
6615
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
6616
+ metadata?: MetadataInput;
6157
6617
  }
6158
6618
  export interface SubscriptionCreateInput {
6159
- subscription: {
6619
+ /**
6620
+ * Optionally, you can create a pre-authorization on the customer's card before creating a subscription. This process places a temporary hold (capture) for a specified amount on the customer's account, but does not actually withdraw the funds.
6621
+ *
6622
+ * Important notes:
6623
+ * - The final amount due for the subscription is not known at the time of creation; it is determined only after the invoice is finalized.
6624
+ * - The payment intent generated for pre-authorization cannot be reused, as the final invoice amount may exceed the authorized amount.
6625
+ * - The payment intent is canceled immediately after creation, but this cancellation occurs asynchronously.
6626
+ * - For these reasons, it is recommended to use a small amount (such as $1) for pre-authorization. While this does not guarantee sufficient funds for the final payment, it helps reduce the likelihood of payment errors.
6627
+ */
6628
+ authorization?: {
6160
6629
  /**
6161
- * Optionally, you can create a pre-authorization on the customer's card before creating a subscription. This process places a temporary hold (capture) for a specified amount on the customer's account, but does not actually withdraw the funds.
6162
- *
6163
- * Important notes:
6164
- * - The final amount due for the subscription is not known at the time of creation; it is determined only after the invoice is finalized.
6165
- * - The payment intent generated for pre-authorization cannot be reused, as the final invoice amount may exceed the authorized amount.
6166
- * - The payment intent is canceled immediately after creation, but this cancellation occurs asynchronously.
6167
- * - For these reasons, it is recommended to use a small amount (such as $1) for pre-authorization. While this does not guarantee sufficient funds for the final payment, it helps reduce the likelihood of payment errors.
6630
+ * The amount of the authorization in cents.
6631
+ * @example 1000
6168
6632
  */
6169
- authorization?: {
6170
- /**
6171
- * The amount of the authorization in cents.
6172
- * @example 1000
6173
- */
6174
- amount_cents: number;
6175
- /**
6176
- * The currency of the authorization.
6177
- * @example "USD"
6178
- */
6179
- amount_currency: string;
6180
- };
6633
+ amount_cents: number;
6634
+ /**
6635
+ * The currency of the authorization.
6636
+ * @example "USD"
6637
+ */
6638
+ amount_currency: string;
6639
+ };
6640
+ subscription: {
6181
6641
  /**
6182
6642
  * The code of the billing entity to be used for the subscription. If not provided, the default billing entity will be used.
6183
6643
  * @example "default"
@@ -6374,12 +6834,12 @@ export interface AlertObject {
6374
6834
  * The subscription external unique identifier (provided by your own application).
6375
6835
  * @example "sub_1234567890"
6376
6836
  */
6377
- subscription_external_id: string;
6837
+ external_subscription_id: string;
6378
6838
  /**
6379
6839
  * The customer external unique identifier (provided by your own application).
6380
6840
  * @example "cus_0987654321"
6381
6841
  */
6382
- customer_external_id: string;
6842
+ external_customer_id: string;
6383
6843
  /** The billable metric associated with the alert. Only for alerts based on a billable metric. */
6384
6844
  billable_metric: BillableMetricObject;
6385
6845
  /**
@@ -6514,6 +6974,9 @@ export interface SubscriptionEntitlements {
6514
6974
  export interface SubscriptionEntitlement {
6515
6975
  entitlement: SubscriptionEntitlementObject;
6516
6976
  }
6977
+ export interface FixedCharges {
6978
+ fixed_charges: FixedChargeObject[];
6979
+ }
6517
6980
  export interface TaxesPaginated {
6518
6981
  taxes: TaxObject[];
6519
6982
  meta: PaginationMeta;
@@ -6563,6 +7026,13 @@ export interface WalletCreateInput {
6563
7026
  * @example "Prepaid"
6564
7027
  */
6565
7028
  name?: string | null;
7029
+ /**
7030
+ * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
7031
+ * @min 1
7032
+ * @max 50
7033
+ * @example 50
7034
+ */
7035
+ priority?: number;
6566
7036
  /**
6567
7037
  * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
6568
7038
  * @pattern ^[0-9]+.?[0-9]*$
@@ -6625,8 +7095,25 @@ export interface WalletCreateInput {
6625
7095
  */
6626
7096
  billable_metric_codes?: any[] | null;
6627
7097
  };
7098
+ /**
7099
+ * Minimum amount of cents that can be top-up with a single paid transaction.
7100
+ * @example 100
7101
+ */
7102
+ paid_top_up_min_amount_cents?: number | null;
7103
+ /**
7104
+ * Maximum amount of cents that can be top-up with a single paid transaction.
7105
+ * @example 1000
7106
+ */
7107
+ paid_top_up_max_amount_cents?: number | null;
7108
+ /**
7109
+ * If set to true, the wallet will ignore paid top-up limits on creation.
7110
+ * @example false
7111
+ */
7112
+ ignore_paid_top_up_limits_on_creation?: boolean | null;
6628
7113
  /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
6629
7114
  recurring_transaction_rules?: any[] | null;
7115
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
7116
+ metadata?: MetadataInput;
6630
7117
  };
6631
7118
  }
6632
7119
  export interface Wallet {
@@ -6639,6 +7126,13 @@ export interface WalletUpdateInput {
6639
7126
  * @example "new_name"
6640
7127
  */
6641
7128
  name?: string | null;
7129
+ /**
7130
+ * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
7131
+ * @min 1
7132
+ * @max 50
7133
+ * @example 50
7134
+ */
7135
+ priority?: number;
6642
7136
  /**
6643
7137
  * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
6644
7138
  * @format date-time
@@ -6743,8 +7237,17 @@ export interface WalletUpdateInput {
6743
7237
  */
6744
7238
  billable_metric_codes?: any[] | null;
6745
7239
  };
7240
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
7241
+ metadata?: MetadataInput;
6746
7242
  };
6747
7243
  }
7244
+ export interface WalletMetadataResponse {
7245
+ /**
7246
+ * Custom metadata stored as key-value pairs.
7247
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
7248
+ */
7249
+ metadata: MetadataObject;
7250
+ }
6748
7251
  export interface WalletTransactionCreateInput {
6749
7252
  wallet_transaction: {
6750
7253
  /**
@@ -6783,6 +7286,11 @@ export interface WalletTransactionCreateInput {
6783
7286
  * @example false
6784
7287
  */
6785
7288
  invoice_requires_successful_payment?: boolean;
7289
+ /**
7290
+ * When true, allows topping up the wallet with transactions that exceed the paid top-up limits. Defaults to false.
7291
+ * @example false
7292
+ */
7293
+ ignore_paid_top_up_limits?: boolean;
6786
7294
  /**
6787
7295
  * This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
6788
7296
  * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
@@ -7004,7 +7512,7 @@ export interface TriggeredAlertObject {
7004
7512
  * The subscription external unique identifier (provided by your own application).
7005
7513
  * @example "sub_1234567890"
7006
7514
  */
7007
- subscription_external_id: string;
7515
+ external_subscription_id: string;
7008
7516
  /**
7009
7517
  * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
7010
7518
  * @example "storage_usage"
@@ -7168,7 +7676,7 @@ export interface DunningCampaignFinishedObject {
7168
7676
  * The customer external unique identifier (provided by your own application).
7169
7677
  * @example "cus_0987654321"
7170
7678
  */
7171
- customer_external_id: string;
7679
+ external_customer_id: string;
7172
7680
  /**
7173
7681
  * Identifier of the dunning campaign.
7174
7682
  * @example "dun_code_1234"
@@ -7468,7 +7976,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
7468
7976
  }
7469
7977
  /**
7470
7978
  * @title Lago API documentation
7471
- * @version 1.33.3
7979
+ * @version 1.40.0
7472
7980
  * @license AGPLv3
7473
7981
  * @baseUrl https://api.getlago.com/api/v1
7474
7982
  * @externalDocs https://github.com/getlago
@@ -8302,6 +8810,46 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8302
8810
  * @secure
8303
8811
  */
8304
8812
  voidCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
8813
+ /**
8814
+ * @description This endpoint replaces all existing metadata on a credit note with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
8815
+ *
8816
+ * @tags credit_notes
8817
+ * @name ReplaceCreditNoteMetadata
8818
+ * @summary Replace credit note metadata
8819
+ * @request POST:/credit_notes/{lago_id}/metadata
8820
+ * @secure
8821
+ */
8822
+ replaceCreditNoteMetadata: (lagoId: string, data: CreditNoteMetadataResponse, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
8823
+ /**
8824
+ * @description This endpoint merges the provided metadata with existing metadata on the credit note. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
8825
+ *
8826
+ * @tags credit_notes
8827
+ * @name MergeCreditNoteMetadata
8828
+ * @summary Merge credit note metadata
8829
+ * @request PATCH:/credit_notes/{lago_id}/metadata
8830
+ * @secure
8831
+ */
8832
+ mergeCreditNoteMetadata: (lagoId: string, data: CreditNoteMetadataResponse, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
8833
+ /**
8834
+ * @description This endpoint removes all metadata from a credit note.
8835
+ *
8836
+ * @tags credit_notes
8837
+ * @name DeleteAllCreditNoteMetadata
8838
+ * @summary Delete all credit note metadata
8839
+ * @request DELETE:/credit_notes/{lago_id}/metadata
8840
+ * @secure
8841
+ */
8842
+ deleteAllCreditNoteMetadata: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
8843
+ /**
8844
+ * @description This endpoint removes a single metadata key from a credit note.
8845
+ *
8846
+ * @tags credit_notes
8847
+ * @name DeleteCreditNoteMetadataKey
8848
+ * @summary Delete a metadata key
8849
+ * @request DELETE:/credit_notes/{lago_id}/metadata/{key}
8850
+ * @secure
8851
+ */
8852
+ deleteCreditNoteMetadataKey: (lagoId: string, key: string, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
8305
8853
  };
8306
8854
  customers: {
8307
8855
  /**
@@ -8344,6 +8892,51 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8344
8892
  * @example ["billing_entity_code_1","billing_entity_code_2"]
8345
8893
  */
8346
8894
  "billing_entity_codes[]"?: string[];
8895
+ /**
8896
+ * Filter customers by search term. This will filter all customers whose name, firstname, lastname, legal name, external id or email contain the search term.
8897
+ * @example "John Doe"
8898
+ */
8899
+ search_term?: string;
8900
+ /**
8901
+ * Filter customers by countries. Possible values are the ISO 3166-1 alpha-2 codes.
8902
+ * @example ["US","FR"]
8903
+ */
8904
+ "countries[]"?: Country[];
8905
+ /**
8906
+ * Filter customers by states.
8907
+ * @example ["CA","Paris"]
8908
+ */
8909
+ "states[]"?: string[];
8910
+ /**
8911
+ * Filter customers by zipcodes.
8912
+ * @example ["10115","75001"]
8913
+ */
8914
+ "zipcodes[]"?: string[];
8915
+ /**
8916
+ * Filter customers by currencies.
8917
+ * @example ["USD","EUR"]
8918
+ */
8919
+ "currencies[]"?: Currency[];
8920
+ /**
8921
+ * Filter customers by whether they have a tax identification number or not.
8922
+ * @example true
8923
+ */
8924
+ has_tax_identification_number?: boolean;
8925
+ /**
8926
+ * Filter customers by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for customers without given metadata key. For example, `metadata[is_synced]=true&metadata[last_synced_at]=`.
8927
+ * @example "value"
8928
+ */
8929
+ "metadata[key]"?: string;
8930
+ /**
8931
+ * Filter customers by customer type.
8932
+ * @example "company"
8933
+ */
8934
+ customer_type?: "company" | "individual";
8935
+ /**
8936
+ * Filter customers by whether they have a customer type or not.
8937
+ * @example true
8938
+ */
8939
+ has_customer_type?: boolean;
8347
8940
  }, params?: RequestParams) => Promise<HttpResponse<CustomersPaginated, ApiErrorUnauthorized>>;
8348
8941
  /**
8349
8942
  * @description This endpoint retrieves an existing customer.
@@ -8799,6 +9392,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8799
9392
  * @example "event-123"
8800
9393
  */
8801
9394
  code?: string;
9395
+ /**
9396
+ * Requires `external_subscription_id` to be set. Filter events by timestamp after the subscription started at datetime.
9397
+ * @example true
9398
+ */
9399
+ timestamp_from_started_at?: boolean;
8802
9400
  /**
8803
9401
  * Filter events by timestamp starting from a specific date.
8804
9402
  * @format date-time
@@ -8853,7 +9451,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8853
9451
  */
8854
9452
  eventBatchEstimateInstantFees: (data: EventBatchEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
8855
9453
  /**
8856
- * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
9454
+ * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. WARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.
8857
9455
  *
8858
9456
  * @tags events
8859
9457
  * @name FindEvent
@@ -9486,6 +10084,46 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9486
10084
  * @secure
9487
10085
  */
9488
10086
  removeEntitlementPrivilege: (code: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
10087
+ /**
10088
+ * @description This endpoint replaces all existing metadata on a plan with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
10089
+ *
10090
+ * @tags plans
10091
+ * @name ReplacePlanMetadata
10092
+ * @summary Replace plan metadata
10093
+ * @request POST:/plans/{code}/metadata
10094
+ * @secure
10095
+ */
10096
+ replacePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
10097
+ /**
10098
+ * @description This endpoint merges the provided metadata with existing metadata on the plan. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
10099
+ *
10100
+ * @tags plans
10101
+ * @name MergePlanMetadata
10102
+ * @summary Merge plan metadata
10103
+ * @request PATCH:/plans/{code}/metadata
10104
+ * @secure
10105
+ */
10106
+ mergePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
10107
+ /**
10108
+ * @description This endpoint removes all metadata from a plan.
10109
+ *
10110
+ * @tags plans
10111
+ * @name DeleteAllPlanMetadata
10112
+ * @summary Delete all plan metadata
10113
+ * @request DELETE:/plans/{code}/metadata
10114
+ * @secure
10115
+ */
10116
+ deleteAllPlanMetadata: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
10117
+ /**
10118
+ * @description This endpoint removes a single metadata key from a plan.
10119
+ *
10120
+ * @tags plans
10121
+ * @name DeletePlanMetadataKey
10122
+ * @summary Delete a metadata key
10123
+ * @request DELETE:/plans/{code}/metadata/{key}
10124
+ * @secure
10125
+ */
10126
+ deletePlanMetadataKey: (code: string, key: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
9489
10127
  };
9490
10128
  subscriptions: {
9491
10129
  /**
@@ -9717,6 +10355,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9717
10355
  * @secure
9718
10356
  */
9719
10357
  destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorBadRequest | ApiErrorNotFound>>;
10358
+ /**
10359
+ * @description This endpoint retrieves all fixed charges for a specific subscription.
10360
+ *
10361
+ * @tags subscriptions
10362
+ * @name FindAllSubscriptionFixedCharges
10363
+ * @summary List subscription fixed charges
10364
+ * @request GET:/subscriptions/{external_id}/fixed_charges
10365
+ * @secure
10366
+ */
10367
+ findAllSubscriptionFixedCharges: (externalId: string, params?: RequestParams) => Promise<HttpResponse<FixedCharges, ApiErrorUnauthorized | ApiErrorNotFound>>;
9720
10368
  };
9721
10369
  taxes: {
9722
10370
  /**
@@ -9848,6 +10496,46 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9848
10496
  * @secure
9849
10497
  */
9850
10498
  destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
10499
+ /**
10500
+ * @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
10501
+ *
10502
+ * @tags wallets
10503
+ * @name ReplaceWalletMetadata
10504
+ * @summary Replace wallet metadata
10505
+ * @request POST:/wallets/{lago_id}/metadata
10506
+ * @secure
10507
+ */
10508
+ replaceWalletMetadata: (lagoId: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
10509
+ /**
10510
+ * @description This endpoint merges the provided metadata with existing metadata on the wallet. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
10511
+ *
10512
+ * @tags wallets
10513
+ * @name MergeWalletMetadata
10514
+ * @summary Merge wallet metadata
10515
+ * @request PATCH:/wallets/{lago_id}/metadata
10516
+ * @secure
10517
+ */
10518
+ mergeWalletMetadata: (lagoId: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
10519
+ /**
10520
+ * @description This endpoint removes all metadata from a wallet.
10521
+ *
10522
+ * @tags wallets
10523
+ * @name DeleteAllWalletMetadata
10524
+ * @summary Delete all wallet metadata
10525
+ * @request DELETE:/wallets/{lago_id}/metadata
10526
+ * @secure
10527
+ */
10528
+ deleteAllWalletMetadata: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
10529
+ /**
10530
+ * @description This endpoint removes a single metadata key from a wallet.
10531
+ *
10532
+ * @tags wallets
10533
+ * @name DeleteWalletMetadataKey
10534
+ * @summary Delete a metadata key
10535
+ * @request DELETE:/wallets/{lago_id}/metadata/{key}
10536
+ * @secure
10537
+ */
10538
+ deleteWalletMetadataKey: (lagoId: string, key: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
9851
10539
  /**
9852
10540
  * @description This endpoint is used to list all wallet transactions.
9853
10541
  *