forked from stripe/stripe-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cards.d.ts
202 lines (165 loc) · 6.65 KB
/
Cards.d.ts
1
2
3
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// File generated from our OpenAPI spec
declare module 'stripe' {
namespace Stripe {
/**
* You can store multiple cards on a customer in order to charge the customer
* later. You can also store multiple debit cards on a recipient in order to
* transfer to those cards later.
*
* Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
*/
interface Card {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'card';
/**
* The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
*/
account?: string | Stripe.Account | null;
/**
* City/District/Suburb/Town/Village.
*/
address_city: string | null;
/**
* Billing address country, if provided when creating card.
*/
address_country: string | null;
/**
* Address line 1 (Street address/PO Box/Company name).
*/
address_line1: string | null;
/**
* If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_line1_check: string | null;
/**
* Address line 2 (Apartment/Suite/Unit/Building).
*/
address_line2: string | null;
/**
* State/County/Province/Region.
*/
address_state: string | null;
/**
* ZIP or postal code.
*/
address_zip: string | null;
/**
* If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_zip_check: string | null;
/**
* A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
*/
available_payout_methods?: Array<Card.AvailablePayoutMethod> | null;
/**
* Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
*/
brand: string;
/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
country: string | null;
/**
* Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
*/
currency?: string | null;
/**
* The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
*/
customer?: string | Stripe.Customer | Stripe.DeletedCustomer | null;
/**
* If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
*/
cvc_check: string | null;
/**
* Whether this card is the default external account for its currency.
*/
default_for_currency?: boolean | null;
deleted?: void;
/**
* A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
*/
description?: string;
/**
* (For tokenized numbers only.) The last four digits of the device account number.
*/
dynamic_last4: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
*
* *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
*/
fingerprint?: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string;
/**
* Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
*/
iin?: string;
/**
* The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
*/
issuer?: string;
/**
* The last four digits of the card.
*/
last4: string;
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Stripe.Metadata | null;
/**
* Cardholder name.
*/
name: string | null;
/**
* For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.
*/
status?: string | null;
/**
* If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
*/
tokenization_method: string | null;
}
namespace Card {
type AvailablePayoutMethod = 'instant' | 'standard';
}
/**
* The DeletedCard object.
*/
interface DeletedCard {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'card';
/**
* Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
*/
currency?: string | null;
/**
* Always true for a deleted object
*/
deleted: true;
}
}
}