chargebee 2.26.1 → 2.27.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/CHANGELOG.md +20 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +8 -1
- package/package.json +1 -1
- package/types/resources/Address.d.ts +0 -10
- package/types/resources/AttachedItem.d.ts +0 -20
- package/types/resources/Card.d.ts +0 -110
- package/types/resources/Comment.d.ts +0 -17
- package/types/resources/Coupon.d.ts +0 -37
- package/types/resources/CouponCode.d.ts +0 -10
- package/types/resources/CouponSet.d.ts +0 -30
- package/types/resources/CreditNote.d.ts +0 -102
- package/types/resources/Customer.d.ts +0 -313
- package/types/resources/DifferentialPrice.d.ts +0 -20
- package/types/resources/Estimate.d.ts +0 -160
- package/types/resources/Event.d.ts +0 -7
- package/types/resources/Export.d.ts +0 -81
- package/types/resources/Feature.d.ts +0 -69
- package/types/resources/Gift.d.ts +0 -55
- package/types/resources/HostedPage.d.ts +0 -166
- package/types/resources/InAppSubscription.d.ts +0 -267
- package/types/resources/Invoice.d.ts +0 -350
- package/types/resources/Item.d.ts +0 -20
- package/types/resources/ItemEntitlement.d.ts +0 -10
- package/types/resources/ItemFamily.d.ts +0 -20
- package/types/resources/ItemPrice.d.ts +0 -20
- package/types/resources/NonSubscription.d.ts +0 -5
- package/types/resources/Order.d.ts +0 -52
- package/types/resources/PaymentIntent.d.ts +0 -25
- package/types/resources/PaymentSource.d.ts +0 -275
- package/types/resources/PaymentVoucher.d.ts +0 -10
- package/types/resources/PortalSession.d.ts +0 -33
- package/types/resources/PromotionalCredit.d.ts +0 -51
- package/types/resources/Purchase.d.ts +0 -68
- package/types/resources/Quote.d.ts +0 -165
- package/types/resources/ResourceMigration.d.ts +0 -5
- package/types/resources/Subscription.d.ts +103 -1001
- package/types/resources/TimeMachine.d.ts +0 -17
- package/types/resources/Token.d.ts +0 -15
- package/types/resources/Transaction.d.ts +0 -30
- package/types/resources/UnbilledCharge.d.ts +0 -46
- package/types/resources/Usage.d.ts +0 -22
- package/types/resources/VirtualBankAccount.d.ts +0 -35
|
@@ -363,20 +363,10 @@ If an addon-item price has [differential pricing](differential_prices?prod_cat_v
|
|
|
363
363
|
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
364
364
|
}
|
|
365
365
|
export interface RetrieveResponse {
|
|
366
|
-
/**
|
|
367
|
-
* @description This API retrieves a specific item price using the id.
|
|
368
|
-
|
|
369
|
-
*/
|
|
370
|
-
|
|
371
366
|
item_price:ItemPrice;
|
|
372
367
|
}
|
|
373
368
|
|
|
374
369
|
export interface UpdateResponse {
|
|
375
|
-
/**
|
|
376
|
-
* @description Updates an item price with the changes specified. Unspecified item price attributes are not modified.
|
|
377
|
-
|
|
378
|
-
*/
|
|
379
|
-
|
|
380
370
|
item_price:ItemPrice;
|
|
381
371
|
}
|
|
382
372
|
export interface UpdateInputParam {
|
|
@@ -579,11 +569,6 @@ If subscriptions, invoices or [differential prices](./differential_prices?prod_c
|
|
|
579
569
|
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
580
570
|
}
|
|
581
571
|
export interface DeleteResponse {
|
|
582
|
-
/**
|
|
583
|
-
* @description Deletes an item price, marking its `status` as `deleted`. If it is part of a subscription or invoice, the item price `status` is marked `archived` instead. Once deleted, the `id` and `name` of the item price can be reused to create a new item price.
|
|
584
|
-
|
|
585
|
-
*/
|
|
586
|
-
|
|
587
572
|
item_price:ItemPrice;
|
|
588
573
|
}
|
|
589
574
|
|
|
@@ -797,11 +782,6 @@ If an addon-item price has [differential pricing](differential_prices?prod_cat_v
|
|
|
797
782
|
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
798
783
|
}
|
|
799
784
|
export interface CreateResponse {
|
|
800
|
-
/**
|
|
801
|
-
* @description This API creates an item price (a price point) for an [item](./items?prod_cat_ver=2).
|
|
802
|
-
|
|
803
|
-
*/
|
|
804
|
-
|
|
805
785
|
item_price:ItemPrice;
|
|
806
786
|
}
|
|
807
787
|
export interface CreateInputParam {
|
|
@@ -33,11 +33,6 @@ declare module 'chargebee' {
|
|
|
33
33
|
process_receipt(non_subscription_app_id:string, input:ProcessReceiptInputParam):ChargebeeRequest<ProcessReceiptResponse>;
|
|
34
34
|
}
|
|
35
35
|
export interface ProcessReceiptResponse {
|
|
36
|
-
/**
|
|
37
|
-
* @description This API is used to sync consumable, non-consumable, and non-renewing product payments in Chargebee.
|
|
38
|
-
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
36
|
non_subscription:NonSubscription;
|
|
42
37
|
}
|
|
43
38
|
export interface ProcessReceiptInputParam {
|
|
@@ -626,13 +626,6 @@ Chargebee no longer supports this endpoint, see [here](https://www.chargebee.com
|
|
|
626
626
|
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
627
627
|
}
|
|
628
628
|
export interface CreateResponse {
|
|
629
|
-
/**
|
|
630
|
-
* @description #### Deprecated
|
|
631
|
-
|
|
632
|
-
Chargebee no longer supports this endpoint, see [here](https://www.chargebee.com/docs/1.0/manual_orders_deprecate.html) for more information. Contact [Support](https://chargebee.freshdesk.com/support/home/) for additional assistance or if you have concerns about this update.
|
|
633
|
-
|
|
634
|
-
*/
|
|
635
|
-
|
|
636
629
|
order:Order;
|
|
637
630
|
}
|
|
638
631
|
export interface CreateInputParam {
|
|
@@ -701,11 +694,6 @@ Chargebee no longer supports this endpoint, see [here](https://www.chargebee.com
|
|
|
701
694
|
batch_id?:string;
|
|
702
695
|
}
|
|
703
696
|
export interface ImportOrderResponse {
|
|
704
|
-
/**
|
|
705
|
-
* @description Import an order for an invoice with one or more line items. The import order bulk operation is to be applied on an imported invoice.
|
|
706
|
-
|
|
707
|
-
*/
|
|
708
|
-
|
|
709
697
|
order:Order;
|
|
710
698
|
}
|
|
711
699
|
export interface ImportOrderInputParam {
|
|
@@ -900,20 +888,10 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
900
888
|
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
901
889
|
}
|
|
902
890
|
export interface AssignOrderNumberResponse {
|
|
903
|
-
/**
|
|
904
|
-
* @description Assigns order number to the order based on the settings, if not already assigned
|
|
905
|
-
|
|
906
|
-
*/
|
|
907
|
-
|
|
908
891
|
order:Order;
|
|
909
892
|
}
|
|
910
893
|
|
|
911
894
|
export interface ResendResponse {
|
|
912
|
-
/**
|
|
913
|
-
* @description Resend an existing order. This will help in resending an existing order in full or partial. Upto 5 resend operations are allowed per . When resent fully, the original order is canceled.
|
|
914
|
-
|
|
915
|
-
*/
|
|
916
|
-
|
|
917
895
|
order:Order;
|
|
918
896
|
}
|
|
919
897
|
export interface ResendInputParam {
|
|
@@ -940,11 +918,6 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
940
918
|
order_line_items?:{fulfillment_quantity?:number,id?:string}[];
|
|
941
919
|
}
|
|
942
920
|
export interface ReopenResponse {
|
|
943
|
-
/**
|
|
944
|
-
* @description This API is used to re-open a cancelled order
|
|
945
|
-
|
|
946
|
-
*/
|
|
947
|
-
|
|
948
921
|
order:Order;
|
|
949
922
|
}
|
|
950
923
|
export interface ReopenInputParam {
|
|
@@ -957,11 +930,6 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
957
930
|
void_cancellation_credit_notes?:boolean;
|
|
958
931
|
}
|
|
959
932
|
export interface CancelResponse {
|
|
960
|
-
/**
|
|
961
|
-
* @description Cancel order and create a refundable credit note for the order
|
|
962
|
-
|
|
963
|
-
*/
|
|
964
|
-
|
|
965
933
|
order:Order;
|
|
966
934
|
}
|
|
967
935
|
export interface CancelInputParam {
|
|
@@ -1002,20 +970,10 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
1002
970
|
credit_note?:{total?:number};
|
|
1003
971
|
}
|
|
1004
972
|
export interface RetrieveResponse {
|
|
1005
|
-
/**
|
|
1006
|
-
* @description Retrieves an order corresponding to the order id passed.
|
|
1007
|
-
|
|
1008
|
-
*/
|
|
1009
|
-
|
|
1010
973
|
order:Order;
|
|
1011
974
|
}
|
|
1012
975
|
|
|
1013
976
|
export interface UpdateResponse {
|
|
1014
|
-
/**
|
|
1015
|
-
* @description Updates an order. If the status of an order is changed while updating the order, the status_update_at attribute is set with the current time.
|
|
1016
|
-
|
|
1017
|
-
*/
|
|
1018
|
-
|
|
1019
977
|
order:Order;
|
|
1020
978
|
}
|
|
1021
979
|
export interface UpdateInputParam {
|
|
@@ -1133,20 +1091,10 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
1133
1091
|
order_line_items?:{id?:string,sku?:string,status?:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned'}[];
|
|
1134
1092
|
}
|
|
1135
1093
|
export interface DeleteResponse {
|
|
1136
|
-
/**
|
|
1137
|
-
* @description Deletes only [Imported Order](#import_an_order) .Delete does not happen if the order was refunded. It goes through if order refund was initiated and is in "refund_due" state.
|
|
1138
|
-
|
|
1139
|
-
*/
|
|
1140
|
-
|
|
1141
1094
|
order:Order;
|
|
1142
1095
|
}
|
|
1143
1096
|
|
|
1144
1097
|
export interface CreateRefundableCreditNoteResponse {
|
|
1145
|
-
/**
|
|
1146
|
-
* @description This API is used to create a refundable credit note for the order
|
|
1147
|
-
|
|
1148
|
-
*/
|
|
1149
|
-
|
|
1150
1098
|
order:Order;
|
|
1151
1099
|
}
|
|
1152
1100
|
export interface CreateRefundableCreditNoteInputParam {
|
|
@@ -165,20 +165,10 @@ If multiple [business entities](/docs/api/advanced-features#mbe) are created for
|
|
|
165
165
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
166
166
|
}
|
|
167
167
|
export interface RetrieveResponse {
|
|
168
|
-
/**
|
|
169
|
-
* @description Retrieves the PaymentIntent resource.
|
|
170
|
-
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
168
|
payment_intent:PaymentIntent;
|
|
174
169
|
}
|
|
175
170
|
|
|
176
171
|
export interface UpdateResponse {
|
|
177
|
-
/**
|
|
178
|
-
* @description Updating properties on a PaymentIntent object. All the subsequent 3DS transaction attempts will have the updated values.
|
|
179
|
-
|
|
180
|
-
*/
|
|
181
|
-
|
|
182
172
|
payment_intent:PaymentIntent;
|
|
183
173
|
}
|
|
184
174
|
export interface UpdateInputParam {
|
|
@@ -226,21 +216,6 @@ If multiple [business entities](/docs/api/advanced-features#mbe) are created for
|
|
|
226
216
|
failure_url?:string;
|
|
227
217
|
}
|
|
228
218
|
export interface CreateResponse {
|
|
229
|
-
/**
|
|
230
|
-
* @description Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards.
|
|
231
|
-
|
|
232
|
-
While creating, specify the appropriate gateway account and amount. Exact amount can be estimated using our [Estimate API](/docs/api/estimates).
|
|
233
|
-
|
|
234
|
-
#### Customer resource lookup and creation {#customer_lookup}
|
|
235
|
-
|
|
236
|
-
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.
|
|
237
|
-
|
|
238
|
-
##### Multiple business entities
|
|
239
|
-
|
|
240
|
-
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.
|
|
241
|
-
|
|
242
|
-
*/
|
|
243
|
-
|
|
244
219
|
payment_intent:PaymentIntent;
|
|
245
220
|
}
|
|
246
221
|
export interface CreateInputParam {
|
|
@@ -344,20 +344,8 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
344
344
|
update_bank_account(cust_payment_source_id:string, input?:UpdateBankAccountInputParam):ChargebeeRequest<UpdateBankAccountResponse>;
|
|
345
345
|
}
|
|
346
346
|
export interface CreateUsingPermanentTokenResponse {
|
|
347
|
-
/**
|
|
348
|
-
* @description This API provides an alternative way to create a payment source using a permanent token, instead of having to add the full payment method details via API or the Chargebee UI. Permanent tokens are provided by payment gateways such as Stripe.
|
|
349
|
-
Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
350
|
-
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
347
|
customer:Customer;
|
|
354
348
|
|
|
355
|
-
/**
|
|
356
|
-
* @description This API provides an alternative way to create a payment source using a permanent token, instead of having to add the full payment method details via API or the Chargebee UI. Permanent tokens are provided by payment gateways such as Stripe.
|
|
357
|
-
Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
358
|
-
|
|
359
|
-
*/
|
|
360
|
-
|
|
361
349
|
payment_source:PaymentSource;
|
|
362
350
|
}
|
|
363
351
|
export interface CreateUsingPermanentTokenInputParam {
|
|
@@ -426,64 +414,14 @@ Storing card after successful 3DS completion is not supported in this API. Use [
|
|
|
426
414
|
additional_information?:object;
|
|
427
415
|
}
|
|
428
416
|
export interface DeleteResponse {
|
|
429
|
-
/**
|
|
430
|
-
* @description Deletes a payment source. Once the payment source is deleted, if
|
|
431
|
-
|
|
432
|
-
* **Deleted payment source is Primary, and Backup is available**
|
|
433
|
-
* The Backup payment source will become the Primary payment source.
|
|
434
|
-
* **Deleted payment source is Primary, and no Backup is available**
|
|
435
|
-
* The other payment source available, but not assigned to any subscription, will become the Primary payment source. **Note** : *When multiple payment sources exist, the payment method added most recently will be considered*.
|
|
436
|
-
|
|
437
|
-
* If other payment sources available are assigned to subscriptions, the auto collection attribute for the customer will be set to Off, and the events *card_deleted* and *payment_source_deleted* will be triggered.
|
|
438
|
-
* **Deleted payment source is attached to subscriptions**
|
|
439
|
-
* Dunning will be initiated for subscriptions attached to this payment source if auto collection is set to On, and when no customer default is present.
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
|
|
444
|
-
**Note** :
|
|
445
|
-
If you delete the only available payment method of a customer in Chargebee, it also deletes the customer's record at the gateway. To delete the payment method locally(delete only in Chargebee), use [Local Delete a Payment Source API](/docs/api/payment_sources#local_delete_a_payment_source).
|
|
446
|
-
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
417
|
customer:Customer;
|
|
450
418
|
|
|
451
|
-
/**
|
|
452
|
-
* @description Deletes a payment source. Once the payment source is deleted, if
|
|
453
|
-
|
|
454
|
-
* **Deleted payment source is Primary, and Backup is available**
|
|
455
|
-
* The Backup payment source will become the Primary payment source.
|
|
456
|
-
* **Deleted payment source is Primary, and no Backup is available**
|
|
457
|
-
* The other payment source available, but not assigned to any subscription, will become the Primary payment source. **Note** : *When multiple payment sources exist, the payment method added most recently will be considered*.
|
|
458
|
-
|
|
459
|
-
* If other payment sources available are assigned to subscriptions, the auto collection attribute for the customer will be set to Off, and the events *card_deleted* and *payment_source_deleted* will be triggered.
|
|
460
|
-
* **Deleted payment source is attached to subscriptions**
|
|
461
|
-
* Dunning will be initiated for subscriptions attached to this payment source if auto collection is set to On, and when no customer default is present.
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
|
|
466
|
-
**Note** :
|
|
467
|
-
If you delete the only available payment method of a customer in Chargebee, it also deletes the customer's record at the gateway. To delete the payment method locally(delete only in Chargebee), use [Local Delete a Payment Source API](/docs/api/payment_sources#local_delete_a_payment_source).
|
|
468
|
-
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
419
|
payment_source:PaymentSource;
|
|
472
420
|
}
|
|
473
421
|
|
|
474
422
|
export interface CreateCardResponse {
|
|
475
|
-
/**
|
|
476
|
-
* @description Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
477
|
-
|
|
478
|
-
*/
|
|
479
|
-
|
|
480
423
|
customer:Customer;
|
|
481
424
|
|
|
482
|
-
/**
|
|
483
|
-
* @description Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
484
|
-
|
|
485
|
-
*/
|
|
486
|
-
|
|
487
425
|
payment_source:PaymentSource;
|
|
488
426
|
}
|
|
489
427
|
export interface CreateCardInputParam {
|
|
@@ -510,13 +448,6 @@ If you delete the only available payment method of a customer in Chargebee, it a
|
|
|
510
448
|
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
|
|
511
449
|
}
|
|
512
450
|
export interface VerifyBankAccountResponse {
|
|
513
|
-
/**
|
|
514
|
-
* @description This API can be used to verify bank accounts which have been added as payment source. This is applicable for **Stripe ACH with micro-deposit mode bank accounts** only. Stripe handles verification in two ways - via Plaid, and micro-deposit.
|
|
515
|
-
|
|
516
|
-
For verifying bank accounts via **micro-deposit**, Stripe deposits two small amounts to the bank account being added. These deposits will take 1-2 business days to appear on the customer's bank statement. The bank statement description for the two micro-deposits contains the amount and the values deposited. Your customer will need to relay the value of the two deposits to you, after which you can verify the bank account. Once the bank account has been verified, the payment source will be marked as "Valid".
|
|
517
|
-
|
|
518
|
-
*/
|
|
519
|
-
|
|
520
451
|
payment_source:PaymentSource;
|
|
521
452
|
}
|
|
522
453
|
export interface VerifyBankAccountInputParam {
|
|
@@ -616,13 +547,6 @@ For verifying bank accounts via **micro-deposit**, Stripe deposits two small amo
|
|
|
616
547
|
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
617
548
|
}
|
|
618
549
|
export interface ExportPaymentSourceResponse {
|
|
619
|
-
/**
|
|
620
|
-
* @description Copies this payment source information to the gateway specified in the API.
|
|
621
|
-
|
|
622
|
-
This is useful if you want to port your customer's card details into another gateway.
|
|
623
|
-
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
550
|
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
627
551
|
}
|
|
628
552
|
export interface ExportPaymentSourceInputParam {
|
|
@@ -635,18 +559,8 @@ This is useful if you want to port your customer's card details into anothe
|
|
|
635
559
|
gateway_account_id:string;
|
|
636
560
|
}
|
|
637
561
|
export interface CreateUsingPaymentIntentResponse {
|
|
638
|
-
/**
|
|
639
|
-
* @description Used to attach the card to the customer after 3DS completion. [Learn more](/docs/api/3ds_card_payments) on the 3DS implementation via Chargebee APIs.
|
|
640
|
-
|
|
641
|
-
*/
|
|
642
|
-
|
|
643
562
|
customer:Customer;
|
|
644
563
|
|
|
645
|
-
/**
|
|
646
|
-
* @description Used to attach the card to the customer after 3DS completion. [Learn more](/docs/api/3ds_card_payments) on the 3DS implementation via Chargebee APIs.
|
|
647
|
-
|
|
648
|
-
*/
|
|
649
|
-
|
|
650
564
|
payment_source:PaymentSource;
|
|
651
565
|
}
|
|
652
566
|
export interface CreateUsingPaymentIntentInputParam {
|
|
@@ -673,27 +587,12 @@ This is useful if you want to port your customer's card details into anothe
|
|
|
673
587
|
payment_intent?:{additional_info?:object,additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
674
588
|
}
|
|
675
589
|
export interface RetrieveResponse {
|
|
676
|
-
/**
|
|
677
|
-
* @description Retrieves the payment source identified by the unique identifier.
|
|
678
|
-
|
|
679
|
-
*/
|
|
680
|
-
|
|
681
590
|
payment_source:PaymentSource;
|
|
682
591
|
}
|
|
683
592
|
|
|
684
593
|
export interface CreateVoucherPaymentSourceResponse {
|
|
685
|
-
/**
|
|
686
|
-
* @description Create a voucher payment method for the payment source.
|
|
687
|
-
|
|
688
|
-
*/
|
|
689
|
-
|
|
690
594
|
customer:Customer;
|
|
691
595
|
|
|
692
|
-
/**
|
|
693
|
-
* @description Create a voucher payment method for the payment source.
|
|
694
|
-
|
|
695
|
-
*/
|
|
696
|
-
|
|
697
596
|
payment_source:PaymentSource;
|
|
698
597
|
}
|
|
699
598
|
export interface CreateVoucherPaymentSourceInputParam {
|
|
@@ -713,20 +612,8 @@ This is useful if you want to port your customer's card details into anothe
|
|
|
713
612
|
voucher_payment_source?:{billing_address?:object,gateway_account_id?:string,tax_id?:string,voucher_type:VoucherType};
|
|
714
613
|
}
|
|
715
614
|
export interface CreateUsingTempTokenResponse {
|
|
716
|
-
/**
|
|
717
|
-
* @description This API offers an alternative way to create a payment source using a single-use gateway temporary token, which is generally provided by your payment gateway. In the case of Stripe, this temporary token is generated according to the instruction detailed in [Stripe documentation](https://stripe.com/docs/api/tokens/create_card).
|
|
718
|
-
Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
719
|
-
|
|
720
|
-
*/
|
|
721
|
-
|
|
722
615
|
customer:Customer;
|
|
723
616
|
|
|
724
|
-
/**
|
|
725
|
-
* @description This API offers an alternative way to create a payment source using a single-use gateway temporary token, which is generally provided by your payment gateway. In the case of Stripe, this temporary token is generated according to the instruction detailed in [Stripe documentation](https://stripe.com/docs/api/tokens/create_card).
|
|
726
|
-
Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
727
|
-
|
|
728
|
-
*/
|
|
729
|
-
|
|
730
617
|
payment_source:PaymentSource;
|
|
731
618
|
}
|
|
732
619
|
export interface CreateUsingTempTokenInputParam {
|
|
@@ -795,38 +682,8 @@ Storing card after successful 3DS completion is not supported in this API. Use [
|
|
|
795
682
|
additional_information?:object;
|
|
796
683
|
}
|
|
797
684
|
export interface UpdateCardResponse {
|
|
798
|
-
/**
|
|
799
|
-
* @description Merchants look to update card details when:
|
|
800
|
-
|
|
801
|
-
* The billing address of a customer has changed. In such a case, modify the billing address in the Chargebee and the payment gateway.
|
|
802
|
-
* The expiration date of the card has been extended by the bank. (This usually happens when the date of card expiry is in near future).
|
|
803
|
-
|
|
804
|
-
Multiple parameters such as address, expiry date, month, and so on, can be updated through this API.
|
|
805
|
-
|
|
806
|
-
Meta data can also be added additionally(supported in Stripe only). Metadata is a JSON object. It is used to store additional information about customers.
|
|
807
|
-
|
|
808
|
-
In **Stripe** and **Braintree** payment gateways, changes in card details are auto-updated. This feature can also be used for other payment gateways in which auto-update is not enabled or is not supported by Chargebee.
|
|
809
|
-
**Note** : This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html), [Braintree](https://www.chargebee.com/docs/2.0/braintree.html), [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html), [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html), and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html). For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) to update existing card details. For example, consider a customer not using the gateways mentioned above and wants to update the [card\[billing_addr1\]](/docs/api/payment_sources#update_a_card_payment_source_card_billing_addr1) parameter. In such a case, the customer must re-enter the value of all the parameters present in the [card](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) object.
|
|
810
|
-
|
|
811
|
-
*/
|
|
812
|
-
|
|
813
685
|
customer:Customer;
|
|
814
686
|
|
|
815
|
-
/**
|
|
816
|
-
* @description Merchants look to update card details when:
|
|
817
|
-
|
|
818
|
-
* The billing address of a customer has changed. In such a case, modify the billing address in the Chargebee and the payment gateway.
|
|
819
|
-
* The expiration date of the card has been extended by the bank. (This usually happens when the date of card expiry is in near future).
|
|
820
|
-
|
|
821
|
-
Multiple parameters such as address, expiry date, month, and so on, can be updated through this API.
|
|
822
|
-
|
|
823
|
-
Meta data can also be added additionally(supported in Stripe only). Metadata is a JSON object. It is used to store additional information about customers.
|
|
824
|
-
|
|
825
|
-
In **Stripe** and **Braintree** payment gateways, changes in card details are auto-updated. This feature can also be used for other payment gateways in which auto-update is not enabled or is not supported by Chargebee.
|
|
826
|
-
**Note** : This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html), [Braintree](https://www.chargebee.com/docs/2.0/braintree.html), [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html), [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html), and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html). For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) to update existing card details. For example, consider a customer not using the gateways mentioned above and wants to update the [card\[billing_addr1\]](/docs/api/payment_sources#update_a_card_payment_source_card_billing_addr1) parameter. In such a case, the customer must re-enter the value of all the parameters present in the [card](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) object.
|
|
827
|
-
|
|
828
|
-
*/
|
|
829
|
-
|
|
830
687
|
payment_source:PaymentSource;
|
|
831
688
|
}
|
|
832
689
|
export interface UpdateCardInputParam {
|
|
@@ -853,22 +710,8 @@ In **Stripe** and **Braintree** payment gateways, changes in card details are au
|
|
|
853
710
|
card?:{billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
|
|
854
711
|
}
|
|
855
712
|
export interface SwitchGatewayAccountResponse {
|
|
856
|
-
/**
|
|
857
|
-
* @description Switches the gateway in which this payment source information is stored.
|
|
858
|
-
|
|
859
|
-
This is applicable only if the payment source is present in Spreedly vault.
|
|
860
|
-
|
|
861
|
-
*/
|
|
862
|
-
|
|
863
713
|
customer:Customer;
|
|
864
714
|
|
|
865
|
-
/**
|
|
866
|
-
* @description Switches the gateway in which this payment source information is stored.
|
|
867
|
-
|
|
868
|
-
This is applicable only if the payment source is present in Spreedly vault.
|
|
869
|
-
|
|
870
|
-
*/
|
|
871
|
-
|
|
872
715
|
payment_source:PaymentSource;
|
|
873
716
|
}
|
|
874
717
|
export interface SwitchGatewayAccountInputParam {
|
|
@@ -881,18 +724,8 @@ This is applicable only if the payment source is present in Spreedly vault.
|
|
|
881
724
|
gateway_account_id:string;
|
|
882
725
|
}
|
|
883
726
|
export interface CreateUsingTokenResponse {
|
|
884
|
-
/**
|
|
885
|
-
* @description Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
886
|
-
|
|
887
|
-
*/
|
|
888
|
-
|
|
889
727
|
customer:Customer;
|
|
890
728
|
|
|
891
|
-
/**
|
|
892
|
-
* @description Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
893
|
-
|
|
894
|
-
*/
|
|
895
|
-
|
|
896
729
|
payment_source:PaymentSource;
|
|
897
730
|
}
|
|
898
731
|
export interface CreateUsingTokenInputParam {
|
|
@@ -919,100 +752,14 @@ This is applicable only if the payment source is present in Spreedly vault.
|
|
|
919
752
|
token_id:string;
|
|
920
753
|
}
|
|
921
754
|
export interface DeleteLocalResponse {
|
|
922
|
-
/**
|
|
923
|
-
* @description Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.
|
|
924
|
-
|
|
925
|
-
*/
|
|
926
|
-
|
|
927
755
|
customer:Customer;
|
|
928
756
|
|
|
929
|
-
/**
|
|
930
|
-
* @description Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.
|
|
931
|
-
|
|
932
|
-
*/
|
|
933
|
-
|
|
934
757
|
payment_source:PaymentSource;
|
|
935
758
|
}
|
|
936
759
|
|
|
937
760
|
export interface CreateBankAccountResponse {
|
|
938
|
-
/**
|
|
939
|
-
* @description This API adds a Direct Debit payment source for a customer. The bank account details collected from your customer are passed as input to this API.
|
|
940
|
-
|
|
941
|
-
#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)
|
|
942
|
-
|
|
943
|
-
ACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via [Stripe](https://www.chargebee.com/docs/ach-payments-stripe.html) , [Authorize.Net](https://www.chargebee.com/docs/ach-payments-authorize_net.html), and [GoCardless](https://www.chargebee.com/docs/2.0/gocardless.html).
|
|
944
|
-
|
|
945
|
-
##### Bank account verification
|
|
946
|
-
|
|
947
|
-
Once the bank account has been added, it needs to be verified.
|
|
948
|
-
|
|
949
|
-
* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).
|
|
950
|
-
* For [Authorize.net](https://www.authorize.net/), the verification is done by them in 2-3 days after the account is added. No intervention is needed from your side or your customer.
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
#### Single Euro Payment Area (SEPA)
|
|
955
|
-
|
|
956
|
-
SEPA is an initiative that integrates bank transfer payments denominated in euro. It is supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html), [Stripe](https://www.chargebee.com/docs/sepa-stripe.html) and [Adyen](https://www.chargebee.com/docs/adyen-sepa.html).
|
|
957
|
-
**Note:**
|
|
958
|
-
|
|
959
|
-
* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api#user_details) such as IP address and device information.
|
|
960
|
-
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
961
|
-
|
|
962
|
-
#### Bacs Payment Schemes Limited (Bacs) and Bg Autogiro
|
|
963
|
-
|
|
964
|
-
Bacs is an organization that manages the Direct Debit and Direct Credit payment methods in the UK. Bg Autogiro is a Direct Debit scheme for krona denominated payments in Sweden. Both Bacs and Bg Autogiro are supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html).
|
|
965
|
-
|
|
966
|
-
#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
|
|
967
|
-
|
|
968
|
-
BECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. [GoCardless](https://www.chargebee.com/docs/gocardless.html) supports both.
|
|
969
|
-
|
|
970
|
-
For Direct Debit, the customer needs to accept a mandate that allows the merchant to debit their bank account. This agreement PDF can be obtained using the [Retrieve direct debit agreement PDF API](/docs/api/hosted_pages#retrieve_direct_debit_agreement_pdf).
|
|
971
|
-
|
|
972
|
-
If the customer has already reached the payment source limit allowed for the site, pass `replace_primary_payment_source` as `true`. Alternatively, [delete](/docs/api/payment_sources#delete_a_payment_source) one of the payment sources first and then add the bank account payment source for the customer.
|
|
973
|
-
|
|
974
|
-
*/
|
|
975
|
-
|
|
976
761
|
customer:Customer;
|
|
977
762
|
|
|
978
|
-
/**
|
|
979
|
-
* @description This API adds a Direct Debit payment source for a customer. The bank account details collected from your customer are passed as input to this API.
|
|
980
|
-
|
|
981
|
-
#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)
|
|
982
|
-
|
|
983
|
-
ACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via [Stripe](https://www.chargebee.com/docs/ach-payments-stripe.html) , [Authorize.Net](https://www.chargebee.com/docs/ach-payments-authorize_net.html), and [GoCardless](https://www.chargebee.com/docs/2.0/gocardless.html).
|
|
984
|
-
|
|
985
|
-
##### Bank account verification
|
|
986
|
-
|
|
987
|
-
Once the bank account has been added, it needs to be verified.
|
|
988
|
-
|
|
989
|
-
* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).
|
|
990
|
-
* For [Authorize.net](https://www.authorize.net/), the verification is done by them in 2-3 days after the account is added. No intervention is needed from your side or your customer.
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
#### Single Euro Payment Area (SEPA)
|
|
995
|
-
|
|
996
|
-
SEPA is an initiative that integrates bank transfer payments denominated in euro. It is supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html), [Stripe](https://www.chargebee.com/docs/sepa-stripe.html) and [Adyen](https://www.chargebee.com/docs/adyen-sepa.html).
|
|
997
|
-
**Note:**
|
|
998
|
-
|
|
999
|
-
* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api#user_details) such as IP address and device information.
|
|
1000
|
-
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
1001
|
-
|
|
1002
|
-
#### Bacs Payment Schemes Limited (Bacs) and Bg Autogiro
|
|
1003
|
-
|
|
1004
|
-
Bacs is an organization that manages the Direct Debit and Direct Credit payment methods in the UK. Bg Autogiro is a Direct Debit scheme for krona denominated payments in Sweden. Both Bacs and Bg Autogiro are supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html).
|
|
1005
|
-
|
|
1006
|
-
#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
|
|
1007
|
-
|
|
1008
|
-
BECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. [GoCardless](https://www.chargebee.com/docs/gocardless.html) supports both.
|
|
1009
|
-
|
|
1010
|
-
For Direct Debit, the customer needs to accept a mandate that allows the merchant to debit their bank account. This agreement PDF can be obtained using the [Retrieve direct debit agreement PDF API](/docs/api/hosted_pages#retrieve_direct_debit_agreement_pdf).
|
|
1011
|
-
|
|
1012
|
-
If the customer has already reached the payment source limit allowed for the site, pass `replace_primary_payment_source` as `true`. Alternatively, [delete](/docs/api/payment_sources#delete_a_payment_source) one of the payment sources first and then add the bank account payment source for the customer.
|
|
1013
|
-
|
|
1014
|
-
*/
|
|
1015
|
-
|
|
1016
763
|
payment_source:PaymentSource;
|
|
1017
764
|
}
|
|
1018
765
|
export interface CreateBankAccountInputParam {
|
|
@@ -1046,30 +793,8 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
1046
793
|
bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
|
|
1047
794
|
}
|
|
1048
795
|
export interface UpdateBankAccountResponse {
|
|
1049
|
-
/**
|
|
1050
|
-
* @description This API is used to update the payment source details of a customer. Information related to bank account payment source such as email, first name, and last name can be updated.
|
|
1051
|
-
|
|
1052
|
-
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
1053
|
-
* For Stripe, Chargebee only supports SEPA.
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
*/
|
|
1059
|
-
|
|
1060
796
|
customer:Customer;
|
|
1061
797
|
|
|
1062
|
-
/**
|
|
1063
|
-
* @description This API is used to update the payment source details of a customer. Information related to bank account payment source such as email, first name, and last name can be updated.
|
|
1064
|
-
|
|
1065
|
-
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
1066
|
-
* For Stripe, Chargebee only supports SEPA.
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
*/
|
|
1072
|
-
|
|
1073
798
|
payment_source:PaymentSource;
|
|
1074
799
|
}
|
|
1075
800
|
export interface UpdateBankAccountInputParam {
|
|
@@ -264,20 +264,10 @@ declare module 'chargebee' {
|
|
|
264
264
|
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
265
265
|
}
|
|
266
266
|
export interface RetrieveResponse {
|
|
267
|
-
/**
|
|
268
|
-
* @description Retrieves a voucher using the unique `payment_voucher_id`.
|
|
269
|
-
|
|
270
|
-
*/
|
|
271
|
-
|
|
272
267
|
payment_voucher:PaymentVoucher;
|
|
273
268
|
}
|
|
274
269
|
|
|
275
270
|
export interface CreateResponse {
|
|
276
|
-
/**
|
|
277
|
-
* @description Creates a voucher type payment source. If you create this voucher type payment source using customer details, like tax ID, you can then generate a voucher with that payment source.
|
|
278
|
-
|
|
279
|
-
*/
|
|
280
|
-
|
|
281
271
|
payment_voucher:PaymentVoucher;
|
|
282
272
|
}
|
|
283
273
|
export interface CreateInputParam {
|