lago-javascript-client 1.48.0 → 1.50.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.
- package/esm/openapi/client.d.ts +225 -20
- package/esm/openapi/client.js +30 -4
- package/esm/openapi/webhooks.d.ts +366 -20
- package/package.json +1 -1
- package/script/openapi/client.d.ts +225 -20
- package/script/openapi/client.js +30 -4
- package/script/openapi/webhooks.d.ts +366 -20
|
@@ -2447,7 +2447,7 @@ export interface paths {
|
|
|
2447
2447
|
/**
|
|
2448
2448
|
* List all fixed charges for a subscription
|
|
2449
2449
|
* @description This endpoint retrieves all effective fixed charges for a specific subscription.
|
|
2450
|
-
*
|
|
2450
|
+
* The `units` of each fixed charge reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.
|
|
2451
2451
|
*/
|
|
2452
2452
|
get: operations["findAllSubscriptionFixedCharges"];
|
|
2453
2453
|
put?: never;
|
|
@@ -2594,14 +2594,14 @@ export interface paths {
|
|
|
2594
2594
|
/**
|
|
2595
2595
|
* Retrieve a fixed charge for a subscription
|
|
2596
2596
|
* @description This endpoint retrieves a specific effective fixed charge for a subscription.
|
|
2597
|
-
*
|
|
2597
|
+
* The `units` reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.
|
|
2598
2598
|
*/
|
|
2599
2599
|
get: operations["findSubscriptionFixedCharge"];
|
|
2600
2600
|
/**
|
|
2601
2601
|
* Override a fixed charge for a subscription
|
|
2602
|
-
* @description This endpoint creates or updates a fixed charge override for a
|
|
2603
|
-
*
|
|
2604
|
-
*
|
|
2602
|
+
* @description This endpoint creates or updates a fixed charge override for a subscription, without affecting the original plan fixed charge.
|
|
2603
|
+
* When the body contains only `units` (and optionally `apply_units_immediately`), the change is recorded as a per-subscription unit override. When the body also sets `invoice_display_name`, `properties`, or `tax_codes`, it is applied as a full plan override for the subscription instead.
|
|
2604
|
+
* With `apply_units_immediately: true` on a pay-in-advance fixed charge the change is billed mid-period; otherwise it takes effect at the next billing period.
|
|
2605
2605
|
* This is a premium feature.
|
|
2606
2606
|
*/
|
|
2607
2607
|
put: operations["overrideSubscriptionFixedCharge"];
|
|
@@ -2904,6 +2904,7 @@ export interface paths {
|
|
|
2904
2904
|
};
|
|
2905
2905
|
/**
|
|
2906
2906
|
* Retrieve webhook public key
|
|
2907
|
+
* @deprecated
|
|
2907
2908
|
* @description This endpoint is used to retrieve the public key used to verify the webhooks signature
|
|
2908
2909
|
*/
|
|
2909
2910
|
get: operations["fetchPublicKey"];
|
|
@@ -2915,6 +2916,26 @@ export interface paths {
|
|
|
2915
2916
|
patch?: never;
|
|
2916
2917
|
trace?: never;
|
|
2917
2918
|
};
|
|
2919
|
+
"/webhooks/json_public_key": {
|
|
2920
|
+
parameters: {
|
|
2921
|
+
query?: never;
|
|
2922
|
+
header?: never;
|
|
2923
|
+
path?: never;
|
|
2924
|
+
cookie?: never;
|
|
2925
|
+
};
|
|
2926
|
+
/**
|
|
2927
|
+
* Retrieve webhook public key (JSON)
|
|
2928
|
+
* @description This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key.
|
|
2929
|
+
*/
|
|
2930
|
+
get: operations["fetchJsonPublicKey"];
|
|
2931
|
+
put?: never;
|
|
2932
|
+
post?: never;
|
|
2933
|
+
delete?: never;
|
|
2934
|
+
options?: never;
|
|
2935
|
+
head?: never;
|
|
2936
|
+
patch?: never;
|
|
2937
|
+
trace?: never;
|
|
2938
|
+
};
|
|
2918
2939
|
"/webhook_endpoints": {
|
|
2919
2940
|
parameters: {
|
|
2920
2941
|
query?: never;
|
|
@@ -3953,6 +3974,46 @@ export interface webhooks {
|
|
|
3953
3974
|
patch?: never;
|
|
3954
3975
|
trace?: never;
|
|
3955
3976
|
};
|
|
3977
|
+
subscription_incomplete: {
|
|
3978
|
+
parameters: {
|
|
3979
|
+
query?: never;
|
|
3980
|
+
header?: never;
|
|
3981
|
+
path?: never;
|
|
3982
|
+
cookie?: never;
|
|
3983
|
+
};
|
|
3984
|
+
get?: never;
|
|
3985
|
+
put?: never;
|
|
3986
|
+
/**
|
|
3987
|
+
* A subscription is incomplete and waiting for payment
|
|
3988
|
+
* @description A payment-gated subscription has been created in the `incomplete` state and is waiting for the gating payment to succeed before it is activated.
|
|
3989
|
+
*/
|
|
3990
|
+
post: operations["subscriptionIncomplete"];
|
|
3991
|
+
delete?: never;
|
|
3992
|
+
options?: never;
|
|
3993
|
+
head?: never;
|
|
3994
|
+
patch?: never;
|
|
3995
|
+
trace?: never;
|
|
3996
|
+
};
|
|
3997
|
+
subscription_canceled: {
|
|
3998
|
+
parameters: {
|
|
3999
|
+
query?: never;
|
|
4000
|
+
header?: never;
|
|
4001
|
+
path?: never;
|
|
4002
|
+
cookie?: never;
|
|
4003
|
+
};
|
|
4004
|
+
get?: never;
|
|
4005
|
+
put?: never;
|
|
4006
|
+
/**
|
|
4007
|
+
* A subscription has been canceled
|
|
4008
|
+
* @description A subscription has been canceled before its activation. For payment-gated subscriptions this happens when the gating payment fails or the activation rule expires, in which case the `cancellation_reason` field is set.
|
|
4009
|
+
*/
|
|
4010
|
+
post: operations["subscriptionCanceled"];
|
|
4011
|
+
delete?: never;
|
|
4012
|
+
options?: never;
|
|
4013
|
+
head?: never;
|
|
4014
|
+
patch?: never;
|
|
4015
|
+
trace?: never;
|
|
4016
|
+
};
|
|
3956
4017
|
subscription_started: {
|
|
3957
4018
|
parameters: {
|
|
3958
4019
|
query?: never;
|
|
@@ -4515,7 +4576,7 @@ export interface components {
|
|
|
4515
4576
|
rate: number;
|
|
4516
4577
|
/**
|
|
4517
4578
|
* @deprecated
|
|
4518
|
-
* @description This field
|
|
4579
|
+
* @description **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
4519
4580
|
* @example true
|
|
4520
4581
|
*/
|
|
4521
4582
|
applied_to_organization: boolean;
|
|
@@ -4560,7 +4621,7 @@ export interface components {
|
|
|
4560
4621
|
display_name?: string;
|
|
4561
4622
|
/**
|
|
4562
4623
|
* @deprecated
|
|
4563
|
-
* @description This field
|
|
4624
|
+
* @description **Deprecated.** This field will be removed in a future version. When set to true, it applies the invoice custom section to the organization's default billing entity. To apply or remove an invoice custom section from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
4564
4625
|
* @example true
|
|
4565
4626
|
*/
|
|
4566
4627
|
applied_to_organization?: boolean;
|
|
@@ -8154,7 +8215,7 @@ export interface components {
|
|
|
8154
8215
|
/**
|
|
8155
8216
|
* Format: uuid
|
|
8156
8217
|
* @deprecated
|
|
8157
|
-
* @description Unique identifier of the invoice custom section that was applied.
|
|
8218
|
+
* @description **Deprecated.** Unique identifier of the invoice custom section that was applied.
|
|
8158
8219
|
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
8159
8220
|
*/
|
|
8160
8221
|
invoice_custom_section_id?: string;
|
|
@@ -8175,6 +8236,56 @@ export interface components {
|
|
|
8175
8236
|
*/
|
|
8176
8237
|
payment_method_id?: string;
|
|
8177
8238
|
};
|
|
8239
|
+
SubscriptionActivationRuleObject: {
|
|
8240
|
+
/**
|
|
8241
|
+
* Format: uuid
|
|
8242
|
+
* @description Unique identifier assigned to the activation rule within the Lago application. This ID is exclusively created by Lago.
|
|
8243
|
+
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
8244
|
+
*/
|
|
8245
|
+
lago_id: string;
|
|
8246
|
+
/**
|
|
8247
|
+
* @description The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.
|
|
8248
|
+
* @example payment
|
|
8249
|
+
* @enum {string}
|
|
8250
|
+
*/
|
|
8251
|
+
type: "payment";
|
|
8252
|
+
/**
|
|
8253
|
+
* @description The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled.
|
|
8254
|
+
* @example 48
|
|
8255
|
+
*/
|
|
8256
|
+
timeout_hours: number;
|
|
8257
|
+
/**
|
|
8258
|
+
* @description The evaluation status of the activation rule:
|
|
8259
|
+
* - `inactive`: the rule has not been evaluated yet.
|
|
8260
|
+
* - `pending`: the rule is applicable and is waiting to be satisfied (e.g. waiting for the payment).
|
|
8261
|
+
* - `satisfied`: the rule has been satisfied and no longer blocks activation.
|
|
8262
|
+
* - `declined`: the rule was applicable but was declined.
|
|
8263
|
+
* - `failed`: the rule could not be satisfied (e.g. the payment failed).
|
|
8264
|
+
* - `expired`: the rule was not satisfied before its timeout elapsed.
|
|
8265
|
+
* - `not_applicable`: the rule did not apply to this subscription.
|
|
8266
|
+
* @example pending
|
|
8267
|
+
* @enum {string}
|
|
8268
|
+
*/
|
|
8269
|
+
status: "inactive" | "pending" | "satisfied" | "declined" | "failed" | "expired" | "not_applicable";
|
|
8270
|
+
/**
|
|
8271
|
+
* Format: date-time
|
|
8272
|
+
* @description The date and time when the rule expires, after which an unsatisfied rule causes the subscription to be canceled. Represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null until the rule starts being evaluated.
|
|
8273
|
+
* @example 2022-08-10T00:00:00Z
|
|
8274
|
+
*/
|
|
8275
|
+
expires_at?: string | null;
|
|
8276
|
+
/**
|
|
8277
|
+
* Format: date-time
|
|
8278
|
+
* @description The creation date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
8279
|
+
* @example 2022-08-08T00:00:00Z
|
|
8280
|
+
*/
|
|
8281
|
+
created_at: string;
|
|
8282
|
+
/**
|
|
8283
|
+
* Format: date-time
|
|
8284
|
+
* @description The last update date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
8285
|
+
* @example 2022-08-08T00:00:00Z
|
|
8286
|
+
*/
|
|
8287
|
+
updated_at: string;
|
|
8288
|
+
};
|
|
8178
8289
|
SubscriptionObject: {
|
|
8179
8290
|
/**
|
|
8180
8291
|
* Format: uuid
|
|
@@ -8198,6 +8309,11 @@ export interface components {
|
|
|
8198
8309
|
* @example 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
|
|
8199
8310
|
*/
|
|
8200
8311
|
external_customer_id: string;
|
|
8312
|
+
/**
|
|
8313
|
+
* @description The code of the billing entity associated with the subscription.
|
|
8314
|
+
* @example default
|
|
8315
|
+
*/
|
|
8316
|
+
billing_entity_code?: string;
|
|
8201
8317
|
/**
|
|
8202
8318
|
* @description The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
|
|
8203
8319
|
* @example anniversary
|
|
@@ -8227,13 +8343,14 @@ export interface components {
|
|
|
8227
8343
|
/**
|
|
8228
8344
|
* @description The status of the subscription, which can have the following values:
|
|
8229
8345
|
* - `active`: the subscription is currently active and applied to the customer.
|
|
8230
|
-
* - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer
|
|
8346
|
+
* - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer, when a subscription with a pending status is terminated, or when a payment-gated subscription fails to be paid (or its activation rule expires) before activation. When caused by payment gating, the `cancellation_reason` field is set.
|
|
8347
|
+
* - `incomplete`: the subscription was created with a payment activation rule and is waiting for the gating payment to succeed before it becomes `active`. It is automatically `canceled` if the payment fails or the activation rule expires.
|
|
8231
8348
|
* - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.
|
|
8232
8349
|
* - `terminated`: the subscription is no longer active.
|
|
8233
8350
|
* @example active
|
|
8234
8351
|
* @enum {string}
|
|
8235
8352
|
*/
|
|
8236
|
-
status: "active" | "canceled" | "pending" | "terminated";
|
|
8353
|
+
status: "active" | "canceled" | "incomplete" | "pending" | "terminated";
|
|
8237
8354
|
/**
|
|
8238
8355
|
* Format: date-time
|
|
8239
8356
|
* @description The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
|
|
@@ -8342,6 +8459,23 @@ export interface components {
|
|
|
8342
8459
|
* @example true
|
|
8343
8460
|
*/
|
|
8344
8461
|
consolidate_invoice: boolean;
|
|
8462
|
+
/**
|
|
8463
|
+
* @description The reason a payment-gated subscription was canceled before activation. Null unless the subscription was canceled by payment gating.
|
|
8464
|
+
*
|
|
8465
|
+
* - `payment_failed`: the gating payment failed.
|
|
8466
|
+
* - `timeout`: the activation rule expired before the payment succeeded.
|
|
8467
|
+
* @example payment_failed
|
|
8468
|
+
* @enum {string|null}
|
|
8469
|
+
*/
|
|
8470
|
+
cancellation_reason?: "payment_failed" | "timeout" | null;
|
|
8471
|
+
/**
|
|
8472
|
+
* Format: date-time
|
|
8473
|
+
* @description The date and time when a payment-gated subscription was activated (i.e. moved from `incomplete` to `active` once the gating payment succeeded), represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null while the subscription is still `incomplete`.
|
|
8474
|
+
* @example 2022-08-08T00:00:00Z
|
|
8475
|
+
*/
|
|
8476
|
+
activated_at?: string | null;
|
|
8477
|
+
/** @description The activation rules attached to the subscription. A payment activation rule gates activation on a successful first payment, keeping the subscription in the `incomplete` state until the payment succeeds or the rule expires. */
|
|
8478
|
+
activation_rules?: components["schemas"]["SubscriptionActivationRuleObject"][];
|
|
8345
8479
|
};
|
|
8346
8480
|
SubscriptionsPaginated: {
|
|
8347
8481
|
subscriptions: components["schemas"]["SubscriptionObject"][];
|
|
@@ -8394,6 +8528,11 @@ export interface components {
|
|
|
8394
8528
|
* @example 10.0
|
|
8395
8529
|
*/
|
|
8396
8530
|
granted_credits: string;
|
|
8531
|
+
/**
|
|
8532
|
+
* @description Applies only to `target` rules. When `true`, the recurring top-up grants free credits to reach the target ongoing balance instead of creating a paid top-up (and bypasses the paid top-up minimum). When `false`, the gap is filled with a paid top-up. `null` for `fixed` rules. Defaults to `false` for target rules when omitted.
|
|
8533
|
+
* @example false
|
|
8534
|
+
*/
|
|
8535
|
+
grants_target_top_up: boolean | null;
|
|
8397
8536
|
/**
|
|
8398
8537
|
* Format: date-time
|
|
8399
8538
|
* @description The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
@@ -8474,6 +8613,11 @@ export interface components {
|
|
|
8474
8613
|
* @example hooli_1234
|
|
8475
8614
|
*/
|
|
8476
8615
|
external_customer_id: string;
|
|
8616
|
+
/**
|
|
8617
|
+
* @description The code of the billing entity associated with the wallet.
|
|
8618
|
+
* @example default
|
|
8619
|
+
*/
|
|
8620
|
+
billing_entity_code?: string;
|
|
8477
8621
|
/**
|
|
8478
8622
|
* @description The status of the wallet. Possible values are `active` or `terminated`.
|
|
8479
8623
|
* @example active
|
|
@@ -8671,6 +8815,11 @@ export interface components {
|
|
|
8671
8815
|
* @example hooli_1234
|
|
8672
8816
|
*/
|
|
8673
8817
|
external_customer_id: string;
|
|
8818
|
+
/**
|
|
8819
|
+
* @description The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used.
|
|
8820
|
+
* @example default
|
|
8821
|
+
*/
|
|
8822
|
+
billing_entity_code?: string;
|
|
8674
8823
|
/**
|
|
8675
8824
|
* Format: date-time
|
|
8676
8825
|
* @description 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).
|
|
@@ -8749,6 +8898,11 @@ export interface components {
|
|
|
8749
8898
|
* @example 10.0
|
|
8750
8899
|
*/
|
|
8751
8900
|
granted_credits?: string | null;
|
|
8901
|
+
/**
|
|
8902
|
+
* @description Applies only to `target` rules. When `true`, the recurring top-up grants free credits to reach the target ongoing balance instead of creating a paid top-up (and bypasses the paid top-up minimum). When `false`, the gap is filled with a paid top-up. `null` for `fixed` rules. Defaults to `false` for target rules when omitted.
|
|
8903
|
+
* @example false
|
|
8904
|
+
*/
|
|
8905
|
+
grants_target_top_up?: boolean | null;
|
|
8752
8906
|
/**
|
|
8753
8907
|
* @description The method used for recurring top-up. Possible values are `fixed` or `target`.
|
|
8754
8908
|
* @example target
|
|
@@ -8863,6 +9017,11 @@ export interface components {
|
|
|
8863
9017
|
* @example false
|
|
8864
9018
|
*/
|
|
8865
9019
|
invoice_requires_successful_payment?: boolean;
|
|
9020
|
+
/**
|
|
9021
|
+
* @description The code of the billing entity associated with the wallet.
|
|
9022
|
+
* @example default
|
|
9023
|
+
*/
|
|
9024
|
+
billing_entity_code?: string;
|
|
8866
9025
|
invoice_custom_section?: components["schemas"]["InvoiceCustomSectionInput"];
|
|
8867
9026
|
/** @description List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
8868
9027
|
recurring_transaction_rules?: {
|
|
@@ -8905,6 +9064,11 @@ export interface components {
|
|
|
8905
9064
|
* @example 10.0
|
|
8906
9065
|
*/
|
|
8907
9066
|
granted_credits?: string | null;
|
|
9067
|
+
/**
|
|
9068
|
+
* @description Applies only to `target` rules. When `true`, the recurring top-up grants free credits to reach the target ongoing balance instead of creating a paid top-up (and bypasses the paid top-up minimum). When `false`, the gap is filled with a paid top-up. `null` for `fixed` rules. Defaults to `false` for target rules when omitted.
|
|
9069
|
+
* @example false
|
|
9070
|
+
*/
|
|
9071
|
+
grants_target_top_up?: boolean | null;
|
|
8908
9072
|
/**
|
|
8909
9073
|
* Format: date-time
|
|
8910
9074
|
* @description The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
@@ -9665,8 +9829,7 @@ export interface components {
|
|
|
9665
9829
|
};
|
|
9666
9830
|
EventObject: {
|
|
9667
9831
|
/**
|
|
9668
|
-
*
|
|
9669
|
-
* @description Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system
|
|
9832
|
+
* @description Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system. It is an opaque identifier and is not guaranteed to be a UUID; on organizations using the ClickHouse events store it is a composite string.
|
|
9670
9833
|
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
9671
9834
|
*/
|
|
9672
9835
|
lago_id?: string | null;
|
|
@@ -10060,6 +10223,11 @@ export interface components {
|
|
|
10060
10223
|
* @example hooli_1234
|
|
10061
10224
|
*/
|
|
10062
10225
|
external_customer_id: string;
|
|
10226
|
+
/**
|
|
10227
|
+
* @description The code of the billing entity to issue the invoice from. If not provided, the customer's billing entity is used.
|
|
10228
|
+
* @example default
|
|
10229
|
+
*/
|
|
10230
|
+
billing_entity_code?: string;
|
|
10063
10231
|
/**
|
|
10064
10232
|
* @description The currency of the invoice.
|
|
10065
10233
|
* @example EUR
|
|
@@ -10779,8 +10947,8 @@ export interface components {
|
|
|
10779
10947
|
ChargeProperties: {
|
|
10780
10948
|
/**
|
|
10781
10949
|
* @deprecated
|
|
10782
|
-
* @description
|
|
10783
|
-
*
|
|
10950
|
+
* @description **Deprecated.** Replaced by `pricing_group_keys`.
|
|
10951
|
+
* The list of event properties that are used to group the events on the invoice for a `standard` charge model.
|
|
10784
10952
|
* @example [
|
|
10785
10953
|
* "agent_name"
|
|
10786
10954
|
* ]
|
|
@@ -11180,6 +11348,8 @@ export interface components {
|
|
|
11180
11348
|
properties: components["schemas"]["FixedChargeProperties"];
|
|
11181
11349
|
/**
|
|
11182
11350
|
* @description The number of units for the fixed charge.
|
|
11351
|
+
*
|
|
11352
|
+
* When retrieved through a subscription-scoped endpoint (e.g. `GET /subscriptions/{external_id}/fixed_charges`), this reflects the per-subscription unit override when one exists, and falls back to the plan-level units otherwise. Plan-scoped endpoints always return the plan-level units.
|
|
11183
11353
|
* @example 1
|
|
11184
11354
|
*/
|
|
11185
11355
|
units: number;
|
|
@@ -12799,7 +12969,7 @@ export interface components {
|
|
|
12799
12969
|
conversion_rate?: string;
|
|
12800
12970
|
};
|
|
12801
12971
|
}[];
|
|
12802
|
-
/** @description
|
|
12972
|
+
/** @description Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead. */
|
|
12803
12973
|
fixed_charges?: {
|
|
12804
12974
|
/**
|
|
12805
12975
|
* Format: uuid
|
|
@@ -12832,6 +13002,19 @@ export interface components {
|
|
|
12832
13002
|
usage_thresholds?: components["schemas"]["UsageThresholdInput"][];
|
|
12833
13003
|
metadata?: components["schemas"]["MetadataInput"];
|
|
12834
13004
|
};
|
|
13005
|
+
SubscriptionActivationRuleInput: {
|
|
13006
|
+
/**
|
|
13007
|
+
* @description The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.
|
|
13008
|
+
* @example payment
|
|
13009
|
+
* @enum {string}
|
|
13010
|
+
*/
|
|
13011
|
+
type: "payment";
|
|
13012
|
+
/**
|
|
13013
|
+
* @description The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled. Must be a positive integer or zero.
|
|
13014
|
+
* @example 48
|
|
13015
|
+
*/
|
|
13016
|
+
timeout_hours?: number;
|
|
13017
|
+
};
|
|
12835
13018
|
SubscriptionCreateInput: {
|
|
12836
13019
|
/**
|
|
12837
13020
|
* @description 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.
|
|
@@ -12898,6 +13081,7 @@ export interface components {
|
|
|
12898
13081
|
* @example 2022-08-08T00:00:00Z
|
|
12899
13082
|
*/
|
|
12900
13083
|
subscription_at?: string;
|
|
13084
|
+
/** @description Overrides applied to the plan for this subscription. A units-only `fixed_charges` override is recorded as a per-subscription unit override without creating a plan override; any other override creates a plan override for the subscription. See `fixed_charges` for the exact rule. */
|
|
12901
13085
|
plan_overrides?: components["schemas"]["PlanOverridesObject"];
|
|
12902
13086
|
invoice_custom_section?: components["schemas"]["InvoiceCustomSectionInput"];
|
|
12903
13087
|
/** @description Optional payment method to use for processing subscription payments. */
|
|
@@ -12911,6 +13095,8 @@ export interface components {
|
|
|
12911
13095
|
* @example true
|
|
12912
13096
|
*/
|
|
12913
13097
|
consolidate_invoice: boolean;
|
|
13098
|
+
/** @description Optional list of activation rules that gate the subscription activation. When a `payment` rule is provided and the plan is paid in advance (and the subscription is not in a trial), the subscription is created in the `incomplete` state and is only activated once the gating payment succeeds. If the payment fails or the rule's `timeout_hours` elapses, the subscription is canceled. */
|
|
13099
|
+
activation_rules?: components["schemas"]["SubscriptionActivationRuleInput"][];
|
|
12914
13100
|
};
|
|
12915
13101
|
};
|
|
12916
13102
|
ApplicableUsageThreshold: {
|
|
@@ -12963,6 +13149,7 @@ export interface components {
|
|
|
12963
13149
|
* @example 2022-08-08T00:00:00Z
|
|
12964
13150
|
*/
|
|
12965
13151
|
subscription_at?: string;
|
|
13152
|
+
/** @description Overrides applied to the plan for this subscription. A units-only `fixed_charges` override is recorded as a per-subscription unit override without creating a plan override; any other override creates a plan override for the subscription. See `fixed_charges` for the exact rule. */
|
|
12966
13153
|
plan_overrides?: components["schemas"]["PlanOverridesObject"];
|
|
12967
13154
|
invoice_custom_section?: components["schemas"]["InvoiceCustomSectionInput"];
|
|
12968
13155
|
/** @description Optional payment method to use for processing subscription payments. */
|
|
@@ -12975,6 +13162,13 @@ export interface components {
|
|
|
12975
13162
|
* @example false
|
|
12976
13163
|
*/
|
|
12977
13164
|
consolidate_invoice?: boolean;
|
|
13165
|
+
/**
|
|
13166
|
+
* @description The code of the billing entity associated with the subscription. Updates take effect on future invoices only.
|
|
13167
|
+
* @example default
|
|
13168
|
+
*/
|
|
13169
|
+
billing_entity_code?: string;
|
|
13170
|
+
/** @description Optional list of activation rules that gate the subscription activation. Activation rules can only be set or modified while the subscription is `pending` (future-dated and not yet activated); the request is rejected for `incomplete`, `active`, or `terminated` subscriptions. */
|
|
13171
|
+
activation_rules?: components["schemas"]["SubscriptionActivationRuleInput"][];
|
|
12978
13172
|
};
|
|
12979
13173
|
};
|
|
12980
13174
|
Subscription: {
|
|
@@ -13308,7 +13502,7 @@ export interface components {
|
|
|
13308
13502
|
description?: string | null;
|
|
13309
13503
|
/**
|
|
13310
13504
|
* @deprecated
|
|
13311
|
-
* @description This field
|
|
13505
|
+
* @description **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
13312
13506
|
* @example true
|
|
13313
13507
|
*/
|
|
13314
13508
|
applied_to_organization?: boolean;
|
|
@@ -13616,6 +13810,16 @@ export interface components {
|
|
|
13616
13810
|
WalletTransactionsPaginated: components["schemas"]["WalletTransactions"] & {
|
|
13617
13811
|
meta: components["schemas"]["PaginationMeta"];
|
|
13618
13812
|
};
|
|
13813
|
+
WebhookPublicKeyObject: {
|
|
13814
|
+
/**
|
|
13815
|
+
* @description Base64-encoded public key used to verify webhook signatures.
|
|
13816
|
+
* @example MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE=
|
|
13817
|
+
*/
|
|
13818
|
+
public_key: string;
|
|
13819
|
+
};
|
|
13820
|
+
WebhookPublicKey: {
|
|
13821
|
+
webhook: components["schemas"]["WebhookPublicKeyObject"];
|
|
13822
|
+
};
|
|
13619
13823
|
WebhookEndpointObject: {
|
|
13620
13824
|
/**
|
|
13621
13825
|
* Format: uuid
|
|
@@ -13887,6 +14091,18 @@ export interface components {
|
|
|
13887
14091
|
[key: string]: unknown;
|
|
13888
14092
|
};
|
|
13889
14093
|
};
|
|
14094
|
+
OverdueBalancePerCurrencyObject: {
|
|
14095
|
+
/**
|
|
14096
|
+
* @description The amount of the overdue balance for this currency, expressed in cents.
|
|
14097
|
+
* @example 120
|
|
14098
|
+
*/
|
|
14099
|
+
amount_cents: number;
|
|
14100
|
+
/**
|
|
14101
|
+
* @description The currency of the overdue balance.
|
|
14102
|
+
* @example EUR
|
|
14103
|
+
*/
|
|
14104
|
+
currency: components["schemas"]["Currency"];
|
|
14105
|
+
};
|
|
13890
14106
|
DunningCampaignFinishedObject: {
|
|
13891
14107
|
/**
|
|
13892
14108
|
* @description The customer external unique identifier (provided by your own application).
|
|
@@ -13908,6 +14124,8 @@ export interface components {
|
|
|
13908
14124
|
* @example EUR
|
|
13909
14125
|
*/
|
|
13910
14126
|
overdue_balance_currency: components["schemas"]["Currency"];
|
|
14127
|
+
/** @description Overdue balance broken down per currency. */
|
|
14128
|
+
overdue_balances?: components["schemas"]["OverdueBalancePerCurrencyObject"][];
|
|
13911
14129
|
};
|
|
13912
14130
|
EventErrorsObject: {
|
|
13913
14131
|
/**
|
|
@@ -13947,7 +14165,10 @@ export interface components {
|
|
|
13947
14165
|
* ]
|
|
13948
14166
|
*/
|
|
13949
14167
|
invalid_filter_values: string[];
|
|
13950
|
-
/**
|
|
14168
|
+
/**
|
|
14169
|
+
* @deprecated
|
|
14170
|
+
* @description **Deprecated.** List of event transaction_id with a missing group key.
|
|
14171
|
+
*/
|
|
13951
14172
|
missing_group_key: string[];
|
|
13952
14173
|
};
|
|
13953
14174
|
FeeTaxProviderErrorObject: {
|
|
@@ -14242,6 +14463,8 @@ export interface components {
|
|
|
14242
14463
|
wallet_code: string;
|
|
14243
14464
|
/** @description Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system. */
|
|
14244
14465
|
lago_invoice_id: string;
|
|
14466
|
+
/** @description Filter the results by currency, expressed as an ISO 4217 code. */
|
|
14467
|
+
currency: string;
|
|
14245
14468
|
/** @description Code of the existing plan. */
|
|
14246
14469
|
plan_code: string;
|
|
14247
14470
|
/** @description Code of the existing charge. */
|
|
@@ -16030,6 +16253,8 @@ export interface operations {
|
|
|
16030
16253
|
per_page?: components["parameters"]["per_page"];
|
|
16031
16254
|
/** @description Filter by payment status. Possible values are `pending`, `failed` or `succeeded`. */
|
|
16032
16255
|
payment_status?: components["parameters"]["payment_status"];
|
|
16256
|
+
/** @description Filter payment requests by billing entity codes. */
|
|
16257
|
+
"billing_entity_codes[]"?: string[];
|
|
16033
16258
|
};
|
|
16034
16259
|
header?: never;
|
|
16035
16260
|
path: {
|
|
@@ -16097,6 +16322,8 @@ export interface operations {
|
|
|
16097
16322
|
plan_code?: string;
|
|
16098
16323
|
/** @description If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`. */
|
|
16099
16324
|
"status[]"?: ("pending" | "canceled" | "terminated" | "active")[];
|
|
16325
|
+
/** @description Filter subscriptions by billing entity codes. */
|
|
16326
|
+
"billing_entity_codes[]"?: string[];
|
|
16100
16327
|
};
|
|
16101
16328
|
header?: never;
|
|
16102
16329
|
path: {
|
|
@@ -16127,6 +16354,8 @@ export interface operations {
|
|
|
16127
16354
|
page?: components["parameters"]["page"];
|
|
16128
16355
|
/** @description Number of records per page. */
|
|
16129
16356
|
per_page?: components["parameters"]["per_page"];
|
|
16357
|
+
/** @description Filter wallets by billing entity codes. */
|
|
16358
|
+
"billing_entity_codes[]"?: string[];
|
|
16130
16359
|
};
|
|
16131
16360
|
header?: never;
|
|
16132
16361
|
path: {
|
|
@@ -16594,17 +16823,17 @@ export interface operations {
|
|
|
16594
16823
|
};
|
|
16595
16824
|
/**
|
|
16596
16825
|
* @deprecated
|
|
16597
|
-
* @description Filter usage to a specific charge by its Lago ID (UUID).
|
|
16826
|
+
* @description **Deprecated.** Filter usage to a specific charge by its Lago ID (UUID).
|
|
16598
16827
|
*/
|
|
16599
16828
|
filter_by_charge_id?: string;
|
|
16600
16829
|
/**
|
|
16601
16830
|
* @deprecated
|
|
16602
|
-
* @description Filter usage to a specific charge by its code.
|
|
16831
|
+
* @description **Deprecated.** Filter usage to a specific charge by its code.
|
|
16603
16832
|
*/
|
|
16604
16833
|
filter_by_charge_code?: string;
|
|
16605
16834
|
/**
|
|
16606
16835
|
* @deprecated
|
|
16607
|
-
* @description Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
|
|
16836
|
+
* @description **Deprecated.** Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
|
|
16608
16837
|
*/
|
|
16609
16838
|
filter_by_group?: {
|
|
16610
16839
|
[key: string]: string;
|
|
@@ -17638,10 +17867,14 @@ export interface operations {
|
|
|
17638
17867
|
page?: components["parameters"]["page"];
|
|
17639
17868
|
/** @description Number of records per page. */
|
|
17640
17869
|
per_page?: components["parameters"]["per_page"];
|
|
17870
|
+
/** @description Filter the results by currency, expressed as an ISO 4217 code. */
|
|
17871
|
+
currency?: components["parameters"]["currency"];
|
|
17641
17872
|
/** @description Unique identifier assigned to the customer in your application. */
|
|
17642
17873
|
external_customer_id?: components["parameters"]["external_customer_id"];
|
|
17643
17874
|
/** @description Filter by payment status. Possible values are `pending`, `failed` or `succeeded`. */
|
|
17644
17875
|
payment_status?: components["parameters"]["payment_status"];
|
|
17876
|
+
/** @description Filter payment requests by billing entity codes. */
|
|
17877
|
+
"billing_entity_codes[]"?: string[];
|
|
17645
17878
|
};
|
|
17646
17879
|
header?: never;
|
|
17647
17880
|
path?: never;
|
|
@@ -18700,12 +18933,16 @@ export interface operations {
|
|
|
18700
18933
|
page?: components["parameters"]["page"];
|
|
18701
18934
|
/** @description Number of records per page. */
|
|
18702
18935
|
per_page?: components["parameters"]["per_page"];
|
|
18936
|
+
/** @description Filter the results by currency, expressed as an ISO 4217 code. */
|
|
18937
|
+
currency?: components["parameters"]["currency"];
|
|
18703
18938
|
/** @description The customer external unique identifier (provided by your own application) */
|
|
18704
18939
|
external_customer_id?: string;
|
|
18705
18940
|
/** @description The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans. */
|
|
18706
18941
|
plan_code?: string;
|
|
18707
18942
|
/** @description If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`. */
|
|
18708
18943
|
"status[]"?: ("active" | "canceled" | "pending" | "terminated")[];
|
|
18944
|
+
/** @description Filter subscriptions by billing entity codes. */
|
|
18945
|
+
"billing_entity_codes[]"?: string[];
|
|
18709
18946
|
};
|
|
18710
18947
|
header?: never;
|
|
18711
18948
|
path?: never;
|
|
@@ -19786,8 +20023,12 @@ export interface operations {
|
|
|
19786
20023
|
page?: components["parameters"]["page"];
|
|
19787
20024
|
/** @description Number of records per page. */
|
|
19788
20025
|
per_page?: components["parameters"]["per_page"];
|
|
20026
|
+
/** @description Filter the results by currency, expressed as an ISO 4217 code. */
|
|
20027
|
+
currency?: components["parameters"]["currency"];
|
|
19789
20028
|
/** @description The customer external unique identifier (provided by your own application). */
|
|
19790
20029
|
external_customer_id: string;
|
|
20030
|
+
/** @description Filter wallets by billing entity codes. */
|
|
20031
|
+
"billing_entity_codes[]"?: string[];
|
|
19791
20032
|
};
|
|
19792
20033
|
header?: never;
|
|
19793
20034
|
path?: never;
|
|
@@ -20239,6 +20480,27 @@ export interface operations {
|
|
|
20239
20480
|
401: components["responses"]["Unauthorized"];
|
|
20240
20481
|
};
|
|
20241
20482
|
};
|
|
20483
|
+
fetchJsonPublicKey: {
|
|
20484
|
+
parameters: {
|
|
20485
|
+
query?: never;
|
|
20486
|
+
header?: never;
|
|
20487
|
+
path?: never;
|
|
20488
|
+
cookie?: never;
|
|
20489
|
+
};
|
|
20490
|
+
requestBody?: never;
|
|
20491
|
+
responses: {
|
|
20492
|
+
/** @description Public key */
|
|
20493
|
+
200: {
|
|
20494
|
+
headers: {
|
|
20495
|
+
[name: string]: unknown;
|
|
20496
|
+
};
|
|
20497
|
+
content: {
|
|
20498
|
+
"application/json": components["schemas"]["WebhookPublicKey"];
|
|
20499
|
+
};
|
|
20500
|
+
};
|
|
20501
|
+
401: components["responses"]["Unauthorized"];
|
|
20502
|
+
};
|
|
20503
|
+
};
|
|
20242
20504
|
findAllWebhookEndpoints: {
|
|
20243
20505
|
parameters: {
|
|
20244
20506
|
query?: {
|
|
@@ -22428,6 +22690,90 @@ export interface operations {
|
|
|
22428
22690
|
};
|
|
22429
22691
|
};
|
|
22430
22692
|
};
|
|
22693
|
+
subscriptionIncomplete: {
|
|
22694
|
+
parameters: {
|
|
22695
|
+
query?: never;
|
|
22696
|
+
header: {
|
|
22697
|
+
/** @description Signature of the webhook payload */
|
|
22698
|
+
"X-Lago-Signature": components["parameters"]["webhook_signature"];
|
|
22699
|
+
/** @description Algorithm used to generate the signature */
|
|
22700
|
+
"X-Lago-Signature-Algorithm": components["parameters"]["webhook_signature_algorithm"];
|
|
22701
|
+
/** @description Unique id of the webhook. It can be used for idempotency */
|
|
22702
|
+
"X-Lago-Unique-Key": components["parameters"]["webhook_unique_key"];
|
|
22703
|
+
};
|
|
22704
|
+
path?: never;
|
|
22705
|
+
cookie?: never;
|
|
22706
|
+
};
|
|
22707
|
+
/** @description Details of the subscription */
|
|
22708
|
+
requestBody?: {
|
|
22709
|
+
content: {
|
|
22710
|
+
"application/json": {
|
|
22711
|
+
/** @enum {string} */
|
|
22712
|
+
webhook_type: "subscription.incomplete";
|
|
22713
|
+
/** @enum {string} */
|
|
22714
|
+
object_type: "subscription";
|
|
22715
|
+
/**
|
|
22716
|
+
* Format: uuid
|
|
22717
|
+
* @description Unique identifier of the organization, created by Lago.
|
|
22718
|
+
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
22719
|
+
*/
|
|
22720
|
+
organization_id: string;
|
|
22721
|
+
subscription: components["schemas"]["SubscriptionWithCustomerObject"];
|
|
22722
|
+
};
|
|
22723
|
+
};
|
|
22724
|
+
};
|
|
22725
|
+
responses: {
|
|
22726
|
+
/** @description Return a 200 status to indicate that the data was received successfully */
|
|
22727
|
+
200: {
|
|
22728
|
+
headers: {
|
|
22729
|
+
[name: string]: unknown;
|
|
22730
|
+
};
|
|
22731
|
+
content?: never;
|
|
22732
|
+
};
|
|
22733
|
+
};
|
|
22734
|
+
};
|
|
22735
|
+
subscriptionCanceled: {
|
|
22736
|
+
parameters: {
|
|
22737
|
+
query?: never;
|
|
22738
|
+
header: {
|
|
22739
|
+
/** @description Signature of the webhook payload */
|
|
22740
|
+
"X-Lago-Signature": components["parameters"]["webhook_signature"];
|
|
22741
|
+
/** @description Algorithm used to generate the signature */
|
|
22742
|
+
"X-Lago-Signature-Algorithm": components["parameters"]["webhook_signature_algorithm"];
|
|
22743
|
+
/** @description Unique id of the webhook. It can be used for idempotency */
|
|
22744
|
+
"X-Lago-Unique-Key": components["parameters"]["webhook_unique_key"];
|
|
22745
|
+
};
|
|
22746
|
+
path?: never;
|
|
22747
|
+
cookie?: never;
|
|
22748
|
+
};
|
|
22749
|
+
/** @description Details of the subscription */
|
|
22750
|
+
requestBody?: {
|
|
22751
|
+
content: {
|
|
22752
|
+
"application/json": {
|
|
22753
|
+
/** @enum {string} */
|
|
22754
|
+
webhook_type: "subscription.canceled";
|
|
22755
|
+
/** @enum {string} */
|
|
22756
|
+
object_type: "subscription";
|
|
22757
|
+
/**
|
|
22758
|
+
* Format: uuid
|
|
22759
|
+
* @description Unique identifier of the organization, created by Lago.
|
|
22760
|
+
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
22761
|
+
*/
|
|
22762
|
+
organization_id: string;
|
|
22763
|
+
subscription: components["schemas"]["SubscriptionWithCustomerObject"];
|
|
22764
|
+
};
|
|
22765
|
+
};
|
|
22766
|
+
};
|
|
22767
|
+
responses: {
|
|
22768
|
+
/** @description Return a 200 status to indicate that the data was received successfully */
|
|
22769
|
+
200: {
|
|
22770
|
+
headers: {
|
|
22771
|
+
[name: string]: unknown;
|
|
22772
|
+
};
|
|
22773
|
+
content?: never;
|
|
22774
|
+
};
|
|
22775
|
+
};
|
|
22776
|
+
};
|
|
22431
22777
|
subscriptionStarted: {
|
|
22432
22778
|
parameters: {
|
|
22433
22779
|
query?: never;
|