chargebee 2.41.0 → 3.0.0-beta.2
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/CHANGELOG.md +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +80 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +90 -55
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +24 -35
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +276 -911
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- 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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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 `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`.
|
|
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 `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`.
|
|
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 `resource_version` 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=2#mbe) of this `payment_intent`
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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=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
|
-
|
|
177
|
-
|
|
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 `payment_intent` 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 `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`.
|
|
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 `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`.
|
|
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 `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`.
|
|
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 `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`.
|
|
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'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'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
|
-
|
|
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
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description This attribute helps `type` field in the API, specifies how to reconcile offline payments, and generate `payment_reference_number` on invoices based on country-specific rules. Setting the `type` field generates `payment_reference_number` 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 "Customer identification". 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 `invoice_id` 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
|
+
}
|