chargebee 2.40.0 → 3.0.0-beta.1

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.
Files changed (118) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/LICENSE +1 -1
  3. package/README.md +90 -172
  4. package/cjs/RequestWrapper.js +81 -0
  5. package/cjs/asyncApiSupport.js +39 -0
  6. package/cjs/chargebee.cjs.js +13 -0
  7. package/cjs/chargebee.cjs.worker.js +9 -0
  8. package/cjs/chargebeeError.js +17 -0
  9. package/cjs/coreCommon.js +72 -0
  10. package/cjs/createChargebee.js +92 -0
  11. package/cjs/environment.js +18 -0
  12. package/cjs/filter.js +1 -0
  13. package/cjs/net/ClientInterface.js +40 -0
  14. package/cjs/net/FetchClient.js +86 -0
  15. package/cjs/net/NodeClient.js +61 -0
  16. package/cjs/package.json +1 -0
  17. package/cjs/resources/api_endpoints.js +1086 -0
  18. package/cjs/util.js +218 -0
  19. package/esm/RequestWrapper.js +77 -0
  20. package/esm/asyncApiSupport.js +35 -0
  21. package/esm/chargebee.esm.js +9 -0
  22. package/esm/chargebee.esm.worker.js +5 -0
  23. package/esm/chargebeeError.js +13 -0
  24. package/esm/coreCommon.js +67 -0
  25. package/esm/createChargebee.js +88 -0
  26. package/esm/environment.js +15 -0
  27. package/esm/filter.js +1 -0
  28. package/esm/net/ClientInterface.js +35 -0
  29. package/esm/net/FetchClient.js +81 -0
  30. package/esm/net/NodeClient.js +56 -0
  31. package/esm/package.json +1 -0
  32. package/esm/resources/api_endpoints.js +1083 -0
  33. package/esm/util.js +202 -0
  34. package/package.json +69 -38
  35. package/types/core.d.ts +558 -89
  36. package/types/index.d.ts +91 -54
  37. package/types/resources/Address.d.ts +57 -272
  38. package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
  39. package/types/resources/AttachedItem.d.ts +91 -329
  40. package/types/resources/Attribute.d.ts +5 -5
  41. package/types/resources/BusinessEntity.d.ts +49 -69
  42. package/types/resources/BusinessEntityTransfer.d.ts +11 -17
  43. package/types/resources/Card.d.ts +146 -424
  44. package/types/resources/Comment.d.ts +72 -189
  45. package/types/resources/Contact.d.ts +12 -64
  46. package/types/resources/ContractTerm.d.ts +15 -96
  47. package/types/resources/Coupon.d.ts +282 -758
  48. package/types/resources/CouponCode.d.ts +56 -52
  49. package/types/resources/CouponSet.d.ts +92 -234
  50. package/types/resources/CreditNote.d.ts +588 -1758
  51. package/types/resources/CreditNoteEstimate.d.ts +131 -157
  52. package/types/resources/Currency.d.ts +75 -62
  53. package/types/resources/Customer.d.ts +892 -835
  54. package/types/resources/CustomerEntitlement.d.ts +36 -0
  55. package/types/resources/DifferentialPrice.d.ts +116 -314
  56. package/types/resources/Discount.d.ts +20 -125
  57. package/types/resources/Download.d.ts +6 -22
  58. package/types/resources/Entitlement.d.ts +51 -160
  59. package/types/resources/EntitlementOverride.d.ts +58 -139
  60. package/types/resources/Estimate.d.ts +1178 -527
  61. package/types/resources/Event.d.ts +67 -178
  62. package/types/resources/Export.d.ts +563 -723
  63. package/types/resources/Feature.d.ts +117 -433
  64. package/types/resources/GatewayErrorDetail.d.ts +16 -72
  65. package/types/resources/Gift.d.ts +265 -432
  66. package/types/resources/Hierarchy.d.ts +8 -36
  67. package/types/resources/HostedPage.d.ts +1017 -1153
  68. package/types/resources/ImpactedItem.d.ts +13 -50
  69. package/types/resources/ImpactedItemPrice.d.ts +13 -15
  70. package/types/resources/ImpactedSubscription.d.ts +13 -45
  71. package/types/resources/InAppSubscription.d.ts +93 -389
  72. package/types/resources/Installment.d.ts +35 -110
  73. package/types/resources/InstallmentConfig.d.ts +54 -155
  74. package/types/resources/InstallmentDetail.d.ts +19 -27
  75. package/types/resources/Invoice.d.ts +1574 -3157
  76. package/types/resources/InvoiceEstimate.d.ts +131 -161
  77. package/types/resources/Item.d.ts +133 -611
  78. package/types/resources/ItemEntitlement.d.ts +78 -215
  79. package/types/resources/ItemFamily.d.ts +69 -178
  80. package/types/resources/ItemPrice.d.ts +291 -1203
  81. package/types/resources/Metadata.d.ts +3 -5
  82. package/types/resources/Order.d.ts +538 -1471
  83. package/types/resources/PaymentIntent.d.ts +163 -347
  84. package/types/resources/PaymentReferenceNumber.d.ts +7 -29
  85. package/types/resources/PaymentSource.d.ts +476 -1272
  86. package/types/resources/PaymentVoucher.d.ts +87 -306
  87. package/types/resources/PortalSession.d.ts +71 -207
  88. package/types/resources/PriceVariant.d.ts +91 -279
  89. package/types/resources/PricingPageSession.d.ts +92 -41
  90. package/types/resources/PromotionalCredit.d.ts +90 -346
  91. package/types/resources/Purchase.d.ts +185 -315
  92. package/types/resources/Quote.d.ts +1406 -887
  93. package/types/resources/QuoteLineGroup.d.ts +125 -452
  94. package/types/resources/QuotedCharge.d.ts +45 -274
  95. package/types/resources/QuotedSubscription.d.ts +100 -488
  96. package/types/resources/Ramp.d.ts +233 -724
  97. package/types/resources/ResourceMigration.d.ts +25 -80
  98. package/types/resources/SiteMigrationDetail.d.ts +34 -112
  99. package/types/resources/Subscription.d.ts +2390 -4335
  100. package/types/resources/SubscriptionEntitlement.d.ts +59 -160
  101. package/types/resources/SubscriptionEstimate.d.ts +51 -75
  102. package/types/resources/TaxWithheld.d.ts +15 -40
  103. package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
  104. package/types/resources/TimeMachine.d.ts +43 -97
  105. package/types/resources/Token.d.ts +15 -85
  106. package/types/resources/Transaction.d.ts +278 -900
  107. package/types/resources/UnbilledCharge.d.ts +189 -164
  108. package/types/resources/Usage.d.ts +89 -279
  109. package/types/resources/VirtualBankAccount.d.ts +103 -255
  110. package/types/resources/filter.d.ts +52 -0
  111. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
  112. package/.github/ISSUE_TEMPLATE/config.yml +0 -6
  113. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
  114. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  115. package/lib/chargebee.js +0 -512
  116. package/lib/resources/api_endpoints.js +0 -2912
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
@@ -1,362 +1,178 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface PaymentIntent {
4
-
5
- /**
6
- * @description Identifier for PaymentIntent.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description Current status of PaymentIntent. \* in_progress - Status will be in_progress if the Active Payment Attempt state is in requires_identification, requires_challenge or requires_redirection. \* authorized - 3DS verification successfully completed. \* consumed - If any Chargebee operation such as create subscription etc. is completed using the intent, it will be in consumed state. Intent cannot be used if it&#x27;s already in consumed state. \* expired - Intent has expired, since it was not consumed before the predefined time-out. \* inited - Intent is initialized.
14
-
15
- */
16
-
17
- status:'consumed' | 'in_progress' | 'inited' | 'expired' | 'authorized';
18
-
19
- /**
20
- * @description The currency code (ISO 4217 format) of the amount used in transaction.
21
-
22
- */
23
-
24
- currency_code?:string;
25
-
26
- /**
27
- * @description Amount(in cents) to be authorized for 3DS flow.
28
-
29
- */
30
-
31
- amount:number;
32
-
33
- /**
34
- * @description The gateway account used for performing the 3DS flow.
35
-
36
- */
37
-
38
- gateway_account_id:string;
39
-
40
- /**
41
- * @description Timestamp indicating when the PaymentIntent will expire if left unconsumed.
42
-
43
- */
44
-
45
- expires_at:number;
46
-
47
- /**
48
- * @description Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.
49
-
50
- */
51
-
52
- reference_id?:string;
53
-
54
- /**
55
- * @description The payment method of this intent \* google_pay - google_pay \* apple_pay - apple_pay \* ideal - ideal \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* pay_to - PayTo \* venmo - Venmo \* dotpay - dotpay \* giropay - giropay \* sofort - sofort \* sepa_instant_transfer - SEPA Instant Transfer \* direct_debit - direct_debit \* paypal_express_checkout - paypal_express_checkout \* boleto - boleto \* faster_payments - Faster Payments \* amazon_payments - amazon_payments \* card - card \* upi - upi
56
-
57
- */
58
-
59
- payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card' | 'online_banking_poland';
60
-
61
- /**
62
- * @description The URL the customer will be directed to once 3DS verification is successful. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
63
-
64
- */
65
-
66
- success_url?:string;
67
-
68
- /**
69
- * @description The URL the customer will be directed to when 3DS verification fails. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
70
-
71
- */
72
-
73
- failure_url?:string;
74
-
75
- /**
76
- * @description Timestamp indicating when the PaymentIntent was created.
77
-
78
- */
79
-
80
- created_at:number;
81
-
82
- /**
83
- * @description Timestamp indicating when the PaymentIntent was last modified.
84
-
85
- */
86
-
87
- modified_at:number;
88
-
89
- /**
90
- * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
91
-
92
- */
93
-
94
- resource_version?:number;
95
-
96
- /**
97
- * @description Timestamp indicating when this payment intent was last updated.
98
-
99
- */
100
-
101
- updated_at?:number;
102
-
103
- /**
104
- * @description The unique ID of the customer for which this payment_intent should be created. If not provided, a new customer is created and its ID is autogenerated.
105
- **See also**
106
-
107
- [Customer resource lookup and creation](/docs/api/payment_intents#customer_lookup)
108
-
109
- */
110
-
111
- customer_id:string;
112
-
113
- /**
114
- * @description Gateway associated with the PaymentIntent.
115
-
116
- */
117
-
118
- gateway?:string;
119
-
120
- /**
121
- * @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) of this &#x60;payment_intent&#x60;
122
-
123
- */
124
-
125
- business_entity_id?:string;
126
-
127
- /**
128
- * @description Active payment attempt for the PaymentIntent.
129
-
130
- */
131
-
132
- active_payment_attempt?:PaymentIntent.PaymentAttempt;
6
+ id: string;
7
+ status: 'inited' | 'in_progress' | 'authorized' | 'consumed' | 'expired';
8
+ currency_code?: string;
9
+ amount: number;
10
+ gateway_account_id: string;
11
+ expires_at: number;
12
+ reference_id?: string;
13
+ payment_method_type?:
14
+ | 'card'
15
+ | 'ideal'
16
+ | 'sofort'
17
+ | 'bancontact'
18
+ | 'google_pay'
19
+ | 'dotpay'
20
+ | 'giropay'
21
+ | 'apple_pay'
22
+ | 'upi'
23
+ | 'netbanking_emandates'
24
+ | 'paypal_express_checkout'
25
+ | 'direct_debit'
26
+ | 'boleto'
27
+ | 'venmo'
28
+ | 'amazon_payments'
29
+ | 'pay_to'
30
+ | 'faster_payments'
31
+ | 'sepa_instant_transfer'
32
+ | 'klarna_pay_now'
33
+ | 'online_banking_poland';
34
+ success_url?: string;
35
+ failure_url?: string;
36
+ created_at: number;
37
+ modified_at: number;
38
+ resource_version?: number;
39
+ updated_at?: number;
40
+ customer_id: string;
41
+ gateway?: string;
42
+ active_payment_attempt?: PaymentIntent.PaymentAttempt;
43
+ business_entity_id?: string;
133
44
  }
134
- export namespace PaymentIntent {
135
- export class PaymentIntentResource {
136
- /**
137
- * @description Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards.
138
-
139
- While creating, specify the appropriate gateway account and amount. Exact amount can be estimated using our [Estimate API](/docs/api/estimates).
140
-
141
- #### Customer resource lookup and creation {#customer_lookup}
142
-
143
- When [customer[id]](/docs/api/payment_intents#create_a_payment_intent_customer_id) is provided for this operation, it is looked up by Chargebee, and if found, the payment_intent is created for it. If not found, a new customer resource is created with the ID provided, and the payment_intent is created.
144
45
 
145
- ##### Multiple business entities
146
-
147
- If multiple [business entities](/docs/api/advanced-features#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site.
148
-
149
- */
150
-
151
- create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
152
-
153
- /**
154
- * @description Updating properties on a PaymentIntent object. All the subsequent 3DS transaction attempts will have the updated values.
155
-
156
- */
157
-
158
- update(payment_intent_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
159
-
160
- /**
161
- * @description Retrieves the PaymentIntent resource.
162
-
163
- */
164
-
165
- retrieve(payment_intent_id:string):ChargebeeRequest<RetrieveResponse>;
166
- }
167
- export interface CreateResponse {
168
- payment_intent:PaymentIntent;
46
+ export namespace PaymentIntent {
47
+ export class PaymentIntentResource {
48
+ create(
49
+ input: CreateInputParam,
50
+ headers?: ChargebeeRequestHeader,
51
+ ): Promise<ChargebeeResponse<CreateResponse>>;
52
+
53
+ update(
54
+ payment_intent_id: string,
55
+ input?: UpdateInputParam,
56
+ headers?: ChargebeeRequestHeader,
57
+ ): Promise<ChargebeeResponse<UpdateResponse>>;
58
+
59
+ retrieve(
60
+ payment_intent_id: string,
61
+ headers?: ChargebeeRequestHeader,
62
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
169
63
  }
170
- export interface CreateInputParam {
171
-
172
- /**
173
- * @description Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site.
174
- **Note**
175
64
 
176
- An alternative way of passing this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe-header-main).
177
- **See also**
178
-
179
- [Customer resource lookup and creation.](/docs/api/payment_intents#customer_lookup)
180
-
181
- */
182
-
183
- business_entity_id?:string;
184
-
185
- /**
186
- * @description The unique ID of the customer for which this &#x60;payment_intent&#x60; should be created. If not provided, a new customer is created and its ID is autogenerated.
187
- **See also**
188
-
189
- [Customer resource lookup and creation](/docs/api/payment_intents#customer_lookup)
190
- .
191
-
192
- */
193
-
194
- customer_id?:string;
195
-
196
- /**
197
- * @description Amount(in cents) to be authorized for 3DS flow.
198
-
199
- */
200
-
201
- amount:number;
202
-
203
- /**
204
- * @description The currency code (ISO 4217 format) of the amount used in transaction.
205
-
206
- */
207
-
208
- currency_code:string;
209
-
210
- /**
211
- * @description The gateway account used for performing the 3DS flow.
212
-
213
- */
214
-
215
- gateway_account_id?:string;
216
-
217
- /**
218
- * @description Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.
219
-
220
- */
221
-
222
- reference_id?:string;
223
-
224
- /**
225
- * @description The payment method of this intent. \* google_pay - google_pay \* boleto - boleto \* apple_pay - apple_pay \* ideal - ideal \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* direct_debit - direct_debit \* card - card \* dotpay - dotpay \* giropay - giropay \* upi - upi \* sofort - sofort \* paypal_express_checkout - paypal_express_checkout
226
-
227
- */
228
-
229
- payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card' | 'online_banking_poland';
230
-
231
- /**
232
- * @description The URL the customer will be directed to once 3DS verification is successful. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
233
-
234
- */
235
-
236
- success_url?:string;
237
-
238
- /**
239
- * @description The URL the customer will be directed to when 3DS verification fails. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
240
-
241
- */
242
-
243
- failure_url?:string;
244
- }
245
- export interface UpdateResponse {
246
- payment_intent:PaymentIntent;
65
+ export interface CreateResponse {
66
+ payment_intent: PaymentIntent;
247
67
  }
248
- export interface UpdateInputParam {
249
-
250
- /**
251
- * @description Amount(in cents) to be authorized for 3DS flow.
252
-
253
- */
254
-
255
- amount?:number;
256
-
257
- /**
258
- * @description The currency code (ISO 4217 format) of the amount used in transaction.
259
-
260
- */
261
-
262
- currency_code?:string;
263
-
264
- /**
265
- * @description The gateway account used for performing the 3DS flow.
266
68
 
267
- */
268
-
269
- gateway_account_id?:string;
270
-
271
- /**
272
- * @description The payment method of this intent. \* google_pay - google_pay \* boleto - boleto \* apple_pay - apple_pay \* ideal - ideal \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* direct_debit - direct_debit \* card - card \* dotpay - dotpay \* giropay - giropay \* upi - upi \* sofort - sofort \* paypal_express_checkout - paypal_express_checkout
273
-
274
- */
275
-
276
- payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card' | 'online_banking_poland';
277
-
278
- /**
279
- * @description The URL the customer will be directed to once 3DS verification is successful. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
280
-
281
- */
282
-
283
- success_url?:string;
284
-
285
- /**
286
- * @description The URL the customer will be directed to when 3DS verification fails. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
287
-
288
- */
289
-
290
- failure_url?:string;
291
- }
292
- export interface RetrieveResponse {
293
- payment_intent:PaymentIntent;
69
+ export interface UpdateResponse {
70
+ payment_intent: PaymentIntent;
294
71
  }
295
-
296
- export interface PaymentAttempt {
297
- /**
298
- * @description Identifier for PaymentIntent&#x27;s active payment attempt.
299
-
300
- */
301
-
302
- id?:string;
303
-
304
- /**
305
- * @description Current status of active payment attempt \* authorized - 3DS verification successfully completed. \* requires_challenge - The transaction has to go through 3DS Challenge flow and the customer needs to authenticate via 3DS 2.0 \* pending_authorization - Waiting for the authorization. \* requires_redirection - The transaction has to go through 3DS Redirection flow and the customer needs to authenticate via 3DS 1.0 \* inited - Payment attempt is initialized. \* refused - 3DS verification attempt failed. \* requires_identification - Customer&#x27;s device fingerprint is used to verify their identity. It needs to be sent to the Issuing Bank for verification.
306
-
307
- */
308
-
309
- status:'pending_authorization' | 'inited' | 'refused' | 'requires_challenge' | 'authorized' | 'requires_identification' | 'requires_redirection';
310
-
311
- /**
312
- * @description The payment method of this attempt \* venmo - Venmo \* ideal - ideal \* sofort - sofort \* paypal_express_checkout - paypal_express_checkout \* giropay - giropay \* sepa_instant_transfer - SEPA Instant Transfer \* bancontact - bancontact \* google_pay - google_pay \* card - card \* faster_payments - faster payments \* upi - upi \* amazon_payments - amazon_payments \* direct_debit - direct_debit \* dotpay - dotpay \* apple_pay - apple_pay \* boleto - boleto \* pay_to - PayTo \* netbanking_emandates - netbanking_emandates
313
-
314
- */
315
-
316
- payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card' | 'online_banking_poland';
317
-
318
- /**
319
- * @description Reference of PaymentIntent at gateway
320
-
321
- */
322
-
323
- id_at_gateway?:string;
324
-
325
- /**
326
- * @description Error code received from the payment gateway on failure.
327
72
 
328
- */
329
-
330
- error_code?:string;
331
-
332
- /**
333
- * @description Error message received from the payment gateway on failure.
334
-
335
- */
336
-
337
- error_text?:string;
338
-
339
- /**
340
- * @description Timestamp indicating when the active payment attempt was created.
341
-
342
- */
343
-
344
- created_at:number;
345
-
346
- /**
347
- * @description Timestamp indicating when the active payment attempt was last modified.
73
+ export interface RetrieveResponse {
74
+ payment_intent: PaymentIntent;
75
+ }
348
76
 
349
- */
350
-
351
- modified_at:number;
352
-
353
- /**
354
- * @description Comprehensive information regarding the error experienced during an unsuccessful or declined transaction. Learn more about [gateway error references](gateway_error_references)
355
- This attribute will be available soon
77
+ export interface PaymentAttempt {
78
+ id?: string;
79
+ status:
80
+ | 'inited'
81
+ | 'requires_identification'
82
+ | 'requires_challenge'
83
+ | 'requires_redirection'
84
+ | 'authorized'
85
+ | 'refused'
86
+ | 'pending_authorization';
87
+ payment_method_type?:
88
+ | 'card'
89
+ | 'ideal'
90
+ | 'sofort'
91
+ | 'bancontact'
92
+ | 'google_pay'
93
+ | 'dotpay'
94
+ | 'giropay'
95
+ | 'apple_pay'
96
+ | 'upi'
97
+ | 'netbanking_emandates'
98
+ | 'paypal_express_checkout'
99
+ | 'direct_debit'
100
+ | 'boleto'
101
+ | 'venmo'
102
+ | 'amazon_payments'
103
+ | 'pay_to'
104
+ | 'faster_payments'
105
+ | 'sepa_instant_transfer'
106
+ | 'klarna_pay_now'
107
+ | 'online_banking_poland';
108
+ id_at_gateway?: string;
109
+ error_code?: string;
110
+ error_text?: string;
111
+ created_at: number;
112
+ modified_at: number;
113
+ error_detail?: GatewayErrorDetail;
114
+ }
115
+ // REQUEST PARAMS
116
+ //---------------
356
117
 
357
- */
358
-
359
- error_detail?:GatewayErrorDetail;
118
+ export interface CreateInputParam {
119
+ business_entity_id?: string;
120
+ customer_id?: string;
121
+ amount: number;
122
+ currency_code: string;
123
+ gateway_account_id?: string;
124
+ reference_id?: string;
125
+ payment_method_type?:
126
+ | 'card'
127
+ | 'ideal'
128
+ | 'sofort'
129
+ | 'bancontact'
130
+ | 'google_pay'
131
+ | 'dotpay'
132
+ | 'giropay'
133
+ | 'apple_pay'
134
+ | 'upi'
135
+ | 'netbanking_emandates'
136
+ | 'paypal_express_checkout'
137
+ | 'direct_debit'
138
+ | 'boleto'
139
+ | 'venmo'
140
+ | 'amazon_payments'
141
+ | 'pay_to'
142
+ | 'faster_payments'
143
+ | 'sepa_instant_transfer'
144
+ | 'klarna_pay_now'
145
+ | 'online_banking_poland';
146
+ success_url?: string;
147
+ failure_url?: string;
148
+ }
149
+ export interface UpdateInputParam {
150
+ amount?: number;
151
+ currency_code?: string;
152
+ gateway_account_id?: string;
153
+ payment_method_type?:
154
+ | 'card'
155
+ | 'ideal'
156
+ | 'sofort'
157
+ | 'bancontact'
158
+ | 'google_pay'
159
+ | 'dotpay'
160
+ | 'giropay'
161
+ | 'apple_pay'
162
+ | 'upi'
163
+ | 'netbanking_emandates'
164
+ | 'paypal_express_checkout'
165
+ | 'direct_debit'
166
+ | 'boleto'
167
+ | 'venmo'
168
+ | 'amazon_payments'
169
+ | 'pay_to'
170
+ | 'faster_payments'
171
+ | 'sepa_instant_transfer'
172
+ | 'klarna_pay_now'
173
+ | 'online_banking_poland';
174
+ success_url?: string;
175
+ failure_url?: string;
360
176
  }
361
177
  }
362
- }
178
+ }
@@ -1,33 +1,11 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface PaymentReferenceNumber {
4
-
5
- /**
6
- * @description The &#x60;id&#x60; of the &#x60;payment_reference_number&#x60; resource is a unique identifier assigned to the PRN to track and reference in systems.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description This attribute helps &#x60;type&#x60; field in the API, specifies how to reconcile offline payments, and generate &#x60;payment_reference_number&#x60; on invoices based on country-specific rules. Setting the &#x60;type&#x60; field generates &#x60;payment_reference_number&#x60; for the respective country and includes them on the invoice for correct reconciliation. \* frn - The reference number printed on invoices in Finland is utilized by buyers for payment via bank transfer, facilitating the association of payments with invoices. \* fik - Denmark based number calculated using recursive MOD 10 algorithm. \* kid - The KID number (kundeidentifikasjon) in Norway is an abbreviation for &quot;Customer identification&quot;. It is used to associate payments with the customer and invoice. \* ocr - A OCR-based payment, contains an OCR reference, which is used to identify the vendor and the purchase document in connection with a payment. Swedish reference number can contain customer ID and/or invoice number to identify customer and invoice.
14
-
15
- */
16
-
17
- type:'frn' | 'kid' | 'fik' | 'swiss_reference' | 'ocr';
18
-
19
- /**
20
- * @description A number is generated based on the configuration type of the PRN during the invoice creation process.
21
-
22
- */
23
-
24
- number:string;
25
-
26
- /**
27
- * @description The &#x60;invoice_id&#x60; of the payment reference number (PRN) resource is the unique identifier assigned to the invoice that the PRN is associated with.
28
-
29
- */
30
-
31
- invoice_id?:string;
6
+ id: string;
7
+ type: 'kid' | 'ocr' | 'frn' | 'fik' | 'swiss_reference';
8
+ number: string;
9
+ invoice_id?: string;
32
10
  }
33
- }
11
+ }