• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-go / 11296113556

11 Oct 2024 04:42PM UTC coverage: 62.991% (-0.02%) from 63.015%
11296113556

Pull #1934

github

stripe-openapi[bot]
Update generated code for v1291
Pull Request #1934: Update generated code for beta

0 of 8 new or added lines in 2 files covered. (0.0%)

469 existing lines in 20 files now uncovered.

6209 of 9857 relevant lines covered (62.99%)

15.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

43.48
/charge.go
1
//
2
//
3
// File generated from our OpenAPI spec
4
//
5
//
6

7
package stripe
8

9
import "encoding/json"
10

11
// Assessments from Stripe. If set, the value is `fraudulent`.
12
type ChargeFraudStripeReport string
13

14
// List of values that ChargeFraudStripeReport can take
15
const (
16
        ChargeFraudStripeReportFraudulent ChargeFraudStripeReport = "fraudulent"
17
)
18

19
// Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
20
type ChargeFraudUserReport string
21

22
// List of values that ChargeFraudUserReport can take
23
const (
24
        ChargeFraudUserReportFraudulent ChargeFraudUserReport = "fraudulent"
25
        ChargeFraudUserReportSafe       ChargeFraudUserReport = "safe"
26
)
27

28
// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
29
type ChargePaymentMethodDetailsCardChecksAddressLine1Check string
30

31
// List of values that ChargePaymentMethodDetailsCardChecksAddressLine1Check can take
32
const (
33
        ChargePaymentMethodDetailsCardChecksAddressLine1CheckFail        ChargePaymentMethodDetailsCardChecksAddressLine1Check = "fail"
34
        ChargePaymentMethodDetailsCardChecksAddressLine1CheckPass        ChargePaymentMethodDetailsCardChecksAddressLine1Check = "pass"
35
        ChargePaymentMethodDetailsCardChecksAddressLine1CheckUnavailable ChargePaymentMethodDetailsCardChecksAddressLine1Check = "unavailable"
36
        ChargePaymentMethodDetailsCardChecksAddressLine1CheckUnchecked   ChargePaymentMethodDetailsCardChecksAddressLine1Check = "unchecked"
37
)
38

39
// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
40
type ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck string
41

42
// List of values that ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck can take
43
const (
44
        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckFail        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "fail"
45
        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckPass        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "pass"
46
        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckUnavailable ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "unavailable"
47
        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckUnchecked   ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "unchecked"
48
)
49

50
// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
51
type ChargePaymentMethodDetailsCardChecksCVCCheck string
52

53
// List of values that ChargePaymentMethodDetailsCardChecksCVCCheck can take
54
const (
55
        ChargePaymentMethodDetailsCardChecksCVCCheckFail        ChargePaymentMethodDetailsCardChecksCVCCheck = "fail"
56
        ChargePaymentMethodDetailsCardChecksCVCCheckPass        ChargePaymentMethodDetailsCardChecksCVCCheck = "pass"
57
        ChargePaymentMethodDetailsCardChecksCVCCheckUnavailable ChargePaymentMethodDetailsCardChecksCVCCheck = "unavailable"
58
        ChargePaymentMethodDetailsCardChecksCVCCheckUnchecked   ChargePaymentMethodDetailsCardChecksCVCCheck = "unchecked"
59
)
60

61
// Indicates whether or not the decremental authorization feature is supported.
62
type ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus string
63

64
// List of values that ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus can take
65
const (
66
        ChargePaymentMethodDetailsCardDecrementalAuthorizationStatusAvailable   ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus = "available"
67
        ChargePaymentMethodDetailsCardDecrementalAuthorizationStatusUnavailable ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus = "unavailable"
68
)
69

70
// Indicates whether or not the capture window is extended beyond the standard authorization.
71
type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus string
72

73
// List of values that ChargePaymentMethodDetailsCardExtendedAuthorizationStatus can take
74
const (
75
        ChargePaymentMethodDetailsCardExtendedAuthorizationStatusDisabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "disabled"
76
        ChargePaymentMethodDetailsCardExtendedAuthorizationStatusEnabled  ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "enabled"
77
)
78

79
// Indicates whether or not the incremental authorization feature is supported.
80
type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus string
81

82
// List of values that ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus can take
83
const (
84
        ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusAvailable   ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "available"
85
        ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusUnavailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "unavailable"
86
)
87

88
// Indicates whether or not multiple captures are supported.
89
type ChargePaymentMethodDetailsCardMulticaptureStatus string
90

91
// List of values that ChargePaymentMethodDetailsCardMulticaptureStatus can take
92
const (
93
        ChargePaymentMethodDetailsCardMulticaptureStatusAvailable   ChargePaymentMethodDetailsCardMulticaptureStatus = "available"
94
        ChargePaymentMethodDetailsCardMulticaptureStatusUnavailable ChargePaymentMethodDetailsCardMulticaptureStatus = "unavailable"
95
)
96

97
// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
98
type ChargePaymentMethodDetailsCardNetwork string
99

100
// List of values that ChargePaymentMethodDetailsCardNetwork can take
101
const (
102
        ChargePaymentMethodDetailsCardNetworkAmex            ChargePaymentMethodDetailsCardNetwork = "amex"
103
        ChargePaymentMethodDetailsCardNetworkCartesBancaires ChargePaymentMethodDetailsCardNetwork = "cartes_bancaires"
104
        ChargePaymentMethodDetailsCardNetworkDiners          ChargePaymentMethodDetailsCardNetwork = "diners"
105
        ChargePaymentMethodDetailsCardNetworkDiscover        ChargePaymentMethodDetailsCardNetwork = "discover"
106
        ChargePaymentMethodDetailsCardNetworkInterac         ChargePaymentMethodDetailsCardNetwork = "interac"
107
        ChargePaymentMethodDetailsCardNetworkJCB             ChargePaymentMethodDetailsCardNetwork = "jcb"
108
        ChargePaymentMethodDetailsCardNetworkMastercard      ChargePaymentMethodDetailsCardNetwork = "mastercard"
109
        ChargePaymentMethodDetailsCardNetworkUnionpay        ChargePaymentMethodDetailsCardNetwork = "unionpay"
110
        ChargePaymentMethodDetailsCardNetworkVisa            ChargePaymentMethodDetailsCardNetwork = "visa"
111
        ChargePaymentMethodDetailsCardNetworkUnknown         ChargePaymentMethodDetailsCardNetwork = "unknown"
112
)
113

114
// Indicates whether or not the authorized amount can be over-captured.
115
type ChargePaymentMethodDetailsCardOvercaptureStatus string
116

117
// List of values that ChargePaymentMethodDetailsCardOvercaptureStatus can take
118
const (
119
        ChargePaymentMethodDetailsCardOvercaptureStatusAvailable   ChargePaymentMethodDetailsCardOvercaptureStatus = "available"
120
        ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable"
121
)
122

123
// For authenticated transactions: how the customer was authenticated by
124
// the issuing bank.
125
type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string
126

127
// List of values that ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take
128
const (
129
        ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge    ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge"
130
        ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless"
131
)
132

133
// The Electronic Commerce Indicator (ECI). A protocol-level field
134
// indicating what degree of authentication was performed.
135
type ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator string
136

137
// List of values that ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator can take
138
const (
139
        ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator01 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "01"
140
        ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator02 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "02"
141
        ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator05 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "05"
142
        ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator06 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "06"
143
        ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator07 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "07"
144
)
145

146
// The exemption requested via 3DS and accepted by the issuer at authentication time.
147
type ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator string
148

149
// List of values that ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator can take
150
const (
151
        ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorLowRisk ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "low_risk"
152
        ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorNone    ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "none"
153
)
154

155
// Indicates the outcome of 3D Secure authentication.
156
type ChargePaymentMethodDetailsCardThreeDSecureResult string
157

158
// List of values that ChargePaymentMethodDetailsCardThreeDSecureResult can take
159
const (
160
        ChargePaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged ChargePaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged"
161
        ChargePaymentMethodDetailsCardThreeDSecureResultAuthenticated       ChargePaymentMethodDetailsCardThreeDSecureResult = "authenticated"
162
        ChargePaymentMethodDetailsCardThreeDSecureResultExempted            ChargePaymentMethodDetailsCardThreeDSecureResult = "exempted"
163
        ChargePaymentMethodDetailsCardThreeDSecureResultFailed              ChargePaymentMethodDetailsCardThreeDSecureResult = "failed"
164
        ChargePaymentMethodDetailsCardThreeDSecureResultNotSupported        ChargePaymentMethodDetailsCardThreeDSecureResult = "not_supported"
165
        ChargePaymentMethodDetailsCardThreeDSecureResultProcessingError     ChargePaymentMethodDetailsCardThreeDSecureResult = "processing_error"
166
)
167

168
// Additional information about why 3D Secure succeeded or failed based
169
// on the `result`.
170
type ChargePaymentMethodDetailsCardThreeDSecureResultReason string
171

172
// List of values that ChargePaymentMethodDetailsCardThreeDSecureResultReason can take
173
const (
174
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonAbandoned           ChargePaymentMethodDetailsCardThreeDSecureResultReason = "abandoned"
175
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonBypassed            ChargePaymentMethodDetailsCardThreeDSecureResultReason = "bypassed"
176
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonCanceled            ChargePaymentMethodDetailsCardThreeDSecureResultReason = "canceled"
177
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonCardNotEnrolled     ChargePaymentMethodDetailsCardThreeDSecureResultReason = "card_not_enrolled"
178
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonNetworkNotSupported ChargePaymentMethodDetailsCardThreeDSecureResultReason = "network_not_supported"
179
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonProtocolError       ChargePaymentMethodDetailsCardThreeDSecureResultReason = "protocol_error"
180
        ChargePaymentMethodDetailsCardThreeDSecureResultReasonRejected            ChargePaymentMethodDetailsCardThreeDSecureResultReason = "rejected"
181
)
182

183
// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
184
type ChargePaymentMethodDetailsCardPresentNetwork string
185

186
// List of values that ChargePaymentMethodDetailsCardPresentNetwork can take
187
const (
188
        ChargePaymentMethodDetailsCardPresentNetworkAmex            ChargePaymentMethodDetailsCardPresentNetwork = "amex"
189
        ChargePaymentMethodDetailsCardPresentNetworkCartesBancaires ChargePaymentMethodDetailsCardPresentNetwork = "cartes_bancaires"
190
        ChargePaymentMethodDetailsCardPresentNetworkDiners          ChargePaymentMethodDetailsCardPresentNetwork = "diners"
191
        ChargePaymentMethodDetailsCardPresentNetworkDiscover        ChargePaymentMethodDetailsCardPresentNetwork = "discover"
192
        ChargePaymentMethodDetailsCardPresentNetworkInterac         ChargePaymentMethodDetailsCardPresentNetwork = "interac"
193
        ChargePaymentMethodDetailsCardPresentNetworkJCB             ChargePaymentMethodDetailsCardPresentNetwork = "jcb"
194
        ChargePaymentMethodDetailsCardPresentNetworkMastercard      ChargePaymentMethodDetailsCardPresentNetwork = "mastercard"
195
        ChargePaymentMethodDetailsCardPresentNetworkUnionpay        ChargePaymentMethodDetailsCardPresentNetwork = "unionpay"
196
        ChargePaymentMethodDetailsCardPresentNetworkVisa            ChargePaymentMethodDetailsCardPresentNetwork = "visa"
197
        ChargePaymentMethodDetailsCardPresentNetworkUnknown         ChargePaymentMethodDetailsCardPresentNetwork = "unknown"
198
)
199

200
// The method used to process this payment method offline. Only deferred is allowed.
201
type ChargePaymentMethodDetailsCardPresentOfflineType string
202

203
// List of values that ChargePaymentMethodDetailsCardPresentOfflineType can take
204
const (
205
        ChargePaymentMethodDetailsCardPresentOfflineTypeDeferred ChargePaymentMethodDetailsCardPresentOfflineType = "deferred"
206
)
207

208
// The type of account being debited or credited
209
type ChargePaymentMethodDetailsCardPresentReceiptAccountType string
210

211
// List of values that ChargePaymentMethodDetailsCardPresentReceiptAccountType can take
212
const (
213
        ChargePaymentMethodDetailsCardPresentReceiptAccountTypeChecking ChargePaymentMethodDetailsCardPresentReceiptAccountType = "checking"
214
        ChargePaymentMethodDetailsCardPresentReceiptAccountTypeCredit   ChargePaymentMethodDetailsCardPresentReceiptAccountType = "credit"
215
        ChargePaymentMethodDetailsCardPresentReceiptAccountTypePrepaid  ChargePaymentMethodDetailsCardPresentReceiptAccountType = "prepaid"
216
        ChargePaymentMethodDetailsCardPresentReceiptAccountTypeUnknown  ChargePaymentMethodDetailsCardPresentReceiptAccountType = "unknown"
217
)
218

219
// The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
220
type ChargePaymentMethodDetailsCardPresentWalletType string
221

222
// List of values that ChargePaymentMethodDetailsCardPresentWalletType can take
223
const (
224
        ChargePaymentMethodDetailsCardPresentWalletTypeApplePay   ChargePaymentMethodDetailsCardPresentWalletType = "apple_pay"
225
        ChargePaymentMethodDetailsCardPresentWalletTypeGooglePay  ChargePaymentMethodDetailsCardPresentWalletType = "google_pay"
226
        ChargePaymentMethodDetailsCardPresentWalletTypeSamsungPay ChargePaymentMethodDetailsCardPresentWalletType = "samsung_pay"
227
        ChargePaymentMethodDetailsCardPresentWalletTypeUnknown    ChargePaymentMethodDetailsCardPresentWalletType = "unknown"
228
)
229

230
// The Klarna payment method used for this transaction.
231
// Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
232
type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory string
233

234
// List of values that ChargePaymentMethodDetailsKlarnaPaymentMethodCategory can take
235
const (
236
        ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayLater          ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_later"
237
        ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayNow            ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_now"
238
        ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayWithFinancing  ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_with_financing"
239
        ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayInInstallments ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_in_installments"
240
)
241

242
// The name of the convenience store chain where the payment was completed.
243
type ChargePaymentMethodDetailsKonbiniStoreChain string
244

245
// List of values that ChargePaymentMethodDetailsKonbiniStoreChain can take
246
const (
247
        ChargePaymentMethodDetailsKonbiniStoreChainFamilyMart ChargePaymentMethodDetailsKonbiniStoreChain = "familymart"
248
        ChargePaymentMethodDetailsKonbiniStoreChainLawson     ChargePaymentMethodDetailsKonbiniStoreChain = "lawson"
249
        ChargePaymentMethodDetailsKonbiniStoreChainMinistop   ChargePaymentMethodDetailsKonbiniStoreChain = "ministop"
250
        ChargePaymentMethodDetailsKonbiniStoreChainSeicomart  ChargePaymentMethodDetailsKonbiniStoreChain = "seicomart"
251
)
252

253
// The local credit or debit card brand.
254
type ChargePaymentMethodDetailsKrCardBrand string
255

256
// List of values that ChargePaymentMethodDetailsKrCardBrand can take
257
const (
258
        ChargePaymentMethodDetailsKrCardBrandBc          ChargePaymentMethodDetailsKrCardBrand = "bc"
259
        ChargePaymentMethodDetailsKrCardBrandCiti        ChargePaymentMethodDetailsKrCardBrand = "citi"
260
        ChargePaymentMethodDetailsKrCardBrandHana        ChargePaymentMethodDetailsKrCardBrand = "hana"
261
        ChargePaymentMethodDetailsKrCardBrandHyundai     ChargePaymentMethodDetailsKrCardBrand = "hyundai"
262
        ChargePaymentMethodDetailsKrCardBrandJeju        ChargePaymentMethodDetailsKrCardBrand = "jeju"
263
        ChargePaymentMethodDetailsKrCardBrandJeonbuk     ChargePaymentMethodDetailsKrCardBrand = "jeonbuk"
264
        ChargePaymentMethodDetailsKrCardBrandKakaobank   ChargePaymentMethodDetailsKrCardBrand = "kakaobank"
265
        ChargePaymentMethodDetailsKrCardBrandKbank       ChargePaymentMethodDetailsKrCardBrand = "kbank"
266
        ChargePaymentMethodDetailsKrCardBrandKdbbank     ChargePaymentMethodDetailsKrCardBrand = "kdbbank"
267
        ChargePaymentMethodDetailsKrCardBrandKookmin     ChargePaymentMethodDetailsKrCardBrand = "kookmin"
268
        ChargePaymentMethodDetailsKrCardBrandKwangju     ChargePaymentMethodDetailsKrCardBrand = "kwangju"
269
        ChargePaymentMethodDetailsKrCardBrandLotte       ChargePaymentMethodDetailsKrCardBrand = "lotte"
270
        ChargePaymentMethodDetailsKrCardBrandMg          ChargePaymentMethodDetailsKrCardBrand = "mg"
271
        ChargePaymentMethodDetailsKrCardBrandNh          ChargePaymentMethodDetailsKrCardBrand = "nh"
272
        ChargePaymentMethodDetailsKrCardBrandPost        ChargePaymentMethodDetailsKrCardBrand = "post"
273
        ChargePaymentMethodDetailsKrCardBrandSamsung     ChargePaymentMethodDetailsKrCardBrand = "samsung"
274
        ChargePaymentMethodDetailsKrCardBrandSavingsbank ChargePaymentMethodDetailsKrCardBrand = "savingsbank"
275
        ChargePaymentMethodDetailsKrCardBrandShinhan     ChargePaymentMethodDetailsKrCardBrand = "shinhan"
276
        ChargePaymentMethodDetailsKrCardBrandShinhyup    ChargePaymentMethodDetailsKrCardBrand = "shinhyup"
277
        ChargePaymentMethodDetailsKrCardBrandSuhyup      ChargePaymentMethodDetailsKrCardBrand = "suhyup"
278
        ChargePaymentMethodDetailsKrCardBrandTossbank    ChargePaymentMethodDetailsKrCardBrand = "tossbank"
279
        ChargePaymentMethodDetailsKrCardBrandWoori       ChargePaymentMethodDetailsKrCardBrand = "woori"
280
)
281

282
// An array of conditions that are covered for the transaction, if applicable.
283
type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory string
284

285
// List of values that ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory can take
286
const (
287
        ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryFraudulent         ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "fraudulent"
288
        ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryProductNotReceived ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "product_not_received"
289
)
290

291
// Indicates whether the transaction is eligible for PayPal's seller protection.
292
type ChargePaymentMethodDetailsPaypalSellerProtectionStatus string
293

294
// List of values that ChargePaymentMethodDetailsPaypalSellerProtectionStatus can take
295
const (
296
        ChargePaymentMethodDetailsPaypalSellerProtectionStatusEligible          ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "eligible"
297
        ChargePaymentMethodDetailsPaypalSellerProtectionStatusNotEligible       ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "not_eligible"
298
        ChargePaymentMethodDetailsPaypalSellerProtectionStatusPartiallyEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "partially_eligible"
299
)
300

301
// The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
302
// An additional hash is included on `payment_method_details` with a name matching this value.
303
// It contains information specific to the payment method.
304
type ChargePaymentMethodDetailsType string
305

306
// List of values that ChargePaymentMethodDetailsType can take
307
const (
308
        ChargePaymentMethodDetailsTypeACHCreditTransfer ChargePaymentMethodDetailsType = "ach_credit_transfer"
309
        ChargePaymentMethodDetailsTypeACHDebit          ChargePaymentMethodDetailsType = "ach_debit"
310
        ChargePaymentMethodDetailsTypeACSSDebit         ChargePaymentMethodDetailsType = "acss_debit"
311
        ChargePaymentMethodDetailsTypeAlipay            ChargePaymentMethodDetailsType = "alipay"
312
        ChargePaymentMethodDetailsTypeAUBECSDebit       ChargePaymentMethodDetailsType = "au_becs_debit"
313
        ChargePaymentMethodDetailsTypeBACSDebit         ChargePaymentMethodDetailsType = "bacs_debit"
314
        ChargePaymentMethodDetailsTypeBancontact        ChargePaymentMethodDetailsType = "bancontact"
315
        ChargePaymentMethodDetailsTypeCard              ChargePaymentMethodDetailsType = "card"
316
        ChargePaymentMethodDetailsTypeCardPresent       ChargePaymentMethodDetailsType = "card_present"
317
        ChargePaymentMethodDetailsTypeEPS               ChargePaymentMethodDetailsType = "eps"
318
        ChargePaymentMethodDetailsTypeFPX               ChargePaymentMethodDetailsType = "fpx"
319
        ChargePaymentMethodDetailsTypeGiropay           ChargePaymentMethodDetailsType = "giropay"
320
        ChargePaymentMethodDetailsTypeGrabpay           ChargePaymentMethodDetailsType = "grabpay"
321
        ChargePaymentMethodDetailsTypeIDEAL             ChargePaymentMethodDetailsType = "ideal"
322
        ChargePaymentMethodDetailsTypeInteracPresent    ChargePaymentMethodDetailsType = "interac_present"
323
        ChargePaymentMethodDetailsTypeKlarna            ChargePaymentMethodDetailsType = "klarna"
324
        ChargePaymentMethodDetailsTypeMultibanco        ChargePaymentMethodDetailsType = "multibanco"
325
        ChargePaymentMethodDetailsTypeP24               ChargePaymentMethodDetailsType = "p24"
326
        ChargePaymentMethodDetailsTypeSEPADebit         ChargePaymentMethodDetailsType = "sepa_debit"
327
        ChargePaymentMethodDetailsTypeSofort            ChargePaymentMethodDetailsType = "sofort"
328
        ChargePaymentMethodDetailsTypeSwish             ChargePaymentMethodDetailsType = "swish"
329
        ChargePaymentMethodDetailsTypeStripeAccount     ChargePaymentMethodDetailsType = "stripe_account"
330
        ChargePaymentMethodDetailsTypeWeChat            ChargePaymentMethodDetailsType = "wechat"
331
)
332

333
// Account holder type: individual or company.
334
type ChargePaymentMethodDetailsUSBankAccountAccountHolderType string
335

336
// List of values that ChargePaymentMethodDetailsUSBankAccountAccountHolderType can take
337
const (
338
        ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeCompany    ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "company"
339
        ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "individual"
340
)
341

342
// Account type: checkings or savings. Defaults to checking if omitted.
343
type ChargePaymentMethodDetailsUSBankAccountAccountType string
344

345
// List of values that ChargePaymentMethodDetailsUSBankAccountAccountType can take
346
const (
347
        ChargePaymentMethodDetailsUSBankAccountAccountTypeChecking ChargePaymentMethodDetailsUSBankAccountAccountType = "checking"
348
        ChargePaymentMethodDetailsUSBankAccountAccountTypeSavings  ChargePaymentMethodDetailsUSBankAccountAccountType = "savings"
349
)
350

351
// The status of the payment is either `succeeded`, `pending`, or `failed`.
352
type ChargeStatus string
353

354
// List of values that ChargeStatus can take
355
const (
356
        ChargeStatusFailed    ChargeStatus = "failed"
357
        ChargeStatusPending   ChargeStatus = "pending"
358
        ChargeStatusSucceeded ChargeStatus = "succeeded"
359
)
360

361
// Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
362
type ChargeListParams struct {
363
        ListParams `form:"*"`
364
        // Only return charges that were created during the given date interval.
365
        Created *int64 `form:"created"`
366
        // Only return charges that were created during the given date interval.
367
        CreatedRange *RangeQueryParams `form:"created"`
368
        // Only return charges for the customer specified by this customer ID.
369
        Customer *string `form:"customer"`
370
        // Specifies which fields in the response should be expanded.
371
        Expand []*string `form:"expand"`
372
        // Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
373
        PaymentIntent *string `form:"payment_intent"`
374
        // Only return charges for this transfer group, limited to 100.
375
        TransferGroup *string `form:"transfer_group"`
376
}
377

378
// AddExpand appends a new field to expand.
379
func (p *ChargeListParams) AddExpand(f string) {
×
380
        p.Expand = append(p.Expand, &f)
×
381
}
×
382

383
type ChargeDestinationParams struct {
384
        // ID of an existing, connected Stripe account.
385
        Account *string `form:"account"`
386
        // The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
387
        Amount *int64 `form:"amount"`
388
}
389

390
// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
391
type ChargeRadarOptionsParams struct {
392
        // A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
393
        Session *string `form:"session"`
394
}
395

396
// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
397
type ChargeTransferDataParams struct {
398
        // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
399
        Amount *int64 `form:"amount"`
400
        // This parameter can only be used on Charge creation.
401
        // ID of an existing, connected Stripe account.
402
        Destination *string `form:"destination"`
403
}
404
type ChargeLevel3LineItemParams struct {
405
        DiscountAmount     *int64  `form:"discount_amount"`
406
        ProductCode        *string `form:"product_code"`
407
        ProductDescription *string `form:"product_description"`
408
        Quantity           *int64  `form:"quantity"`
409
        TaxAmount          *int64  `form:"tax_amount"`
410
        UnitCost           *int64  `form:"unit_cost"`
411
}
412
type ChargeLevel3Params struct {
413
        CustomerReference  *string                       `form:"customer_reference"`
414
        LineItems          []*ChargeLevel3LineItemParams `form:"line_items"`
415
        MerchantReference  *string                       `form:"merchant_reference"`
416
        ShippingAddressZip *string                       `form:"shipping_address_zip"`
417
        ShippingAmount     *int64                        `form:"shipping_amount"`
418
        ShippingFromZip    *string                       `form:"shipping_from_zip"`
419
}
420

421
// This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
422
// to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
423
// object used to request payment.
424
type ChargeParams struct {
425
        Params `form:"*"`
426
        // Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
427
        Amount         *int64 `form:"amount"`
428
        ApplicationFee *int64 `form:"application_fee"`
429
        // A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
430
        ApplicationFeeAmount *int64 `form:"application_fee_amount"`
431
        // Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
432
        Capture *bool `form:"capture"`
433
        // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
434
        Currency *string `form:"currency"`
435
        // The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
436
        Customer *string `form:"customer"`
437
        // An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
438
        Description  *string                  `form:"description"`
439
        Destination  *ChargeDestinationParams `form:"destination"`
440
        ExchangeRate *float64                 `form:"exchange_rate"`
441
        // Specifies which fields in the response should be expanded.
442
        Expand []*string `form:"expand"`
443
        // A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
444
        FraudDetails *ChargeFraudDetailsParams `form:"fraud_details"`
445
        Level3       *ChargeLevel3Params       `form:"level3"`
446
        // 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
447
        Metadata map[string]string `form:"metadata"`
448
        // The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
449
        OnBehalfOf *string `form:"on_behalf_of"`
450
        // Provides industry-specific information about the charge.
451
        PaymentDetails *ChargePaymentDetailsParams `form:"payment_details"`
452
        // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
453
        RadarOptions *ChargeRadarOptionsParams `form:"radar_options"`
454
        // The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
455
        ReceiptEmail *string `form:"receipt_email"`
456
        // Shipping information for the charge. Helps prevent fraud on charges for physical goods.
457
        Shipping *ShippingDetailsParams     `form:"shipping"`
458
        Source   *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*"
459
        // For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
460
        //
461
        // For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
462
        StatementDescriptor *string `form:"statement_descriptor"`
463
        // Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
464
        StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
465
        // An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
466
        TransferData *ChargeTransferDataParams `form:"transfer_data"`
467
        // A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
468
        TransferGroup *string `form:"transfer_group"`
469
}
470

471
// SetSource adds valid sources to a ChargeParams object,
472
// returning an error for unsupported sources.
473
func (p *ChargeParams) SetSource(sp interface{}) error {
×
474
        source, err := SourceParamsFor(sp)
×
475
        p.Source = source
×
476
        return err
×
477
}
×
478

479
// AddExpand appends a new field to expand.
480
func (p *ChargeParams) AddExpand(f string) {
×
481
        p.Expand = append(p.Expand, &f)
×
482
}
×
483

484
// AddMetadata adds a new key-value pair to the Metadata.
485
func (p *ChargeParams) AddMetadata(key string, value string) {
×
486
        if p.Metadata == nil {
×
487
                p.Metadata = make(map[string]string)
×
488
        }
×
489

490
        p.Metadata[key] = value
×
491
}
492

493
// A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
494
type ChargeFraudDetailsParams struct {
495
        // Either `safe` or `fraudulent`.
496
        UserReport *string `form:"user_report"`
497
}
498

499
// Affiliate details for this purchase.
500
type ChargePaymentDetailsCarRentalAffiliateParams struct {
501
        // The name of the affiliate that originated the purchase.
502
        Name *string `form:"name"`
503
}
504

505
// Details of the recipient.
506
type ChargePaymentDetailsCarRentalDeliveryRecipientParams struct {
507
        // The email of the recipient the ticket is delivered to.
508
        Email *string `form:"email"`
509
        // The name of the recipient the ticket is delivered to.
510
        Name *string `form:"name"`
511
        // The phone number of the recipient the ticket is delivered to.
512
        Phone *string `form:"phone"`
513
}
514

515
// Delivery details for this purchase.
516
type ChargePaymentDetailsCarRentalDeliveryParams struct {
517
        // The delivery method for the payment
518
        Mode *string `form:"mode"`
519
        // Details of the recipient.
520
        Recipient *ChargePaymentDetailsCarRentalDeliveryRecipientParams `form:"recipient"`
521
}
522

523
// The details of the passengers in the travel reservation
524
type ChargePaymentDetailsCarRentalDriverParams struct {
525
        // Full name of the person or entity on the car reservation.
526
        Name *string `form:"name"`
527
}
528

529
// Car rental details for this PaymentIntent.
530
type ChargePaymentDetailsCarRentalParams struct {
531
        // Affiliate details for this purchase.
532
        Affiliate *ChargePaymentDetailsCarRentalAffiliateParams `form:"affiliate"`
533
        // The booking number associated with the car rental.
534
        BookingNumber *string `form:"booking_number"`
535
        // Class code of the car.
536
        CarClassCode *string `form:"car_class_code"`
537
        // Make of the car.
538
        CarMake *string `form:"car_make"`
539
        // Model of the car.
540
        CarModel *string `form:"car_model"`
541
        // The name of the rental car company.
542
        Company *string `form:"company"`
543
        // The customer service phone number of the car rental company.
544
        CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
545
        // Number of days the car is being rented.
546
        DaysRented *int64 `form:"days_rented"`
547
        // Delivery details for this purchase.
548
        Delivery *ChargePaymentDetailsCarRentalDeliveryParams `form:"delivery"`
549
        // The details of the passengers in the travel reservation
550
        Drivers []*ChargePaymentDetailsCarRentalDriverParams `form:"drivers"`
551
        // List of additional charges being billed.
552
        ExtraCharges []*string `form:"extra_charges"`
553
        // Indicates if the customer did not keep nor cancel their booking.
554
        NoShow *bool `form:"no_show"`
555
        // Car pick-up address.
556
        PickupAddress *AddressParams `form:"pickup_address"`
557
        // Car pick-up time. Measured in seconds since the Unix epoch.
558
        PickupAt *int64 `form:"pickup_at"`
559
        // Rental rate.
560
        RateAmount *int64 `form:"rate_amount"`
561
        // The frequency at which the rate amount is applied. One of `day`, `week` or `month`
562
        RateInterval *string `form:"rate_interval"`
563
        // The name of the person or entity renting the car.
564
        RenterName *string `form:"renter_name"`
565
        // Car return address.
566
        ReturnAddress *AddressParams `form:"return_address"`
567
        // Car return time. Measured in seconds since the Unix epoch.
568
        ReturnAt *int64 `form:"return_at"`
569
        // Indicates whether the goods or services are tax-exempt or tax is not collected.
570
        TaxExempt *bool `form:"tax_exempt"`
571
}
572

573
// Affiliate details for this purchase.
574
type ChargePaymentDetailsEventDetailsAffiliateParams struct {
575
        // The name of the affiliate that originated the purchase.
576
        Name *string `form:"name"`
577
}
578

579
// Details of the recipient.
580
type ChargePaymentDetailsEventDetailsDeliveryRecipientParams struct {
581
        // The email of the recipient the ticket is delivered to.
582
        Email *string `form:"email"`
583
        // The name of the recipient the ticket is delivered to.
584
        Name *string `form:"name"`
585
        // The phone number of the recipient the ticket is delivered to.
586
        Phone *string `form:"phone"`
587
}
588

589
// Delivery details for this purchase.
590
type ChargePaymentDetailsEventDetailsDeliveryParams struct {
591
        // The delivery method for the payment
592
        Mode *string `form:"mode"`
593
        // Details of the recipient.
594
        Recipient *ChargePaymentDetailsEventDetailsDeliveryRecipientParams `form:"recipient"`
595
}
596

597
// Event details for this PaymentIntent
598
type ChargePaymentDetailsEventDetailsParams struct {
599
        // Indicates if the tickets are digitally checked when entering the venue.
600
        AccessControlledVenue *bool `form:"access_controlled_venue"`
601
        // The event location's address.
602
        Address *AddressParams `form:"address"`
603
        // Affiliate details for this purchase.
604
        Affiliate *ChargePaymentDetailsEventDetailsAffiliateParams `form:"affiliate"`
605
        // The name of the company
606
        Company *string `form:"company"`
607
        // Delivery details for this purchase.
608
        Delivery *ChargePaymentDetailsEventDetailsDeliveryParams `form:"delivery"`
609
        // Event end time. Measured in seconds since the Unix epoch.
610
        EndsAt *int64 `form:"ends_at"`
611
        // Type of the event entertainment (concert, sports event etc)
612
        Genre *string `form:"genre"`
613
        // The name of the event.
614
        Name *string `form:"name"`
615
        // Event start time. Measured in seconds since the Unix epoch.
616
        StartsAt *int64 `form:"starts_at"`
617
}
618

619
// Affiliate details for this purchase.
620
type ChargePaymentDetailsFlightAffiliateParams struct {
621
        // The name of the affiliate that originated the purchase.
622
        Name *string `form:"name"`
623
}
624

625
// Details of the recipient.
626
type ChargePaymentDetailsFlightDeliveryRecipientParams struct {
627
        // The email of the recipient the ticket is delivered to.
628
        Email *string `form:"email"`
629
        // The name of the recipient the ticket is delivered to.
630
        Name *string `form:"name"`
631
        // The phone number of the recipient the ticket is delivered to.
632
        Phone *string `form:"phone"`
633
}
634

635
// Delivery details for this purchase.
636
type ChargePaymentDetailsFlightDeliveryParams struct {
637
        // The delivery method for the payment
638
        Mode *string `form:"mode"`
639
        // Details of the recipient.
640
        Recipient *ChargePaymentDetailsFlightDeliveryRecipientParams `form:"recipient"`
641
}
642

643
// The details of the passengers in the travel reservation.
644
type ChargePaymentDetailsFlightPassengerParams struct {
645
        // Full name of the person or entity on the flight reservation.
646
        Name *string `form:"name"`
647
}
648

649
// The individual flight segments associated with the trip.
650
type ChargePaymentDetailsFlightSegmentParams struct {
651
        // The flight segment amount.
652
        Amount *int64 `form:"amount"`
653
        // The International Air Transport Association (IATA) airport code for the arrival airport.
654
        ArrivalAirport *string `form:"arrival_airport"`
655
        // The arrival time for the flight segment. Measured in seconds since the Unix epoch.
656
        ArrivesAt *int64 `form:"arrives_at"`
657
        // The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
658
        Carrier *string `form:"carrier"`
659
        // The departure time for the flight segment. Measured in seconds since the Unix epoch.
660
        DepartsAt *int64 `form:"departs_at"`
661
        // The International Air Transport Association (IATA) airport code for the departure airport.
662
        DepartureAirport *string `form:"departure_airport"`
663
        // The flight number associated with the segment
664
        FlightNumber *string `form:"flight_number"`
665
        // The fare class for the segment.
666
        ServiceClass *string `form:"service_class"`
667
}
668

669
// Flight reservation details for this PaymentIntent
670
type ChargePaymentDetailsFlightParams struct {
671
        // Affiliate details for this purchase.
672
        Affiliate *ChargePaymentDetailsFlightAffiliateParams `form:"affiliate"`
673
        // The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
674
        AgencyNumber *string `form:"agency_number"`
675
        // The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
676
        Carrier *string `form:"carrier"`
677
        // Delivery details for this purchase.
678
        Delivery *ChargePaymentDetailsFlightDeliveryParams `form:"delivery"`
679
        // The name of the person or entity on the reservation.
680
        PassengerName *string `form:"passenger_name"`
681
        // The details of the passengers in the travel reservation.
682
        Passengers []*ChargePaymentDetailsFlightPassengerParams `form:"passengers"`
683
        // The individual flight segments associated with the trip.
684
        Segments []*ChargePaymentDetailsFlightSegmentParams `form:"segments"`
685
        // The ticket number associated with the travel reservation.
686
        TicketNumber *string `form:"ticket_number"`
687
}
688

689
// Affiliate details for this purchase.
690
type ChargePaymentDetailsLodgingAffiliateParams struct {
691
        // The name of the affiliate that originated the purchase.
692
        Name *string `form:"name"`
693
}
694

695
// Details of the recipient.
696
type ChargePaymentDetailsLodgingDeliveryRecipientParams struct {
697
        // The email of the recipient the ticket is delivered to.
698
        Email *string `form:"email"`
699
        // The name of the recipient the ticket is delivered to.
700
        Name *string `form:"name"`
701
        // The phone number of the recipient the ticket is delivered to.
702
        Phone *string `form:"phone"`
703
}
704

705
// Delivery details for this purchase.
706
type ChargePaymentDetailsLodgingDeliveryParams struct {
707
        // The delivery method for the payment
708
        Mode *string `form:"mode"`
709
        // Details of the recipient.
710
        Recipient *ChargePaymentDetailsLodgingDeliveryRecipientParams `form:"recipient"`
711
}
712

713
// The details of the passengers in the travel reservation
714
type ChargePaymentDetailsLodgingPassengerParams struct {
715
        // Full name of the person or entity on the lodging reservation.
716
        Name *string `form:"name"`
717
}
718

719
// Lodging reservation details for this PaymentIntent
720
type ChargePaymentDetailsLodgingParams struct {
721
        // The lodging location's address.
722
        Address *AddressParams `form:"address"`
723
        // The number of adults on the booking
724
        Adults *int64 `form:"adults"`
725
        // Affiliate details for this purchase.
726
        Affiliate *ChargePaymentDetailsLodgingAffiliateParams `form:"affiliate"`
727
        // The booking number associated with the lodging reservation.
728
        BookingNumber *string `form:"booking_number"`
729
        // The lodging category
730
        Category *string `form:"category"`
731
        // Loding check-in time. Measured in seconds since the Unix epoch.
732
        CheckinAt *int64 `form:"checkin_at"`
733
        // Lodging check-out time. Measured in seconds since the Unix epoch.
734
        CheckoutAt *int64 `form:"checkout_at"`
735
        // The customer service phone number of the lodging company.
736
        CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
737
        // The daily lodging room rate.
738
        DailyRoomRateAmount *int64 `form:"daily_room_rate_amount"`
739
        // Delivery details for this purchase.
740
        Delivery *ChargePaymentDetailsLodgingDeliveryParams `form:"delivery"`
741
        // List of additional charges being billed.
742
        ExtraCharges []*string `form:"extra_charges"`
743
        // Indicates whether the lodging location is compliant with the Fire Safety Act.
744
        FireSafetyActCompliance *bool `form:"fire_safety_act_compliance"`
745
        // The name of the lodging location.
746
        Name *string `form:"name"`
747
        // Indicates if the customer did not keep their booking while failing to cancel the reservation.
748
        NoShow *bool `form:"no_show"`
749
        // The number of rooms on the booking
750
        NumberOfRooms *int64 `form:"number_of_rooms"`
751
        // The details of the passengers in the travel reservation
752
        Passengers []*ChargePaymentDetailsLodgingPassengerParams `form:"passengers"`
753
        // The phone number of the lodging location.
754
        PropertyPhoneNumber *string `form:"property_phone_number"`
755
        // The room class for this purchase.
756
        RoomClass *string `form:"room_class"`
757
        // The number of room nights
758
        RoomNights *int64 `form:"room_nights"`
759
        // The total tax amount associating with the room reservation.
760
        TotalRoomTaxAmount *int64 `form:"total_room_tax_amount"`
761
        // The total tax amount
762
        TotalTaxAmount *int64 `form:"total_tax_amount"`
763
}
764

765
// Affiliate details for this purchase.
766
type ChargePaymentDetailsSubscriptionAffiliateParams struct {
767
        // The name of the affiliate that originated the purchase.
768
        Name *string `form:"name"`
769
}
770

771
// Subscription billing details for this purchase.
772
type ChargePaymentDetailsSubscriptionBillingIntervalParams struct {
773
        // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
774
        Count *int64 `form:"count"`
775
        // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
776
        Interval *string `form:"interval"`
777
}
778

779
// Subscription details for this PaymentIntent
780
type ChargePaymentDetailsSubscriptionParams struct {
781
        // Affiliate details for this purchase.
782
        Affiliate *ChargePaymentDetailsSubscriptionAffiliateParams `form:"affiliate"`
783
        // Info whether the subscription will be auto renewed upon expiry.
784
        AutoRenewal *bool `form:"auto_renewal"`
785
        // Subscription billing details for this purchase.
786
        BillingInterval *ChargePaymentDetailsSubscriptionBillingIntervalParams `form:"billing_interval"`
787
        // Subscription end time. Measured in seconds since the Unix epoch.
788
        EndsAt *int64 `form:"ends_at"`
789
        // Name of the product on subscription. e.g. Apple Music Subscription
790
        Name *string `form:"name"`
791
        // Subscription start time. Measured in seconds since the Unix epoch.
792
        StartsAt *int64 `form:"starts_at"`
793
}
794

795
// Provides industry-specific information about the charge.
796
type ChargePaymentDetailsParams struct {
797
        // Car rental details for this PaymentIntent.
798
        CarRental *ChargePaymentDetailsCarRentalParams `form:"car_rental"`
799
        // Event details for this PaymentIntent
800
        EventDetails *ChargePaymentDetailsEventDetailsParams `form:"event_details"`
801
        // Flight reservation details for this PaymentIntent
802
        Flight *ChargePaymentDetailsFlightParams `form:"flight"`
803
        // Lodging reservation details for this PaymentIntent
804
        Lodging *ChargePaymentDetailsLodgingParams `form:"lodging"`
805
        // Subscription details for this PaymentIntent
806
        Subscription *ChargePaymentDetailsSubscriptionParams `form:"subscription"`
807
}
808

809
// Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
810
// Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
811
// conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
812
// to an hour behind during outages. Search functionality is not available to merchants in India.
813
type ChargeSearchParams struct {
814
        SearchParams `form:"*"`
815
        // Specifies which fields in the response should be expanded.
816
        Expand []*string `form:"expand"`
817
        // A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
818
        Page *string `form:"page"`
819
}
820

821
// AddExpand appends a new field to expand.
822
func (p *ChargeSearchParams) AddExpand(f string) {
×
823
        p.Expand = append(p.Expand, &f)
×
824
}
×
825

826
// Affiliate details for this purchase.
827
type ChargeCapturePaymentDetailsCarRentalAffiliateParams struct {
828
        // The name of the affiliate that originated the purchase.
829
        Name *string `form:"name"`
830
}
831

832
// Details of the recipient.
833
type ChargeCapturePaymentDetailsCarRentalDeliveryRecipientParams struct {
834
        // The email of the recipient the ticket is delivered to.
835
        Email *string `form:"email"`
836
        // The name of the recipient the ticket is delivered to.
837
        Name *string `form:"name"`
838
        // The phone number of the recipient the ticket is delivered to.
839
        Phone *string `form:"phone"`
840
}
841

842
// Delivery details for this purchase.
843
type ChargeCapturePaymentDetailsCarRentalDeliveryParams struct {
844
        // The delivery method for the payment
845
        Mode *string `form:"mode"`
846
        // Details of the recipient.
847
        Recipient *ChargeCapturePaymentDetailsCarRentalDeliveryRecipientParams `form:"recipient"`
848
}
849

850
// The details of the passengers in the travel reservation
851
type ChargeCapturePaymentDetailsCarRentalDriverParams struct {
852
        // Full name of the person or entity on the car reservation.
853
        Name *string `form:"name"`
854
}
855

856
// Car rental details for this PaymentIntent.
857
type ChargeCapturePaymentDetailsCarRentalParams struct {
858
        // Affiliate details for this purchase.
859
        Affiliate *ChargeCapturePaymentDetailsCarRentalAffiliateParams `form:"affiliate"`
860
        // The booking number associated with the car rental.
861
        BookingNumber *string `form:"booking_number"`
862
        // Class code of the car.
863
        CarClassCode *string `form:"car_class_code"`
864
        // Make of the car.
865
        CarMake *string `form:"car_make"`
866
        // Model of the car.
867
        CarModel *string `form:"car_model"`
868
        // The name of the rental car company.
869
        Company *string `form:"company"`
870
        // The customer service phone number of the car rental company.
871
        CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
872
        // Number of days the car is being rented.
873
        DaysRented *int64 `form:"days_rented"`
874
        // Delivery details for this purchase.
875
        Delivery *ChargeCapturePaymentDetailsCarRentalDeliveryParams `form:"delivery"`
876
        // The details of the passengers in the travel reservation
877
        Drivers []*ChargeCapturePaymentDetailsCarRentalDriverParams `form:"drivers"`
878
        // List of additional charges being billed.
879
        ExtraCharges []*string `form:"extra_charges"`
880
        // Indicates if the customer did not keep nor cancel their booking.
881
        NoShow *bool `form:"no_show"`
882
        // Car pick-up address.
883
        PickupAddress *AddressParams `form:"pickup_address"`
884
        // Car pick-up time. Measured in seconds since the Unix epoch.
885
        PickupAt *int64 `form:"pickup_at"`
886
        // Rental rate.
887
        RateAmount *int64 `form:"rate_amount"`
888
        // The frequency at which the rate amount is applied. One of `day`, `week` or `month`
889
        RateInterval *string `form:"rate_interval"`
890
        // The name of the person or entity renting the car.
891
        RenterName *string `form:"renter_name"`
892
        // Car return address.
893
        ReturnAddress *AddressParams `form:"return_address"`
894
        // Car return time. Measured in seconds since the Unix epoch.
895
        ReturnAt *int64 `form:"return_at"`
896
        // Indicates whether the goods or services are tax-exempt or tax is not collected.
897
        TaxExempt *bool `form:"tax_exempt"`
898
}
899

900
// Affiliate details for this purchase.
901
type ChargeCapturePaymentDetailsEventDetailsAffiliateParams struct {
902
        // The name of the affiliate that originated the purchase.
903
        Name *string `form:"name"`
904
}
905

906
// Details of the recipient.
907
type ChargeCapturePaymentDetailsEventDetailsDeliveryRecipientParams struct {
908
        // The email of the recipient the ticket is delivered to.
909
        Email *string `form:"email"`
910
        // The name of the recipient the ticket is delivered to.
911
        Name *string `form:"name"`
912
        // The phone number of the recipient the ticket is delivered to.
913
        Phone *string `form:"phone"`
914
}
915

916
// Delivery details for this purchase.
917
type ChargeCapturePaymentDetailsEventDetailsDeliveryParams struct {
918
        // The delivery method for the payment
919
        Mode *string `form:"mode"`
920
        // Details of the recipient.
921
        Recipient *ChargeCapturePaymentDetailsEventDetailsDeliveryRecipientParams `form:"recipient"`
922
}
923

924
// Event details for this PaymentIntent
925
type ChargeCapturePaymentDetailsEventDetailsParams struct {
926
        // Indicates if the tickets are digitally checked when entering the venue.
927
        AccessControlledVenue *bool `form:"access_controlled_venue"`
928
        // The event location's address.
929
        Address *AddressParams `form:"address"`
930
        // Affiliate details for this purchase.
931
        Affiliate *ChargeCapturePaymentDetailsEventDetailsAffiliateParams `form:"affiliate"`
932
        // The name of the company
933
        Company *string `form:"company"`
934
        // Delivery details for this purchase.
935
        Delivery *ChargeCapturePaymentDetailsEventDetailsDeliveryParams `form:"delivery"`
936
        // Event end time. Measured in seconds since the Unix epoch.
937
        EndsAt *int64 `form:"ends_at"`
938
        // Type of the event entertainment (concert, sports event etc)
939
        Genre *string `form:"genre"`
940
        // The name of the event.
941
        Name *string `form:"name"`
942
        // Event start time. Measured in seconds since the Unix epoch.
943
        StartsAt *int64 `form:"starts_at"`
944
}
945

946
// Affiliate details for this purchase.
947
type ChargeCapturePaymentDetailsFlightAffiliateParams struct {
948
        // The name of the affiliate that originated the purchase.
949
        Name *string `form:"name"`
950
}
951

952
// Details of the recipient.
953
type ChargeCapturePaymentDetailsFlightDeliveryRecipientParams struct {
954
        // The email of the recipient the ticket is delivered to.
955
        Email *string `form:"email"`
956
        // The name of the recipient the ticket is delivered to.
957
        Name *string `form:"name"`
958
        // The phone number of the recipient the ticket is delivered to.
959
        Phone *string `form:"phone"`
960
}
961

962
// Delivery details for this purchase.
963
type ChargeCapturePaymentDetailsFlightDeliveryParams struct {
964
        // The delivery method for the payment
965
        Mode *string `form:"mode"`
966
        // Details of the recipient.
967
        Recipient *ChargeCapturePaymentDetailsFlightDeliveryRecipientParams `form:"recipient"`
968
}
969

970
// The details of the passengers in the travel reservation.
971
type ChargeCapturePaymentDetailsFlightPassengerParams struct {
972
        // Full name of the person or entity on the flight reservation.
973
        Name *string `form:"name"`
974
}
975

976
// The individual flight segments associated with the trip.
977
type ChargeCapturePaymentDetailsFlightSegmentParams struct {
978
        // The flight segment amount.
979
        Amount *int64 `form:"amount"`
980
        // The International Air Transport Association (IATA) airport code for the arrival airport.
981
        ArrivalAirport *string `form:"arrival_airport"`
982
        // The arrival time for the flight segment. Measured in seconds since the Unix epoch.
983
        ArrivesAt *int64 `form:"arrives_at"`
984
        // The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
985
        Carrier *string `form:"carrier"`
986
        // The departure time for the flight segment. Measured in seconds since the Unix epoch.
987
        DepartsAt *int64 `form:"departs_at"`
988
        // The International Air Transport Association (IATA) airport code for the departure airport.
989
        DepartureAirport *string `form:"departure_airport"`
990
        // The flight number associated with the segment
991
        FlightNumber *string `form:"flight_number"`
992
        // The fare class for the segment.
993
        ServiceClass *string `form:"service_class"`
994
}
995

996
// Flight reservation details for this PaymentIntent
997
type ChargeCapturePaymentDetailsFlightParams struct {
998
        // Affiliate details for this purchase.
999
        Affiliate *ChargeCapturePaymentDetailsFlightAffiliateParams `form:"affiliate"`
1000
        // The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
1001
        AgencyNumber *string `form:"agency_number"`
1002
        // The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
1003
        Carrier *string `form:"carrier"`
1004
        // Delivery details for this purchase.
1005
        Delivery *ChargeCapturePaymentDetailsFlightDeliveryParams `form:"delivery"`
1006
        // The name of the person or entity on the reservation.
1007
        PassengerName *string `form:"passenger_name"`
1008
        // The details of the passengers in the travel reservation.
1009
        Passengers []*ChargeCapturePaymentDetailsFlightPassengerParams `form:"passengers"`
1010
        // The individual flight segments associated with the trip.
1011
        Segments []*ChargeCapturePaymentDetailsFlightSegmentParams `form:"segments"`
1012
        // The ticket number associated with the travel reservation.
1013
        TicketNumber *string `form:"ticket_number"`
1014
}
1015

1016
// Affiliate details for this purchase.
1017
type ChargeCapturePaymentDetailsLodgingAffiliateParams struct {
1018
        // The name of the affiliate that originated the purchase.
1019
        Name *string `form:"name"`
1020
}
1021

1022
// Details of the recipient.
1023
type ChargeCapturePaymentDetailsLodgingDeliveryRecipientParams struct {
1024
        // The email of the recipient the ticket is delivered to.
1025
        Email *string `form:"email"`
1026
        // The name of the recipient the ticket is delivered to.
1027
        Name *string `form:"name"`
1028
        // The phone number of the recipient the ticket is delivered to.
1029
        Phone *string `form:"phone"`
1030
}
1031

1032
// Delivery details for this purchase.
1033
type ChargeCapturePaymentDetailsLodgingDeliveryParams struct {
1034
        // The delivery method for the payment
1035
        Mode *string `form:"mode"`
1036
        // Details of the recipient.
1037
        Recipient *ChargeCapturePaymentDetailsLodgingDeliveryRecipientParams `form:"recipient"`
1038
}
1039

1040
// The details of the passengers in the travel reservation
1041
type ChargeCapturePaymentDetailsLodgingPassengerParams struct {
1042
        // Full name of the person or entity on the lodging reservation.
1043
        Name *string `form:"name"`
1044
}
1045

1046
// Lodging reservation details for this PaymentIntent
1047
type ChargeCapturePaymentDetailsLodgingParams struct {
1048
        // The lodging location's address.
1049
        Address *AddressParams `form:"address"`
1050
        // The number of adults on the booking
1051
        Adults *int64 `form:"adults"`
1052
        // Affiliate details for this purchase.
1053
        Affiliate *ChargeCapturePaymentDetailsLodgingAffiliateParams `form:"affiliate"`
1054
        // The booking number associated with the lodging reservation.
1055
        BookingNumber *string `form:"booking_number"`
1056
        // The lodging category
1057
        Category *string `form:"category"`
1058
        // Loding check-in time. Measured in seconds since the Unix epoch.
1059
        CheckinAt *int64 `form:"checkin_at"`
1060
        // Lodging check-out time. Measured in seconds since the Unix epoch.
1061
        CheckoutAt *int64 `form:"checkout_at"`
1062
        // The customer service phone number of the lodging company.
1063
        CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
1064
        // The daily lodging room rate.
1065
        DailyRoomRateAmount *int64 `form:"daily_room_rate_amount"`
1066
        // Delivery details for this purchase.
1067
        Delivery *ChargeCapturePaymentDetailsLodgingDeliveryParams `form:"delivery"`
1068
        // List of additional charges being billed.
1069
        ExtraCharges []*string `form:"extra_charges"`
1070
        // Indicates whether the lodging location is compliant with the Fire Safety Act.
1071
        FireSafetyActCompliance *bool `form:"fire_safety_act_compliance"`
1072
        // The name of the lodging location.
1073
        Name *string `form:"name"`
1074
        // Indicates if the customer did not keep their booking while failing to cancel the reservation.
1075
        NoShow *bool `form:"no_show"`
1076
        // The number of rooms on the booking
1077
        NumberOfRooms *int64 `form:"number_of_rooms"`
1078
        // The details of the passengers in the travel reservation
1079
        Passengers []*ChargeCapturePaymentDetailsLodgingPassengerParams `form:"passengers"`
1080
        // The phone number of the lodging location.
1081
        PropertyPhoneNumber *string `form:"property_phone_number"`
1082
        // The room class for this purchase.
1083
        RoomClass *string `form:"room_class"`
1084
        // The number of room nights
1085
        RoomNights *int64 `form:"room_nights"`
1086
        // The total tax amount associating with the room reservation.
1087
        TotalRoomTaxAmount *int64 `form:"total_room_tax_amount"`
1088
        // The total tax amount
1089
        TotalTaxAmount *int64 `form:"total_tax_amount"`
1090
}
1091

1092
// Affiliate details for this purchase.
1093
type ChargeCapturePaymentDetailsSubscriptionAffiliateParams struct {
1094
        // The name of the affiliate that originated the purchase.
1095
        Name *string `form:"name"`
1096
}
1097

1098
// Subscription billing details for this purchase.
1099
type ChargeCapturePaymentDetailsSubscriptionBillingIntervalParams struct {
1100
        // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1101
        Count *int64 `form:"count"`
1102
        // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1103
        Interval *string `form:"interval"`
1104
}
1105

1106
// Subscription details for this PaymentIntent
1107
type ChargeCapturePaymentDetailsSubscriptionParams struct {
1108
        // Affiliate details for this purchase.
1109
        Affiliate *ChargeCapturePaymentDetailsSubscriptionAffiliateParams `form:"affiliate"`
1110
        // Info whether the subscription will be auto renewed upon expiry.
1111
        AutoRenewal *bool `form:"auto_renewal"`
1112
        // Subscription billing details for this purchase.
1113
        BillingInterval *ChargeCapturePaymentDetailsSubscriptionBillingIntervalParams `form:"billing_interval"`
1114
        // Subscription end time. Measured in seconds since the Unix epoch.
1115
        EndsAt *int64 `form:"ends_at"`
1116
        // Name of the product on subscription. e.g. Apple Music Subscription
1117
        Name *string `form:"name"`
1118
        // Subscription start time. Measured in seconds since the Unix epoch.
1119
        StartsAt *int64 `form:"starts_at"`
1120
}
1121

1122
// Provides industry-specific information about the charge.
1123
type ChargeCapturePaymentDetailsParams struct {
1124
        // Car rental details for this PaymentIntent.
1125
        CarRental *ChargeCapturePaymentDetailsCarRentalParams `form:"car_rental"`
1126
        // Event details for this PaymentIntent
1127
        EventDetails *ChargeCapturePaymentDetailsEventDetailsParams `form:"event_details"`
1128
        // Flight reservation details for this PaymentIntent
1129
        Flight *ChargeCapturePaymentDetailsFlightParams `form:"flight"`
1130
        // Lodging reservation details for this PaymentIntent
1131
        Lodging *ChargeCapturePaymentDetailsLodgingParams `form:"lodging"`
1132
        // Subscription details for this PaymentIntent
1133
        Subscription *ChargeCapturePaymentDetailsSubscriptionParams `form:"subscription"`
1134
}
1135

1136
// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
1137
type ChargeCaptureTransferDataParams struct {
1138
        // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
1139
        Amount *int64 `form:"amount"`
1140
}
1141

1142
// Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
1143
//
1144
// Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
1145
//
1146
// Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
1147
type ChargeCaptureParams struct {
1148
        Params `form:"*"`
1149
        // The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.
1150
        Amount *int64 `form:"amount"`
1151
        // An application fee to add on to this charge.
1152
        ApplicationFee *int64 `form:"application_fee"`
1153
        // An application fee amount to add on to this charge, which must be less than or equal to the original amount.
1154
        ApplicationFeeAmount *int64   `form:"application_fee_amount"`
1155
        ExchangeRate         *float64 `form:"exchange_rate"`
1156
        // Specifies which fields in the response should be expanded.
1157
        Expand []*string `form:"expand"`
1158
        // Provides industry-specific information about the charge.
1159
        PaymentDetails *ChargeCapturePaymentDetailsParams `form:"payment_details"`
1160
        // The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
1161
        ReceiptEmail *string `form:"receipt_email"`
1162
        // For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
1163
        //
1164
        // For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
1165
        StatementDescriptor *string `form:"statement_descriptor"`
1166
        // Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
1167
        StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
1168
        // An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
1169
        TransferData *ChargeCaptureTransferDataParams `form:"transfer_data"`
1170
        // A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
1171
        TransferGroup *string `form:"transfer_group"`
1172
}
1173

1174
// AddExpand appends a new field to expand.
1175
func (p *ChargeCaptureParams) AddExpand(f string) {
×
1176
        p.Expand = append(p.Expand, &f)
×
1177
}
×
1178

1179
type ChargeBillingDetails struct {
1180
        // Billing address.
1181
        Address *Address `json:"address"`
1182
        // Email address.
1183
        Email string `json:"email"`
1184
        // Full name.
1185
        Name string `json:"name"`
1186
        // Billing phone number (including extension).
1187
        Phone string `json:"phone"`
1188
}
1189

1190
// Information on fraud assessments for the charge.
1191
type ChargeFraudDetails struct {
1192
        // Assessments from Stripe. If set, the value is `fraudulent`.
1193
        StripeReport ChargeFraudStripeReport `json:"stripe_report"`
1194
        // Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
1195
        UserReport ChargeFraudUserReport `json:"user_report"`
1196
}
1197
type ChargeLevel3LineItem struct {
1198
        DiscountAmount     int64  `json:"discount_amount"`
1199
        ProductCode        string `json:"product_code"`
1200
        ProductDescription string `json:"product_description"`
1201
        Quantity           int64  `json:"quantity"`
1202
        TaxAmount          int64  `json:"tax_amount"`
1203
        UnitCost           int64  `json:"unit_cost"`
1204
}
1205
type ChargeLevel3 struct {
1206
        CustomerReference  string                  `json:"customer_reference"`
1207
        LineItems          []*ChargeLevel3LineItem `json:"line_items"`
1208
        MerchantReference  string                  `json:"merchant_reference"`
1209
        ShippingAddressZip string                  `json:"shipping_address_zip"`
1210
        ShippingAmount     int64                   `json:"shipping_amount"`
1211
        ShippingFromZip    string                  `json:"shipping_from_zip"`
1212
}
1213

1214
// The ID of the Radar rule that matched the payment, if applicable.
1215
type ChargeOutcomeRule struct {
1216
        // The action taken on the payment.
1217
        Action string `json:"action"`
1218
        // Unique identifier for the object.
1219
        ID string `json:"id"`
1220
        // The predicate to evaluate the payment against.
1221
        Predicate string `json:"predicate"`
1222
}
1223

1224
// Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
1225
type ChargeOutcome struct {
1226
        // Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
1227
        NetworkStatus string `json:"network_status"`
1228
        // An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
1229
        Reason string `json:"reason"`
1230
        // Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
1231
        RiskLevel string `json:"risk_level"`
1232
        // Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
1233
        RiskScore int64 `json:"risk_score"`
1234
        // The ID of the Radar rule that matched the payment, if applicable.
1235
        Rule *ChargeOutcomeRule `json:"rule"`
1236
        // A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
1237
        SellerMessage string `json:"seller_message"`
1238
        // Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.
1239
        Type string `json:"type"`
1240
}
1241

1242
// UnmarshalJSON handles deserialization of a ChargeOutcomeRule.
1243
// This custom unmarshaling is needed because the resulting
1244
// property may be an id or the full struct if it was expanded.
1245
func (c *ChargeOutcomeRule) UnmarshalJSON(data []byte) error {
2✔
1246
        if id, ok := ParseID(data); ok {
3✔
1247
                c.ID = id
1✔
1248
                return nil
1✔
1249
        }
1✔
1250
        type chargeOutcomeRule ChargeOutcomeRule
1✔
1251
        var v chargeOutcomeRule
1✔
1252
        if err := json.Unmarshal(data, &v); err != nil {
1✔
1253
                return err
×
1254
        }
×
1255
        *c = ChargeOutcomeRule(v)
1✔
1256
        return nil
1✔
1257
}
1258

1259
type ChargePaymentMethodDetailsACHCreditTransfer struct {
1260
        // Account number to transfer funds to.
1261
        AccountNumber string `json:"account_number"`
1262
        // Name of the bank associated with the routing number.
1263
        BankName string `json:"bank_name"`
1264
        // Routing transit number for the bank account to transfer funds to.
1265
        RoutingNumber string `json:"routing_number"`
1266
        // SWIFT code of the bank associated with the routing number.
1267
        SwiftCode string `json:"swift_code"`
1268
}
1269
type ChargePaymentMethodDetailsACHDebit struct {
1270
        // Type of entity that holds the account. This can be either `individual` or `company`.
1271
        AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"`
1272
        // Name of the bank associated with the bank account.
1273
        BankName string `json:"bank_name"`
1274
        // Two-letter ISO code representing the country the bank account is located in.
1275
        Country string `json:"country"`
1276
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
1277
        Fingerprint string `json:"fingerprint"`
1278
        // Last four digits of the bank account number.
1279
        Last4 string `json:"last4"`
1280
        // Routing transit number of the bank account.
1281
        RoutingNumber string `json:"routing_number"`
1282
}
1283
type ChargePaymentMethodDetailsACSSDebit struct {
1284
        // Name of the bank associated with the bank account.
1285
        BankName string `json:"bank_name"`
1286
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
1287
        Fingerprint string `json:"fingerprint"`
1288
        // Institution number of the bank account
1289
        InstitutionNumber string `json:"institution_number"`
1290
        // Last four digits of the bank account number.
1291
        Last4 string `json:"last4"`
1292
        // ID of the mandate used to make this payment.
1293
        Mandate string `json:"mandate"`
1294
        // Transit number of the bank account.
1295
        TransitNumber string `json:"transit_number"`
1296
}
1297
type ChargePaymentMethodDetailsAffirm struct {
1298
        // The Affirm transaction ID associated with this payment.
1299
        TransactionID string `json:"transaction_id"`
1300
}
1301
type ChargePaymentMethodDetailsAfterpayClearpay struct {
1302
        // The Afterpay order ID associated with this payment intent.
1303
        OrderID string `json:"order_id"`
1304
        // Order identifier shown to the merchant in Afterpay's online portal.
1305
        Reference string `json:"reference"`
1306
}
1307
type ChargePaymentMethodDetailsAlipay struct {
1308
        // Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
1309
        BuyerID string `json:"buyer_id"`
1310
        // Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
1311
        Fingerprint string `json:"fingerprint"`
1312
        // Transaction ID of this particular Alipay transaction.
1313
        TransactionID string `json:"transaction_id"`
1314
}
1315
type ChargePaymentMethodDetailsAmazonPay struct{}
1316
type ChargePaymentMethodDetailsAUBECSDebit struct {
1317
        // Bank-State-Branch number of the bank account.
1318
        BSBNumber string `json:"bsb_number"`
1319
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
1320
        Fingerprint string `json:"fingerprint"`
1321
        // Last four digits of the bank account number.
1322
        Last4 string `json:"last4"`
1323
        // ID of the mandate used to make this payment.
1324
        Mandate string `json:"mandate"`
1325
}
1326
type ChargePaymentMethodDetailsBACSDebit struct {
1327
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
1328
        Fingerprint string `json:"fingerprint"`
1329
        // Last four digits of the bank account number.
1330
        Last4 string `json:"last4"`
1331
        // ID of the mandate used to make this payment.
1332
        Mandate string `json:"mandate"`
1333
        // Sort code of the bank account. (e.g., `10-20-30`)
1334
        SortCode string `json:"sort_code"`
1335
}
1336
type ChargePaymentMethodDetailsBancontact struct {
1337
        // Bank code of bank associated with the bank account.
1338
        BankCode string `json:"bank_code"`
1339
        // Name of the bank associated with the bank account.
1340
        BankName string `json:"bank_name"`
1341
        // Bank Identifier Code of the bank associated with the bank account.
1342
        BIC string `json:"bic"`
1343
        // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1344
        GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
1345
        // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1346
        GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
1347
        // Last four characters of the IBAN.
1348
        IBANLast4 string `json:"iban_last4"`
1349
        // Preferred language of the Bancontact authorization page that the customer is redirected to.
1350
        // Can be one of `en`, `de`, `fr`, or `nl`
1351
        PreferredLanguage string `json:"preferred_language"`
1352
        // Owner's verified full name. Values are verified or provided by Bancontact directly
1353
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1354
        VerifiedName string `json:"verified_name"`
1355
}
1356
type ChargePaymentMethodDetailsBLIK struct {
1357
        // A unique and immutable identifier assigned by BLIK to every buyer.
1358
        BuyerID string `json:"buyer_id"`
1359
}
1360
type ChargePaymentMethodDetailsBoleto struct {
1361
        // The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
1362
        TaxID string `json:"tax_id"`
1363
}
1364

1365
// Check results by Card networks on Card address and CVC at time of payment.
1366
type ChargePaymentMethodDetailsCardChecks struct {
1367
        // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1368
        AddressLine1Check ChargePaymentMethodDetailsCardChecksAddressLine1Check `json:"address_line1_check"`
1369
        // If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1370
        AddressPostalCodeCheck ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck `json:"address_postal_code_check"`
1371
        // If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1372
        CVCCheck ChargePaymentMethodDetailsCardChecksCVCCheck `json:"cvc_check"`
1373
}
1374
type ChargePaymentMethodDetailsCardDecrementalAuthorization struct {
1375
        // Indicates whether or not the decremental authorization feature is supported.
1376
        Status ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus `json:"status"`
1377
}
1378
type ChargePaymentMethodDetailsCardExtendedAuthorization struct {
1379
        // Indicates whether or not the capture window is extended beyond the standard authorization.
1380
        Status ChargePaymentMethodDetailsCardExtendedAuthorizationStatus `json:"status"`
1381
}
1382
type ChargePaymentMethodDetailsCardIncrementalAuthorization struct {
1383
        // Indicates whether or not the incremental authorization feature is supported.
1384
        Status ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus `json:"status"`
1385
}
1386

1387
// Installment details for this payment (Mexico only).
1388
//
1389
// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
1390
type ChargePaymentMethodDetailsCardInstallments struct {
1391
        // Installment plan selected for the payment.
1392
        Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`
1393
}
1394
type ChargePaymentMethodDetailsCardMulticapture struct {
1395
        // Indicates whether or not multiple captures are supported.
1396
        Status ChargePaymentMethodDetailsCardMulticaptureStatus `json:"status"`
1397
}
1398

1399
// If this card has network token credentials, this contains the details of the network token credentials.
1400
type ChargePaymentMethodDetailsCardNetworkToken struct {
1401
        // Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
1402
        Used bool `json:"used"`
1403
}
1404
type ChargePaymentMethodDetailsCardOvercapture struct {
1405
        // The maximum amount that can be captured.
1406
        MaximumAmountCapturable int64 `json:"maximum_amount_capturable"`
1407
        // Indicates whether or not the authorized amount can be over-captured.
1408
        Status ChargePaymentMethodDetailsCardOvercaptureStatus `json:"status"`
1409
}
1410

1411
// Populated if this transaction used 3D Secure authentication.
1412
type ChargePaymentMethodDetailsCardThreeDSecure struct {
1413
        // For authenticated transactions: how the customer was authenticated by
1414
        // the issuing bank.
1415
        AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"`
1416
        // The Electronic Commerce Indicator (ECI). A protocol-level field
1417
        // indicating what degree of authentication was performed.
1418
        ElectronicCommerceIndicator ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator `json:"electronic_commerce_indicator"`
1419
        // The exemption requested via 3DS and accepted by the issuer at authentication time.
1420
        ExemptionIndicator ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator `json:"exemption_indicator"`
1421
        // Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
1422
        // the outcome of Stripe's internal risk assessment.
1423
        ExemptionIndicatorApplied bool `json:"exemption_indicator_applied"`
1424
        // Indicates the outcome of 3D Secure authentication.
1425
        Result ChargePaymentMethodDetailsCardThreeDSecureResult `json:"result"`
1426
        // Additional information about why 3D Secure succeeded or failed based
1427
        // on the `result`.
1428
        ResultReason ChargePaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"`
1429
        // The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
1430
        // (dsTransId) for this payment.
1431
        TransactionID string `json:"transaction_id"`
1432
        // The version of 3D Secure that was used.
1433
        Version string `json:"version"`
1434
}
1435
type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct{}
1436
type ChargePaymentMethodDetailsCardWalletApplePay struct{}
1437
type ChargePaymentMethodDetailsCardWalletGooglePay struct{}
1438
type ChargePaymentMethodDetailsCardWalletLink struct{}
1439
type ChargePaymentMethodDetailsCardWalletMasterpass struct {
1440
        // Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1441
        BillingAddress *Address `json:"billing_address"`
1442
        // Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1443
        Email string `json:"email"`
1444
        // Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1445
        Name string `json:"name"`
1446
        // Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1447
        ShippingAddress *Address `json:"shipping_address"`
1448
}
1449
type ChargePaymentMethodDetailsCardWalletSamsungPay struct{}
1450
type ChargePaymentMethodDetailsCardWalletVisaCheckout struct {
1451
        // Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1452
        BillingAddress *Address `json:"billing_address"`
1453
        // Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1454
        Email string `json:"email"`
1455
        // Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1456
        Name string `json:"name"`
1457
        // Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1458
        ShippingAddress *Address `json:"shipping_address"`
1459
}
1460

1461
// If this Card is part of a card wallet, this contains the details of the card wallet.
1462
type ChargePaymentMethodDetailsCardWallet struct {
1463
        AmexExpressCheckout *ChargePaymentMethodDetailsCardWalletAmexExpressCheckout `json:"amex_express_checkout"`
1464
        ApplePay            *ChargePaymentMethodDetailsCardWalletApplePay            `json:"apple_pay"`
1465
        // (For tokenized numbers only.) The last four digits of the device account number.
1466
        DynamicLast4 string                                          `json:"dynamic_last4"`
1467
        GooglePay    *ChargePaymentMethodDetailsCardWalletGooglePay  `json:"google_pay"`
1468
        Link         *ChargePaymentMethodDetailsCardWalletLink       `json:"link"`
1469
        Masterpass   *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"`
1470
        SamsungPay   *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"`
1471
        // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
1472
        Type         PaymentMethodCardWalletType                       `json:"type"`
1473
        VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"`
1474
}
1475
type ChargePaymentMethodDetailsCard struct {
1476
        // The authorized amount.
1477
        AmountAuthorized int64 `json:"amount_authorized"`
1478
        // Authorization code on the charge.
1479
        AuthorizationCode string `json:"authorization_code"`
1480
        // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1481
        Brand PaymentMethodCardBrand `json:"brand"`
1482
        // When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
1483
        CaptureBefore int64 `json:"capture_before"`
1484
        // Check results by Card networks on Card address and CVC at time of payment.
1485
        Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"`
1486
        // 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.
1487
        Country                  string                                                  `json:"country"`
1488
        DecrementalAuthorization *ChargePaymentMethodDetailsCardDecrementalAuthorization `json:"decremental_authorization"`
1489
        // Two-digit number representing the card's expiration month.
1490
        ExpMonth int64 `json:"exp_month"`
1491
        // Four-digit number representing the card's expiration year.
1492
        ExpYear               int64                                                `json:"exp_year"`
1493
        ExtendedAuthorization *ChargePaymentMethodDetailsCardExtendedAuthorization `json:"extended_authorization"`
1494
        // 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.
1495
        //
1496
        // *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.*
1497
        Fingerprint string `json:"fingerprint"`
1498
        // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
1499
        Funding                  CardFunding                                             `json:"funding"`
1500
        IncrementalAuthorization *ChargePaymentMethodDetailsCardIncrementalAuthorization `json:"incremental_authorization"`
1501
        // Installment details for this payment (Mexico only).
1502
        //
1503
        // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
1504
        Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"`
1505
        // The last four digits of the card.
1506
        Last4 string `json:"last4"`
1507
        // ID of the mandate used to make this payment or created by it.
1508
        Mandate string `json:"mandate"`
1509
        // True if this payment was marked as MOTO and out of scope for SCA.
1510
        MOTO         bool                                        `json:"moto"`
1511
        Multicapture *ChargePaymentMethodDetailsCardMulticapture `json:"multicapture"`
1512
        // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1513
        Network ChargePaymentMethodDetailsCardNetwork `json:"network"`
1514
        // If this card has network token credentials, this contains the details of the network token credentials.
1515
        NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"`
1516
        Overcapture  *ChargePaymentMethodDetailsCardOvercapture  `json:"overcapture"`
1517
        // Populated if this transaction used 3D Secure authentication.
1518
        ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"`
1519
        // If this Card is part of a card wallet, this contains the details of the card wallet.
1520
        Wallet *ChargePaymentMethodDetailsCardWallet `json:"wallet"`
1521
        // Please note that the fields below are for internal use only and are not returned
1522
        // as part of standard API requests.
1523
        // 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.)
1524
        Description string `json:"description"`
1525
        // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
1526
        IIN string `json:"iin"`
1527
        // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
1528
        Issuer string `json:"issuer"`
1529
}
1530

1531
// Details about payments collected offline.
1532
type ChargePaymentMethodDetailsCardPresentOffline struct {
1533
        // Time at which the payment was collected while offline
1534
        StoredAt int64 `json:"stored_at"`
1535
        // The method used to process this payment method offline. Only deferred is allowed.
1536
        Type ChargePaymentMethodDetailsCardPresentOfflineType `json:"type"`
1537
}
1538

1539
// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
1540
type ChargePaymentMethodDetailsCardPresentReceipt struct {
1541
        // The type of account being debited or credited
1542
        AccountType ChargePaymentMethodDetailsCardPresentReceiptAccountType `json:"account_type"`
1543
        // EMV tag 9F26, cryptogram generated by the integrated circuit chip.
1544
        ApplicationCryptogram string `json:"application_cryptogram"`
1545
        // Mnenomic of the Application Identifier.
1546
        ApplicationPreferredName string `json:"application_preferred_name"`
1547
        // Identifier for this transaction.
1548
        AuthorizationCode string `json:"authorization_code"`
1549
        // EMV tag 8A. A code returned by the card issuer.
1550
        AuthorizationResponseCode string `json:"authorization_response_code"`
1551
        // Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
1552
        CardholderVerificationMethod string `json:"cardholder_verification_method"`
1553
        // EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
1554
        DedicatedFileName string `json:"dedicated_file_name"`
1555
        // The outcome of a series of EMV functions performed by the card reader.
1556
        TerminalVerificationResults string `json:"terminal_verification_results"`
1557
        // An indication of various EMV functions performed during the transaction.
1558
        TransactionStatusInformation string `json:"transaction_status_information"`
1559
}
1560
type ChargePaymentMethodDetailsCardPresentWallet struct {
1561
        // The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
1562
        Type ChargePaymentMethodDetailsCardPresentWalletType `json:"type"`
1563
}
1564
type ChargePaymentMethodDetailsCardPresent struct {
1565
        // The authorized amount
1566
        AmountAuthorized int64 `json:"amount_authorized"`
1567
        // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1568
        Brand PaymentMethodCardBrand `json:"brand"`
1569
        // The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
1570
        BrandProduct string `json:"brand_product"`
1571
        // When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
1572
        CaptureBefore int64 `json:"capture_before"`
1573
        // The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
1574
        CardholderName string `json:"cardholder_name"`
1575
        // 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.
1576
        Country string `json:"country"`
1577
        // Authorization response cryptogram.
1578
        EmvAuthData string `json:"emv_auth_data"`
1579
        // Two-digit number representing the card's expiration month.
1580
        ExpMonth int64 `json:"exp_month"`
1581
        // Four-digit number representing the card's expiration year.
1582
        ExpYear int64 `json:"exp_year"`
1583
        // 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.
1584
        //
1585
        // *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.*
1586
        Fingerprint string `json:"fingerprint"`
1587
        // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
1588
        Funding CardFunding `json:"funding"`
1589
        // ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
1590
        GeneratedCard string `json:"generated_card"`
1591
        // Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
1592
        IncrementalAuthorizationSupported bool `json:"incremental_authorization_supported"`
1593
        // The last four digits of the card.
1594
        Last4 string `json:"last4"`
1595
        // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1596
        Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"`
1597
        // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands.
1598
        NetworkTransactionID string `json:"network_transaction_id"`
1599
        // Details about payments collected offline.
1600
        Offline *ChargePaymentMethodDetailsCardPresentOffline `json:"offline"`
1601
        // Defines whether the authorized amount can be over-captured or not
1602
        OvercaptureSupported bool `json:"overcapture_supported"`
1603
        // EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
1604
        PreferredLocales []string `json:"preferred_locales"`
1605
        // How card details were read in this transaction.
1606
        ReadMethod string `json:"read_method"`
1607
        // A collection of fields required to be displayed on receipts. Only required for EMV transactions.
1608
        Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"`
1609
        Wallet  *ChargePaymentMethodDetailsCardPresentWallet  `json:"wallet"`
1610
        // Please note that the fields below are for internal use only and are not returned
1611
        // as part of standard API requests.
1612
        // 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.)
1613
        Description string `json:"description"`
1614
        // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
1615
        IIN string `json:"iin"`
1616
        // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
1617
        Issuer string `json:"issuer"`
1618
}
1619
type ChargePaymentMethodDetailsCashApp struct {
1620
        // A unique and immutable identifier assigned by Cash App to every buyer.
1621
        BuyerID string `json:"buyer_id"`
1622
        // A public identifier for buyers using Cash App.
1623
        Cashtag string `json:"cashtag"`
1624
}
1625
type ChargePaymentMethodDetailsCustomerBalance struct{}
1626
type ChargePaymentMethodDetailsEPS struct {
1627
        // The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
1628
        Bank string `json:"bank"`
1629
        // Owner's verified full name. Values are verified or provided by EPS directly
1630
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1631
        // EPS rarely provides this information so the attribute is usually empty.
1632
        VerifiedName string `json:"verified_name"`
1633
}
1634
type ChargePaymentMethodDetailsFPX struct {
1635
        // Account holder type, if provided. Can be one of `individual` or `company`.
1636
        AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"`
1637
        // The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
1638
        Bank string `json:"bank"`
1639
        // Unique transaction id generated by FPX for every request from the merchant
1640
        TransactionID string `json:"transaction_id"`
1641
}
1642
type ChargePaymentMethodDetailsGiropay struct {
1643
        // Bank code of bank associated with the bank account.
1644
        BankCode string `json:"bank_code"`
1645
        // Name of the bank associated with the bank account.
1646
        BankName string `json:"bank_name"`
1647
        // Bank Identifier Code of the bank associated with the bank account.
1648
        BIC string `json:"bic"`
1649
        // Owner's verified full name. Values are verified or provided by Giropay directly
1650
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1651
        // Giropay rarely provides this information so the attribute is usually empty.
1652
        VerifiedName string `json:"verified_name"`
1653
}
1654
type ChargePaymentMethodDetailsGrabpay struct {
1655
        // Unique transaction id generated by GrabPay
1656
        TransactionID string `json:"transaction_id"`
1657
}
1658
type ChargePaymentMethodDetailsIDEAL struct {
1659
        // The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
1660
        Bank string `json:"bank"`
1661
        // The Bank Identifier Code of the customer's bank.
1662
        BIC string `json:"bic"`
1663
        // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1664
        GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
1665
        // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1666
        GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
1667
        // Last four characters of the IBAN.
1668
        IBANLast4 string `json:"iban_last4"`
1669
        // Owner's verified full name. Values are verified or provided by iDEAL directly
1670
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1671
        VerifiedName string `json:"verified_name"`
1672
}
1673

1674
// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
1675
type ChargePaymentMethodDetailsInteracPresentReceipt struct {
1676
        // The type of account being debited or credited
1677
        AccountType string `json:"account_type"`
1678
        // EMV tag 9F26, cryptogram generated by the integrated circuit chip.
1679
        ApplicationCryptogram string `json:"application_cryptogram"`
1680
        // Mnenomic of the Application Identifier.
1681
        ApplicationPreferredName string `json:"application_preferred_name"`
1682
        // Identifier for this transaction.
1683
        AuthorizationCode string `json:"authorization_code"`
1684
        // EMV tag 8A. A code returned by the card issuer.
1685
        AuthorizationResponseCode string `json:"authorization_response_code"`
1686
        // Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
1687
        CardholderVerificationMethod string `json:"cardholder_verification_method"`
1688
        // EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
1689
        DedicatedFileName string `json:"dedicated_file_name"`
1690
        // The outcome of a series of EMV functions performed by the card reader.
1691
        TerminalVerificationResults string `json:"terminal_verification_results"`
1692
        // An indication of various EMV functions performed during the transaction.
1693
        TransactionStatusInformation string `json:"transaction_status_information"`
1694
}
1695
type ChargePaymentMethodDetailsInteracPresent struct {
1696
        // Card brand. Can be `interac`, `mastercard` or `visa`.
1697
        Brand string `json:"brand"`
1698
        // The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
1699
        CardholderName string `json:"cardholder_name"`
1700
        // 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.
1701
        Country string `json:"country"`
1702
        // Authorization response cryptogram.
1703
        EmvAuthData string `json:"emv_auth_data"`
1704
        // Two-digit number representing the card's expiration month.
1705
        ExpMonth int64 `json:"exp_month"`
1706
        // Four-digit number representing the card's expiration year.
1707
        ExpYear int64 `json:"exp_year"`
1708
        // 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.
1709
        //
1710
        // *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.*
1711
        Fingerprint string `json:"fingerprint"`
1712
        // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
1713
        Funding string `json:"funding"`
1714
        // ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
1715
        GeneratedCard string `json:"generated_card"`
1716
        // The last four digits of the card.
1717
        Last4 string `json:"last4"`
1718
        // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1719
        Network string `json:"network"`
1720
        // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands.
1721
        NetworkTransactionID string `json:"network_transaction_id"`
1722
        // EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
1723
        PreferredLocales []string `json:"preferred_locales"`
1724
        // How card details were read in this transaction.
1725
        ReadMethod string `json:"read_method"`
1726
        // A collection of fields required to be displayed on receipts. Only required for EMV transactions.
1727
        Receipt *ChargePaymentMethodDetailsInteracPresentReceipt `json:"receipt"`
1728
        // Please note that the fields below are for internal use only and are not returned
1729
        // as part of standard API requests.
1730
        // 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.)
1731
        Description string `json:"description"`
1732
        // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
1733
        IIN string `json:"iin"`
1734
        // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
1735
        Issuer string `json:"issuer"`
1736
}
1737
type ChargePaymentMethodDetailsKakaoPay struct {
1738
        // A unique identifier for the buyer as determined by the local payment processor.
1739
        BuyerID string `json:"buyer_id"`
1740
}
1741

1742
// The payer's address
1743
type ChargePaymentMethodDetailsKlarnaPayerDetailsAddress struct {
1744
        // The payer address country
1745
        Country string `json:"country"`
1746
}
1747

1748
// The payer details for this transaction.
1749
type ChargePaymentMethodDetailsKlarnaPayerDetails struct {
1750
        // The payer's address
1751
        Address *ChargePaymentMethodDetailsKlarnaPayerDetailsAddress `json:"address"`
1752
}
1753
type ChargePaymentMethodDetailsKlarna struct {
1754
        // The payer details for this transaction.
1755
        PayerDetails *ChargePaymentMethodDetailsKlarnaPayerDetails `json:"payer_details"`
1756
        // The Klarna payment method used for this transaction.
1757
        // Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
1758
        PaymentMethodCategory ChargePaymentMethodDetailsKlarnaPaymentMethodCategory `json:"payment_method_category"`
1759
        // Preferred language of the Klarna authorization page that the customer is redirected to.
1760
        // Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
1761
        PreferredLocale string `json:"preferred_locale"`
1762
}
1763

1764
// If the payment succeeded, this contains the details of the convenience store where the payment was completed.
1765
type ChargePaymentMethodDetailsKonbiniStore struct {
1766
        // The name of the convenience store chain where the payment was completed.
1767
        Chain ChargePaymentMethodDetailsKonbiniStoreChain `json:"chain"`
1768
}
1769
type ChargePaymentMethodDetailsKonbini struct {
1770
        // If the payment succeeded, this contains the details of the convenience store where the payment was completed.
1771
        Store *ChargePaymentMethodDetailsKonbiniStore `json:"store"`
1772
}
1773
type ChargePaymentMethodDetailsKrCard struct {
1774
        // The local credit or debit card brand.
1775
        Brand ChargePaymentMethodDetailsKrCardBrand `json:"brand"`
1776
        // A unique identifier for the buyer as determined by the local payment processor.
1777
        BuyerID string `json:"buyer_id"`
1778
        // The last four digits of the card. This may not be present for American Express cards.
1779
        Last4 string `json:"last4"`
1780
}
1781
type ChargePaymentMethodDetailsLink struct {
1782
        // Two-letter ISO code representing the funding source country beneath the Link payment.
1783
        // You could use this attribute to get a sense of international fees.
1784
        Country string `json:"country"`
1785
}
1786
type ChargePaymentMethodDetailsMbWay struct{}
1787

1788
// Internal card details
1789
type ChargePaymentMethodDetailsMobilepayCard struct {
1790
        // Brand of the card used in the transaction
1791
        Brand string `json:"brand"`
1792
        // Two-letter ISO code representing the country of the card
1793
        Country string `json:"country"`
1794
        // Two digit number representing the card's expiration month
1795
        ExpMonth int64 `json:"exp_month"`
1796
        // Two digit number representing the card's expiration year
1797
        ExpYear int64 `json:"exp_year"`
1798
        // The last 4 digits of the card
1799
        Last4 string `json:"last4"`
1800
}
1801
type ChargePaymentMethodDetailsMobilepay struct {
1802
        // Internal card details
1803
        Card *ChargePaymentMethodDetailsMobilepayCard `json:"card"`
1804
}
1805
type ChargePaymentMethodDetailsMultibanco struct {
1806
        // Entity number associated with this Multibanco payment.
1807
        Entity string `json:"entity"`
1808
        // Reference number associated with this Multibanco payment.
1809
        Reference string `json:"reference"`
1810
}
1811
type ChargePaymentMethodDetailsNaverPay struct {
1812
        // A unique identifier for the buyer as determined by the local payment processor.
1813
        BuyerID string `json:"buyer_id"`
1814
}
1815
type ChargePaymentMethodDetailsOXXO struct {
1816
        // OXXO reference number
1817
        Number string `json:"number"`
1818
}
1819
type ChargePaymentMethodDetailsP24 struct {
1820
        // The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
1821
        Bank string `json:"bank"`
1822
        // Unique reference for this Przelewy24 payment.
1823
        Reference string `json:"reference"`
1824
        // Owner's verified full name. Values are verified or provided by Przelewy24 directly
1825
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1826
        // Przelewy24 rarely provides this information so the attribute is usually empty.
1827
        VerifiedName string `json:"verified_name"`
1828
}
1829
type ChargePaymentMethodDetailsPayco struct {
1830
        // A unique identifier for the buyer as determined by the local payment processor.
1831
        BuyerID string `json:"buyer_id"`
1832
}
1833
type ChargePaymentMethodDetailsPayNow struct {
1834
        // Reference number associated with this PayNow payment
1835
        Reference string `json:"reference"`
1836
}
1837

1838
// The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
1839
type ChargePaymentMethodDetailsPaypalSellerProtection struct {
1840
        // An array of conditions that are covered for the transaction, if applicable.
1841
        DisputeCategories []ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory `json:"dispute_categories"`
1842
        // Indicates whether the transaction is eligible for PayPal's seller protection.
1843
        Status ChargePaymentMethodDetailsPaypalSellerProtectionStatus `json:"status"`
1844
}
1845
type ChargePaymentMethodDetailsPaypal struct {
1846
        // Owner's email. Values are provided by PayPal directly
1847
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1848
        PayerEmail string `json:"payer_email"`
1849
        // PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
1850
        PayerID string `json:"payer_id"`
1851
        // Owner's full name. Values provided by PayPal directly
1852
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1853
        PayerName string `json:"payer_name"`
1854
        // The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
1855
        SellerProtection *ChargePaymentMethodDetailsPaypalSellerProtection `json:"seller_protection"`
1856
        // The shipping address for the customer, as supplied by the merchant at the point of payment
1857
        // execution. This shipping address will not be updated if the merchant updates the shipping
1858
        // address on the PaymentIntent after the PaymentIntent was successfully confirmed.
1859
        Shipping *Address `json:"shipping"`
1860
        // A unique ID generated by PayPal for this transaction.
1861
        TransactionID string `json:"transaction_id"`
1862
        // The shipping address for the customer, as supplied by the merchant at the point of payment
1863
        // execution. This shipping address will not be updated if the merchant updates the shipping
1864
        // address on the PaymentIntent after the PaymentIntent was successfully confirmed.
1865
        VerifiedAddress *Address `json:"verified_address"`
1866
        // Owner's verified email. Values are verified or provided by PayPal directly
1867
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1868
        VerifiedEmail string `json:"verified_email"`
1869
        // Owner's verified full name. Values are verified or provided by PayPal directly
1870
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1871
        VerifiedName string `json:"verified_name"`
1872
}
1873
type ChargePaymentMethodDetailsPayto struct {
1874
        // Bank-State-Branch number of the bank account.
1875
        BSBNumber string `json:"bsb_number"`
1876
        // Last four digits of the bank account number.
1877
        Last4 string `json:"last4"`
1878
        // ID of the mandate used to make this payment.
1879
        Mandate string `json:"mandate"`
1880
        // The PayID alias for the bank account.
1881
        PayID string `json:"pay_id"`
1882
}
1883
type ChargePaymentMethodDetailsPix struct {
1884
        // Unique transaction id generated by BCB
1885
        BankTransactionID string `json:"bank_transaction_id"`
1886
}
1887
type ChargePaymentMethodDetailsPromptPay struct {
1888
        // Bill reference generated by PromptPay
1889
        Reference string `json:"reference"`
1890
}
1891
type ChargePaymentMethodDetailsRechnung struct{}
1892
type ChargePaymentMethodDetailsRevolutPay struct{}
1893
type ChargePaymentMethodDetailsSamsungPay struct {
1894
        // A unique identifier for the buyer as determined by the local payment processor.
1895
        BuyerID string `json:"buyer_id"`
1896
}
1897
type ChargePaymentMethodDetailsSEPACreditTransfer struct {
1898
        // Name of the bank associated with the bank account.
1899
        BankName string `json:"bank_name"`
1900
        // Bank Identifier Code of the bank associated with the bank account.
1901
        BIC string `json:"bic"`
1902
        // IBAN of the bank account to transfer funds to.
1903
        IBAN string `json:"iban"`
1904
}
1905
type ChargePaymentMethodDetailsSEPADebit struct {
1906
        // Bank code of bank associated with the bank account.
1907
        BankCode string `json:"bank_code"`
1908
        // Branch code of bank associated with the bank account.
1909
        BranchCode string `json:"branch_code"`
1910
        // Two-letter ISO code representing the country the bank account is located in.
1911
        Country string `json:"country"`
1912
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
1913
        Fingerprint string `json:"fingerprint"`
1914
        // Last four characters of the IBAN.
1915
        Last4 string `json:"last4"`
1916
        // Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve).
1917
        Mandate string `json:"mandate"`
1918
}
1919
type ChargePaymentMethodDetailsSofort struct {
1920
        // Bank code of bank associated with the bank account.
1921
        BankCode string `json:"bank_code"`
1922
        // Name of the bank associated with the bank account.
1923
        BankName string `json:"bank_name"`
1924
        // Bank Identifier Code of the bank associated with the bank account.
1925
        BIC string `json:"bic"`
1926
        // Two-letter ISO code representing the country the bank account is located in.
1927
        Country string `json:"country"`
1928
        // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1929
        GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
1930
        // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1931
        GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
1932
        // Last four characters of the IBAN.
1933
        IBANLast4 string `json:"iban_last4"`
1934
        // Preferred language of the SOFORT authorization page that the customer is redirected to.
1935
        // Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`
1936
        PreferredLanguage string `json:"preferred_language"`
1937
        // Owner's verified full name. Values are verified or provided by SOFORT directly
1938
        // (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1939
        VerifiedName string `json:"verified_name"`
1940
}
1941
type ChargePaymentMethodDetailsStripeAccount struct{}
1942
type ChargePaymentMethodDetailsSwish struct {
1943
        // Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
1944
        Fingerprint string `json:"fingerprint"`
1945
        // Payer bank reference number for the payment
1946
        PaymentReference string `json:"payment_reference"`
1947
        // The last four digits of the Swish account phone number
1948
        VerifiedPhoneLast4 string `json:"verified_phone_last4"`
1949
}
1950
type ChargePaymentMethodDetailsTWINT struct{}
1951
type ChargePaymentMethodDetailsUSBankAccount struct {
1952
        // Account holder type: individual or company.
1953
        AccountHolderType ChargePaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
1954
        // Account type: checkings or savings. Defaults to checking if omitted.
1955
        AccountType ChargePaymentMethodDetailsUSBankAccountAccountType `json:"account_type"`
1956
        // Name of the bank associated with the bank account.
1957
        BankName string `json:"bank_name"`
1958
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
1959
        Fingerprint string `json:"fingerprint"`
1960
        // Last four digits of the bank account number.
1961
        Last4 string `json:"last4"`
1962
        // ID of the mandate used to make this payment.
1963
        Mandate *Mandate `json:"mandate"`
1964
        // Reference number to locate ACH payments with customer's bank.
1965
        PaymentReference string `json:"payment_reference"`
1966
        // Routing number of the bank account.
1967
        RoutingNumber string `json:"routing_number"`
1968
}
1969
type ChargePaymentMethodDetailsWeChat struct{}
1970
type ChargePaymentMethodDetailsWeChatPay struct {
1971
        // Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
1972
        Fingerprint string `json:"fingerprint"`
1973
        // Transaction ID of this particular WeChat Pay transaction.
1974
        TransactionID string `json:"transaction_id"`
1975
}
1976
type ChargePaymentMethodDetailsZip struct{}
1977

1978
// Details about the payment method at the time of the transaction.
1979
type ChargePaymentMethodDetails struct {
1980
        ACHCreditTransfer  *ChargePaymentMethodDetailsACHCreditTransfer  `json:"ach_credit_transfer"`
1981
        ACHDebit           *ChargePaymentMethodDetailsACHDebit           `json:"ach_debit"`
1982
        ACSSDebit          *ChargePaymentMethodDetailsACSSDebit          `json:"acss_debit"`
1983
        Affirm             *ChargePaymentMethodDetailsAffirm             `json:"affirm"`
1984
        AfterpayClearpay   *ChargePaymentMethodDetailsAfterpayClearpay   `json:"afterpay_clearpay"`
1985
        Alipay             *ChargePaymentMethodDetailsAlipay             `json:"alipay"`
1986
        AmazonPay          *ChargePaymentMethodDetailsAmazonPay          `json:"amazon_pay"`
1987
        AUBECSDebit        *ChargePaymentMethodDetailsAUBECSDebit        `json:"au_becs_debit"`
1988
        BACSDebit          *ChargePaymentMethodDetailsBACSDebit          `json:"bacs_debit"`
1989
        Bancontact         *ChargePaymentMethodDetailsBancontact         `json:"bancontact"`
1990
        BLIK               *ChargePaymentMethodDetailsBLIK               `json:"blik"`
1991
        Boleto             *ChargePaymentMethodDetailsBoleto             `json:"boleto"`
1992
        Card               *ChargePaymentMethodDetailsCard               `json:"card"`
1993
        CardPresent        *ChargePaymentMethodDetailsCardPresent        `json:"card_present"`
1994
        CashApp            *ChargePaymentMethodDetailsCashApp            `json:"cashapp"`
1995
        CustomerBalance    *ChargePaymentMethodDetailsCustomerBalance    `json:"customer_balance"`
1996
        EPS                *ChargePaymentMethodDetailsEPS                `json:"eps"`
1997
        FPX                *ChargePaymentMethodDetailsFPX                `json:"fpx"`
1998
        Giropay            *ChargePaymentMethodDetailsGiropay            `json:"giropay"`
1999
        Grabpay            *ChargePaymentMethodDetailsGrabpay            `json:"grabpay"`
2000
        IDEAL              *ChargePaymentMethodDetailsIDEAL              `json:"ideal"`
2001
        InteracPresent     *ChargePaymentMethodDetailsInteracPresent     `json:"interac_present"`
2002
        KakaoPay           *ChargePaymentMethodDetailsKakaoPay           `json:"kakao_pay"`
2003
        Klarna             *ChargePaymentMethodDetailsKlarna             `json:"klarna"`
2004
        Konbini            *ChargePaymentMethodDetailsKonbini            `json:"konbini"`
2005
        KrCard             *ChargePaymentMethodDetailsKrCard             `json:"kr_card"`
2006
        Link               *ChargePaymentMethodDetailsLink               `json:"link"`
2007
        MbWay              *ChargePaymentMethodDetailsMbWay              `json:"mb_way"`
2008
        Mobilepay          *ChargePaymentMethodDetailsMobilepay          `json:"mobilepay"`
2009
        Multibanco         *ChargePaymentMethodDetailsMultibanco         `json:"multibanco"`
2010
        NaverPay           *ChargePaymentMethodDetailsNaverPay           `json:"naver_pay"`
2011
        OXXO               *ChargePaymentMethodDetailsOXXO               `json:"oxxo"`
2012
        P24                *ChargePaymentMethodDetailsP24                `json:"p24"`
2013
        Payco              *ChargePaymentMethodDetailsPayco              `json:"payco"`
2014
        PayNow             *ChargePaymentMethodDetailsPayNow             `json:"paynow"`
2015
        Paypal             *ChargePaymentMethodDetailsPaypal             `json:"paypal"`
2016
        Payto              *ChargePaymentMethodDetailsPayto              `json:"payto"`
2017
        Pix                *ChargePaymentMethodDetailsPix                `json:"pix"`
2018
        PromptPay          *ChargePaymentMethodDetailsPromptPay          `json:"promptpay"`
2019
        Rechnung           *ChargePaymentMethodDetailsRechnung           `json:"rechnung"`
2020
        RevolutPay         *ChargePaymentMethodDetailsRevolutPay         `json:"revolut_pay"`
2021
        SamsungPay         *ChargePaymentMethodDetailsSamsungPay         `json:"samsung_pay"`
2022
        SEPACreditTransfer *ChargePaymentMethodDetailsSEPACreditTransfer `json:"sepa_credit_transfer"`
2023
        SEPADebit          *ChargePaymentMethodDetailsSEPADebit          `json:"sepa_debit"`
2024
        Sofort             *ChargePaymentMethodDetailsSofort             `json:"sofort"`
2025
        StripeAccount      *ChargePaymentMethodDetailsStripeAccount      `json:"stripe_account"`
2026
        Swish              *ChargePaymentMethodDetailsSwish              `json:"swish"`
2027
        TWINT              *ChargePaymentMethodDetailsTWINT              `json:"twint"`
2028
        // The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
2029
        // An additional hash is included on `payment_method_details` with a name matching this value.
2030
        // It contains information specific to the payment method.
2031
        Type          ChargePaymentMethodDetailsType           `json:"type"`
2032
        USBankAccount *ChargePaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
2033
        WeChat        *ChargePaymentMethodDetailsWeChat        `json:"wechat"`
2034
        WeChatPay     *ChargePaymentMethodDetailsWeChatPay     `json:"wechat_pay"`
2035
        Zip           *ChargePaymentMethodDetailsZip           `json:"zip"`
2036
}
2037

2038
// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
2039
type ChargeRadarOptions struct {
2040
        // A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
2041
        Session string `json:"session"`
2042
}
2043

2044
// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
2045
type ChargeTransferData struct {
2046
        // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
2047
        Amount int64 `json:"amount"`
2048
        // ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
2049
        Destination *Account `json:"destination"`
2050
}
2051

2052
// The `Charge` object represents a single attempt to move money into your Stripe account.
2053
// PaymentIntent confirmation is the most common way to create Charges, but transferring
2054
// money to a different Stripe account through Connect also creates Charges.
2055
// Some legacy payment flows create Charges directly, which is not recommended for new integrations.
2056
type Charge struct {
2057
        APIResource
2058
        // Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
2059
        Amount int64 `json:"amount"`
2060
        // Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
2061
        AmountCaptured int64 `json:"amount_captured"`
2062
        // Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
2063
        AmountRefunded int64 `json:"amount_refunded"`
2064
        // ID of the Connect application that created the charge.
2065
        Application *Application `json:"application"`
2066
        // The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
2067
        ApplicationFee *ApplicationFee `json:"application_fee"`
2068
        // The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
2069
        ApplicationFeeAmount int64 `json:"application_fee_amount"`
2070
        // Authorization code on the charge.
2071
        AuthorizationCode string `json:"authorization_code"`
2072
        // ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
2073
        BalanceTransaction *BalanceTransaction   `json:"balance_transaction"`
2074
        BillingDetails     *ChargeBillingDetails `json:"billing_details"`
2075
        // The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
2076
        CalculatedStatementDescriptor string `json:"calculated_statement_descriptor"`
2077
        // If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
2078
        Captured bool `json:"captured"`
2079
        // Time at which the object was created. Measured in seconds since the Unix epoch.
2080
        Created int64 `json:"created"`
2081
        // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2082
        Currency Currency `json:"currency"`
2083
        // ID of the customer this charge is for if one exists.
2084
        Customer *Customer `json:"customer"`
2085
        // An arbitrary string attached to the object. Often useful for displaying to users.
2086
        Description string `json:"description"`
2087
        // Whether the charge has been disputed.
2088
        Disputed bool `json:"disputed"`
2089
        // ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
2090
        FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`
2091
        // Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).
2092
        FailureCode string `json:"failure_code"`
2093
        // Message to user further explaining reason for charge failure if available.
2094
        FailureMessage string `json:"failure_message"`
2095
        // Information on fraud assessments for the charge.
2096
        FraudDetails *ChargeFraudDetails `json:"fraud_details"`
2097
        // Unique identifier for the object.
2098
        ID string `json:"id"`
2099
        // ID of the invoice this charge is for if one exists.
2100
        Invoice *Invoice      `json:"invoice"`
2101
        Level3  *ChargeLevel3 `json:"level3"`
2102
        // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2103
        Livemode bool `json:"livemode"`
2104
        // 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.
2105
        Metadata map[string]string `json:"metadata"`
2106
        // String representing the object's type. Objects of the same type share the same value.
2107
        Object string `json:"object"`
2108
        // The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
2109
        OnBehalfOf *Account `json:"on_behalf_of"`
2110
        // Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
2111
        Outcome *ChargeOutcome `json:"outcome"`
2112
        // `true` if the charge succeeded, or was successfully authorized for later capture.
2113
        Paid bool `json:"paid"`
2114
        // ID of the PaymentIntent associated with this charge, if one exists.
2115
        PaymentIntent *PaymentIntent `json:"payment_intent"`
2116
        // ID of the payment method used in this charge.
2117
        PaymentMethod string `json:"payment_method"`
2118
        // Details about the payment method at the time of the transaction.
2119
        PaymentMethodDetails *ChargePaymentMethodDetails `json:"payment_method_details"`
2120
        // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
2121
        RadarOptions *ChargeRadarOptions `json:"radar_options"`
2122
        // This is the email address that the receipt for this charge was sent to.
2123
        ReceiptEmail string `json:"receipt_email"`
2124
        // This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.
2125
        ReceiptNumber string `json:"receipt_number"`
2126
        // This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
2127
        ReceiptURL string `json:"receipt_url"`
2128
        // Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
2129
        Refunded bool `json:"refunded"`
2130
        // A list of refunds that have been applied to the charge.
2131
        Refunds *RefundList `json:"refunds"`
2132
        // ID of the review associated with this charge if one exists.
2133
        Review *Review `json:"review"`
2134
        // Shipping information for the charge.
2135
        Shipping *ShippingDetails `json:"shipping"`
2136
        // This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
2137
        Source *PaymentSource `json:"source"`
2138
        // The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
2139
        SourceTransfer *Transfer `json:"source_transfer"`
2140
        // For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
2141
        //
2142
        // For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
2143
        StatementDescriptor string `json:"statement_descriptor"`
2144
        // Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
2145
        StatementDescriptorSuffix string `json:"statement_descriptor_suffix"`
2146
        // The status of the payment is either `succeeded`, `pending`, or `failed`.
2147
        Status ChargeStatus `json:"status"`
2148
        // ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).
2149
        Transfer *Transfer `json:"transfer"`
2150
        // An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
2151
        TransferData *ChargeTransferData `json:"transfer_data"`
2152
        // A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
2153
        TransferGroup string `json:"transfer_group"`
2154
}
2155

2156
// ChargeList is a list of Charges as retrieved from a list endpoint.
2157
type ChargeList struct {
2158
        APIResource
2159
        ListMeta
2160
        Data []*Charge `json:"data"`
2161
}
2162

2163
// ChargeSearchResult is a list of Charge search results as retrieved from a search endpoint.
2164
type ChargeSearchResult struct {
2165
        APIResource
2166
        SearchMeta
2167
        Data []*Charge `json:"data"`
2168
}
2169

2170
// UnmarshalJSON handles deserialization of a Charge.
2171
// This custom unmarshaling is needed because the resulting
2172
// property may be an id or the full struct if it was expanded.
2173
func (c *Charge) UnmarshalJSON(data []byte) error {
4✔
2174
        if id, ok := ParseID(data); ok {
5✔
2175
                c.ID = id
1✔
2176
                return nil
1✔
2177
        }
1✔
2178

2179
        type charge Charge
3✔
2180
        var v charge
3✔
2181
        if err := json.Unmarshal(data, &v); err != nil {
3✔
UNCOV
2182
                return err
×
UNCOV
2183
        }
×
2184

2185
        *c = Charge(v)
3✔
2186
        return nil
3✔
2187
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc