chargebee 2.50.0 → 2.52.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 +92 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +37 -1
- package/package.json +1 -1
- package/types/core.d.ts +8 -5
- package/types/index.d.ts +3 -0
- package/types/resources/Address.d.ts +2 -194
- package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
- package/types/resources/Attribute.d.ts +4 -1
- package/types/resources/BillingConfiguration.d.ts +21 -0
- package/types/resources/Brand.d.ts +12 -0
- package/types/resources/BusinessEntity.d.ts +8 -6
- package/types/resources/BusinessEntityTransfer.d.ts +10 -7
- package/types/resources/Card.d.ts +11 -311
- package/types/resources/Comment.d.ts +7 -124
- package/types/resources/Configuration.d.ts +2 -0
- package/types/resources/Contact.d.ts +2 -44
- package/types/resources/ContractTerm.d.ts +4 -72
- package/types/resources/Coupon.d.ts +0 -37
- package/types/resources/CouponCode.d.ts +67 -35
- package/types/resources/CouponSet.d.ts +12 -121
- package/types/resources/CreditNote.d.ts +2 -6
- package/types/resources/CreditNoteEstimate.d.ts +1 -1
- package/types/resources/Currency.d.ts +8 -5
- package/types/resources/Customer.d.ts +90 -89
- package/types/resources/Discount.d.ts +2 -89
- package/types/resources/Download.d.ts +2 -14
- package/types/resources/Entitlement.d.ts +15 -103
- package/types/resources/EntitlementOverride.d.ts +4 -89
- package/types/resources/Estimate.d.ts +6 -10
- package/types/resources/Event.d.ts +23 -108
- package/types/resources/Export.d.ts +116 -432
- package/types/resources/Feature.d.ts +17 -319
- package/types/resources/GatewayErrorDetail.d.ts +6 -48
- package/types/resources/Gift.d.ts +34 -294
- package/types/resources/Hierarchy.d.ts +4 -24
- package/types/resources/ImpactedItem.d.ts +4 -36
- package/types/resources/ImpactedItemPrice.d.ts +5 -2
- package/types/resources/ImpactedSubscription.d.ts +3 -30
- package/types/resources/InAppSubscription.d.ts +13 -355
- package/types/resources/Invoice.d.ts +26 -18
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +4 -9
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/NonSubscription.d.ts +9 -6
- package/types/resources/OmnichannelSubscriptionItem.d.ts +9 -0
- package/types/resources/PaymentIntent.d.ts +9 -255
- package/types/resources/PaymentReferenceNumber.d.ts +3 -20
- package/types/resources/PaymentSource.d.ts +2 -2
- package/types/resources/PaymentVoucher.d.ts +20 -203
- package/types/resources/PortalSession.d.ts +4 -146
- package/types/resources/PromotionalCredit.d.ts +10 -215
- package/types/resources/Purchase.d.ts +3 -1
- package/types/resources/Quote.d.ts +68 -18
- package/types/resources/QuoteLineGroup.d.ts +1 -1
- package/types/resources/QuotedRamp.d.ts +142 -0
- package/types/resources/RecordedPurchase.d.ts +2 -0
- package/types/resources/ResourceMigration.d.ts +2 -54
- package/types/resources/SiteMigrationDetail.d.ts +13 -55
- package/types/resources/Subscription.d.ts +13 -9
- package/types/resources/SubscriptionEntitlement.d.ts +6 -106
- package/types/resources/SubscriptionEstimate.d.ts +14 -11
- package/types/resources/TaxWithheld.d.ts +14 -26
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
- package/types/resources/TimeMachine.d.ts +3 -64
- package/types/resources/Token.d.ts +3 -60
- package/types/resources/Transaction.d.ts +2 -2
- package/types/resources/Usage.d.ts +21 -165
|
@@ -1,102 +1,40 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface AdvanceInvoiceSchedule {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description System-generated and immutable unique Id for the `advance_invoice_schedule`.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The type of advance invoice or advance invoicing schedule. \* specific_dates - The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured. \* fixed_intervals - The advance charges occur at [fixed intervals of time](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_terms_to_charge).
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
schedule_type?:'specific_dates' | 'fixed_intervals';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description When the `schedule_type` is `fixed_intervals`, this object gives further details of the schedule.
|
|
9
|
+
schedule_type?:'fixed_intervals' | 'specific_dates';
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
fixed_interval_schedule?:AdvanceInvoiceSchedule.FixedIntervalSchedule;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
specific_dates_schedule?:AdvanceInvoiceSchedule.SpecificDatesSchedule;
|
|
14
|
+
|
|
32
15
|
}
|
|
33
16
|
export namespace AdvanceInvoiceSchedule {
|
|
34
17
|
|
|
35
18
|
|
|
36
19
|
export interface FixedIntervalSchedule {
|
|
37
|
-
/**
|
|
38
|
-
* @description Specifies when the schedule should end. \* after_number_of_intervals - Advance invoices are generated a `specified number of times` \* subscription_end - Advance invoices are generated for as long as the subscription is active. \* specific_date - End the advance invoicing schedule on a `specific date`.
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
20
|
end_schedule_on?:EndScheduleOn;
|
|
43
21
|
|
|
44
|
-
/**
|
|
45
|
-
* @description The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `after_number_of_intervals`
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
22
|
number_of_occurrences?:number;
|
|
50
23
|
|
|
51
|
-
/**
|
|
52
|
-
* @description The number of days before each interval that advance invoices are generated.
|
|
53
|
-
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
24
|
days_before_renewal?:number;
|
|
57
25
|
|
|
58
|
-
/**
|
|
59
|
-
* @description The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `specific_date`.
|
|
60
|
-
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
26
|
end_date?:number;
|
|
64
27
|
|
|
65
|
-
|
|
66
|
-
* @description The date when this advance invoicing schedule was created.
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
created_at?:number;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @description The number of billing cycles in one interval.
|
|
74
|
-
|
|
75
|
-
*/
|
|
28
|
+
created_at:number;
|
|
76
29
|
|
|
77
30
|
terms_to_charge?:number;
|
|
78
31
|
}
|
|
79
32
|
export interface SpecificDatesSchedule {
|
|
80
|
-
/**
|
|
81
|
-
* @description The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is specific_dates.
|
|
82
|
-
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
33
|
terms_to_charge?:number;
|
|
86
34
|
|
|
87
|
-
/**
|
|
88
|
-
* @description The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is `specific_dates`.
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
35
|
date?:number;
|
|
93
36
|
|
|
94
|
-
|
|
95
|
-
* @description The date when this advance invoicing schedule was created.
|
|
96
|
-
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
created_at?:number;
|
|
37
|
+
created_at:number;
|
|
100
38
|
}
|
|
101
39
|
}
|
|
102
40
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface BillingConfiguration {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
is_calendar_billing_enabled:boolean;
|
|
8
|
+
|
|
9
|
+
billing_dates?:BillingConfiguration.BillingDate[];
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
export namespace BillingConfiguration {
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export interface BillingDate {
|
|
16
|
+
start_date?:number;
|
|
17
|
+
|
|
18
|
+
end_date?:number;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
declare module 'chargebee' {
|
|
4
4
|
export interface BusinessEntity {
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
id:string;
|
|
7
|
-
|
|
8
|
+
|
|
8
9
|
name:string;
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
status:'active' | 'inactive';
|
|
11
|
-
|
|
12
|
+
|
|
12
13
|
deleted:boolean;
|
|
13
|
-
|
|
14
|
+
|
|
14
15
|
created_at:number;
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
resource_version?:number;
|
|
17
|
-
|
|
18
|
+
|
|
18
19
|
updated_at?:number;
|
|
20
|
+
|
|
19
21
|
}
|
|
20
22
|
export namespace BusinessEntity {
|
|
21
23
|
export class BusinessEntityResource {
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface BusinessEntityTransfer {
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
id:string;
|
|
6
|
-
|
|
8
|
+
|
|
7
9
|
resource_type:'customer' | 'subscription';
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
resource_id:string;
|
|
10
|
-
|
|
12
|
+
|
|
11
13
|
active_resource_id:string;
|
|
12
|
-
|
|
14
|
+
|
|
13
15
|
destination_business_entity_id:string;
|
|
14
|
-
|
|
16
|
+
|
|
15
17
|
source_business_entity_id:string;
|
|
16
|
-
|
|
18
|
+
|
|
17
19
|
reason_code:'correction';
|
|
18
|
-
|
|
20
|
+
|
|
19
21
|
created_at:number;
|
|
22
|
+
|
|
20
23
|
}
|
|
21
24
|
}
|
|
@@ -1,290 +1,76 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Card {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Identifier of the payment source
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
payment_source_id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Current status of the card. \* valid - A valid and active credit card \* expiring - A card which is expiring in the current month. \* expired - An expired card
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
status:'valid' | 'expiring' | 'expired';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* amazon_payments - Amazon Payments is a payment service provider. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* bank_of_america - Bank of America Gateway \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
gateway:Gateway;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The gateway account to which this payment source is stored with.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
gateway_account_id?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Reference transaction id which used for transactions
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
ref_tx_id?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Cardholder's first name
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
first_name?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Cardholder's last name
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
last_name?:string;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description The Issuer Identification Number, i.e. the first six digits of the card number
|
|
56
20
|
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
21
|
iin:string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Last four digits of the card number
|
|
63
22
|
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
23
|
last4:string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Card type \* bancontact - A Bancontact card. \* american_express - An American Express card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* diners_club - A Diner's Club card. \* discover - A Discover card. \* other - Card belonging to types other than those listed above. \* mastercard - A MasterCard. \* jcb - A JCB card. \* visa - A Visa card.
|
|
70
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
card_type?:'visa' | 'mastercard' | 'american_express' | 'discover' | 'jcb' | 'diners_club' | 'bancontact' | 'cmr_falabella' | 'tarjeta_naranja' | 'nativa' | 'cencosud' | 'cabal' | 'argencard' | 'elo' | 'hipercard' | 'carnet' | 'rupay' | 'maestro' | 'dankort' | 'cartes_bancaires' | 'other' | 'not_applicable';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Card Funding type \* credit - A credit card. \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \* not_known - An unknown card.
|
|
77
26
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Card expiry month.
|
|
27
|
+
funding_type:'credit' | 'debit' | 'prepaid' | 'not_known' | 'not_applicable';
|
|
84
28
|
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
29
|
expiry_month:number;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description Card expiry year.
|
|
91
30
|
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
31
|
expiry_year:number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code.
|
|
98
32
|
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
33
|
issuing_country?:string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description Address line 1, as available in card billing address.
|
|
105
34
|
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
35
|
billing_addr1?:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Address line 2, as available in card billing address.
|
|
112
36
|
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
37
|
billing_addr2?:string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description City, as available in card billing address.
|
|
119
38
|
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
39
|
billing_city?:string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
126
40
|
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
41
|
billing_state_code?:string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description The state/province name.
|
|
133
42
|
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
43
|
billing_state?:string;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
140
|
-
|
|
141
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
142
44
|
|
|
143
|
-
**Brexit**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
45
|
billing_country?:string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Postal or Zip code, as available in card billing address.
|
|
154
46
|
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
47
|
billing_zip?:string;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Timestamp indicating when this card resource is created.
|
|
161
48
|
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
49
|
created_at:number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @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.
|
|
168
50
|
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
51
|
resource_version?:number;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description Timestamp indicating when this credit card resource was last updated.
|
|
175
52
|
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
53
|
updated_at?:number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @description The IP address of the customer. Used primarily for referral integration and EU VAT validation.
|
|
182
54
|
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
55
|
ip_address?:string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @description Card is powered by payment method. \* card - card \* ideal - ideal \* sofort - sofort \* bancontact - bancontact \* giropay - giropay \* latam_local_card - latam_local_card \* not_applicable - not_applicable
|
|
189
56
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
powered_by?:'giropay' | 'bancontact' | 'ideal' | 'latam_local_card' | 'not_applicable' | 'sofort' | 'card';
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @description Identifier of the customer.
|
|
57
|
+
powered_by?:'ideal' | 'sofort' | 'bancontact' | 'giropay' | 'card' | 'latam_local_card' | 'payconiq' | 'not_applicable';
|
|
196
58
|
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
59
|
customer_id:string;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* @description Masked credit card number that is safe to show.
|
|
203
60
|
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
61
|
masked_number?:string;
|
|
62
|
+
|
|
207
63
|
}
|
|
208
64
|
export namespace Card {
|
|
209
65
|
export class CardResource {
|
|
210
|
-
/**
|
|
211
|
-
* @description #### Deprecated
|
|
212
|
-
|
|
213
|
-
This operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources#retrieve_a_payment_source).
|
|
214
|
-
|
|
215
|
-
Retrieves the credit card for the customer id.
|
|
216
|
-
|
|
217
|
-
*/
|
|
218
|
-
|
|
219
66
|
retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
220
67
|
|
|
221
|
-
/**
|
|
222
|
-
* @description #### Deprecated
|
|
223
|
-
|
|
224
|
-
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the [Cards APIs](/docs/api/cards). This operation is obsoleted by the following:
|
|
225
|
-
|
|
226
|
-
* [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
|
|
227
|
-
* [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)
|
|
228
|
-
* [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source)
|
|
229
|
-
|
|
230
|
-
Adds or replaces card details of a customer. Updating card details replaces the present payment method.
|
|
231
|
-
|
|
232
|
-
Passing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable
|
|
233
|
-
|
|
234
|
-
* If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
|
|
235
|
-
* If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
|
|
236
|
-
* If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your card update form.
|
|
237
|
-
* In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
|
|
238
|
-
* You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration. Use our [Hosted Page - Update Card](/docs/api/hosted_pages#update_card) API to generate a 'Update Card' Hosted Page link.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
**Legacy behavior:**
|
|
243
|
-
|
|
244
|
-
* **For [sites](https://www.chargebee.com/docs/sites-intro.html) created before March 1st, 2014:** On making this request, the `billing_address` and `vat_number` of the customer are **deleted** and replaced by the values passed with this request. Ensure that you pass the [billing address parameters](/docs/api/subscriptions?prod_cat_ver=1#create_a_subscription_card_billing_addr1) and the `vat_number` parameters each time you make this request, to avoid losing the same information at the customer-level.
|
|
245
|
-
* **For [sites](https://www.chargebee.com/docs/sites-intro.html) created on or after March 1st, 2014:** This request does not alter the `billing_address` and `vat_number` of the customer.
|
|
246
|
-
|
|
247
|
-
*/
|
|
248
|
-
|
|
249
68
|
update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
|
|
250
69
|
|
|
251
|
-
/**
|
|
252
|
-
* @description #### Deprecated
|
|
253
|
-
|
|
254
|
-
This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
|
|
255
|
-
|
|
256
|
-
Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is `card`.
|
|
257
|
-
|
|
258
|
-
**Limitation**
|
|
259
|
-
This request does not support switching between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
260
|
-
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
70
|
switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
|
|
264
71
|
|
|
265
|
-
/**
|
|
266
|
-
* @description #### deprecated
|
|
267
|
-
|
|
268
|
-
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Export payment source API](/docs/api/payment_sources#export_payment_source).
|
|
269
|
-
|
|
270
|
-
Copies the customer's card information to another payment gateway. This is useful if you want to port your customer's card details to another gateway.
|
|
271
|
-
|
|
272
|
-
**Limitation**
|
|
273
|
-
This request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
274
|
-
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
72
|
copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
|
|
278
73
|
|
|
279
|
-
/**
|
|
280
|
-
* @description #### deprecated
|
|
281
|
-
|
|
282
|
-
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources#delete_a_payment_source).
|
|
283
|
-
|
|
284
|
-
Deletes the card for a customer. Upon successful deletion the `auto_collection` attribute for the customer is set to `off` and a `card_deleted` event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.
|
|
285
|
-
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
74
|
delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
|
|
289
75
|
}
|
|
290
76
|
export interface RetrieveResponse {
|
|
@@ -298,121 +84,43 @@ Deletes the card for a customer. Upon successful deletion the `auto_collect
|
|
|
298
84
|
}
|
|
299
85
|
export interface UpdateCardForCustomerInputParam {
|
|
300
86
|
|
|
301
|
-
|
|
302
|
-
* @description The gateway account in which this payment source is stored.
|
|
303
|
-
|
|
304
|
-
*/
|
|
87
|
+
customer?:{vat_number?:string};
|
|
305
88
|
|
|
306
|
-
|
|
89
|
+
gateway?:Gateway;
|
|
307
90
|
|
|
308
|
-
|
|
309
|
-
* @description The single-use card token returned by vaults like Stripe/Braintree which act as a substitute for your card details. Before calling this API, you should have submitted your card details to the gateway and gotten this token in return.
|
|
310
|
-
**Note:** Supported only for Stripe, Braintree and Authorize.Net. If this value is specified, there is no need to specify other card details (like number, cvv, etc).
|
|
311
|
-
|
|
312
|
-
*/
|
|
91
|
+
gateway_account_id?:string;
|
|
313
92
|
|
|
314
93
|
tmp_token?:string;
|
|
315
94
|
|
|
316
|
-
/**
|
|
317
|
-
* @description Cardholder's first name.
|
|
318
|
-
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
95
|
first_name?:string;
|
|
322
96
|
|
|
323
|
-
/**
|
|
324
|
-
* @description Cardholder's last name.
|
|
325
|
-
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
97
|
last_name?:string;
|
|
329
98
|
|
|
330
|
-
/**
|
|
331
|
-
* @description The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here.
|
|
332
|
-
|
|
333
|
-
*/
|
|
334
|
-
|
|
335
99
|
number:string;
|
|
336
100
|
|
|
337
|
-
/**
|
|
338
|
-
* @description Card expiry month.
|
|
339
|
-
|
|
340
|
-
*/
|
|
341
|
-
|
|
342
101
|
expiry_month:number;
|
|
343
102
|
|
|
344
|
-
/**
|
|
345
|
-
* @description Card expiry year.
|
|
346
|
-
|
|
347
|
-
*/
|
|
348
|
-
|
|
349
103
|
expiry_year:number;
|
|
350
104
|
|
|
351
|
-
/**
|
|
352
|
-
* @description The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here.
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
|
|
356
105
|
cvv?:string;
|
|
357
106
|
|
|
358
|
-
|
|
359
|
-
* @description Address line 1, as available in card billing address.
|
|
360
|
-
|
|
361
|
-
*/
|
|
107
|
+
preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa';
|
|
362
108
|
|
|
363
109
|
billing_addr1?:string;
|
|
364
110
|
|
|
365
|
-
/**
|
|
366
|
-
* @description Address line 2, as available in card billing address.
|
|
367
|
-
|
|
368
|
-
*/
|
|
369
|
-
|
|
370
111
|
billing_addr2?:string;
|
|
371
112
|
|
|
372
|
-
/**
|
|
373
|
-
* @description City, as available in card billing address.
|
|
374
|
-
|
|
375
|
-
*/
|
|
376
|
-
|
|
377
113
|
billing_city?:string;
|
|
378
114
|
|
|
379
|
-
/**
|
|
380
|
-
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
381
|
-
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
115
|
billing_state_code?:string;
|
|
385
116
|
|
|
386
|
-
/**
|
|
387
|
-
* @description The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided.
|
|
388
|
-
|
|
389
|
-
*/
|
|
390
|
-
|
|
391
117
|
billing_state?:string;
|
|
392
118
|
|
|
393
|
-
/**
|
|
394
|
-
* @description Postal or Zip code, as available in card billing address.
|
|
395
|
-
|
|
396
|
-
*/
|
|
397
|
-
|
|
398
119
|
billing_zip?:string;
|
|
399
120
|
|
|
400
|
-
/**
|
|
401
|
-
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
402
|
-
|
|
403
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
404
|
-
|
|
405
|
-
**Brexit**
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
409
|
-
.
|
|
410
|
-
|
|
411
|
-
*/
|
|
412
|
-
|
|
413
121
|
billing_country?:string;
|
|
414
|
-
|
|
415
|
-
|
|
122
|
+
|
|
123
|
+
ip_address?:string;
|
|
416
124
|
}
|
|
417
125
|
export interface SwitchGatewayForCustomerResponse {
|
|
418
126
|
customer:Customer;
|
|
@@ -421,10 +129,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
421
129
|
}
|
|
422
130
|
export interface SwitchGatewayForCustomerInputParam {
|
|
423
131
|
|
|
424
|
-
|
|
425
|
-
* @description The gateway account you want to switch to.
|
|
426
|
-
|
|
427
|
-
*/
|
|
132
|
+
gateway?:Gateway;
|
|
428
133
|
|
|
429
134
|
gateway_account_id:string;
|
|
430
135
|
}
|
|
@@ -433,11 +138,6 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
433
138
|
}
|
|
434
139
|
export interface CopyCardForCustomerInputParam {
|
|
435
140
|
|
|
436
|
-
/**
|
|
437
|
-
* @description The gateway account you want to copy the card.
|
|
438
|
-
|
|
439
|
-
*/
|
|
440
|
-
|
|
441
141
|
gateway_account_id:string;
|
|
442
142
|
}
|
|
443
143
|
export interface DeleteCardForCustomerResponse {
|