github.com/stripe/stripe-go/v76@v76.25.0/charge.go (about) 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 capture window is extended beyond the standard authorization. 62 type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus string 63 64 // List of values that ChargePaymentMethodDetailsCardExtendedAuthorizationStatus can take 65 const ( 66 ChargePaymentMethodDetailsCardExtendedAuthorizationStatusDisabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "disabled" 67 ChargePaymentMethodDetailsCardExtendedAuthorizationStatusEnabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "enabled" 68 ) 69 70 // Indicates whether or not the incremental authorization feature is supported. 71 type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus string 72 73 // List of values that ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus can take 74 const ( 75 ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusAvailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "available" 76 ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusUnavailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "unavailable" 77 ) 78 79 // Indicates whether or not multiple captures are supported. 80 type ChargePaymentMethodDetailsCardMulticaptureStatus string 81 82 // List of values that ChargePaymentMethodDetailsCardMulticaptureStatus can take 83 const ( 84 ChargePaymentMethodDetailsCardMulticaptureStatusAvailable ChargePaymentMethodDetailsCardMulticaptureStatus = "available" 85 ChargePaymentMethodDetailsCardMulticaptureStatusUnavailable ChargePaymentMethodDetailsCardMulticaptureStatus = "unavailable" 86 ) 87 88 // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 89 type ChargePaymentMethodDetailsCardNetwork string 90 91 // List of values that ChargePaymentMethodDetailsCardNetwork can take 92 const ( 93 ChargePaymentMethodDetailsCardNetworkAmex ChargePaymentMethodDetailsCardNetwork = "amex" 94 ChargePaymentMethodDetailsCardNetworkCartesBancaires ChargePaymentMethodDetailsCardNetwork = "cartes_bancaires" 95 ChargePaymentMethodDetailsCardNetworkDiners ChargePaymentMethodDetailsCardNetwork = "diners" 96 ChargePaymentMethodDetailsCardNetworkDiscover ChargePaymentMethodDetailsCardNetwork = "discover" 97 ChargePaymentMethodDetailsCardNetworkInterac ChargePaymentMethodDetailsCardNetwork = "interac" 98 ChargePaymentMethodDetailsCardNetworkJCB ChargePaymentMethodDetailsCardNetwork = "jcb" 99 ChargePaymentMethodDetailsCardNetworkMastercard ChargePaymentMethodDetailsCardNetwork = "mastercard" 100 ChargePaymentMethodDetailsCardNetworkUnionpay ChargePaymentMethodDetailsCardNetwork = "unionpay" 101 ChargePaymentMethodDetailsCardNetworkVisa ChargePaymentMethodDetailsCardNetwork = "visa" 102 ChargePaymentMethodDetailsCardNetworkUnknown ChargePaymentMethodDetailsCardNetwork = "unknown" 103 ) 104 105 // Indicates whether or not the authorized amount can be over-captured. 106 type ChargePaymentMethodDetailsCardOvercaptureStatus string 107 108 // List of values that ChargePaymentMethodDetailsCardOvercaptureStatus can take 109 const ( 110 ChargePaymentMethodDetailsCardOvercaptureStatusAvailable ChargePaymentMethodDetailsCardOvercaptureStatus = "available" 111 ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable" 112 ) 113 114 // For authenticated transactions: how the customer was authenticated by 115 // the issuing bank. 116 type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string 117 118 // List of values that ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take 119 const ( 120 ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge" 121 ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless" 122 ) 123 124 // The Electronic Commerce Indicator (ECI). A protocol-level field 125 // indicating what degree of authentication was performed. 126 type ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator string 127 128 // List of values that ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator can take 129 const ( 130 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator01 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "01" 131 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator02 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "02" 132 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator05 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "05" 133 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator06 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "06" 134 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator07 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "07" 135 ) 136 137 // The exemption requested via 3DS and accepted by the issuer at authentication time. 138 type ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator string 139 140 // List of values that ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator can take 141 const ( 142 ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorLowRisk ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "low_risk" 143 ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorNone ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "none" 144 ) 145 146 // Indicates the outcome of 3D Secure authentication. 147 type ChargePaymentMethodDetailsCardThreeDSecureResult string 148 149 // List of values that ChargePaymentMethodDetailsCardThreeDSecureResult can take 150 const ( 151 ChargePaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged ChargePaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged" 152 ChargePaymentMethodDetailsCardThreeDSecureResultAuthenticated ChargePaymentMethodDetailsCardThreeDSecureResult = "authenticated" 153 ChargePaymentMethodDetailsCardThreeDSecureResultExempted ChargePaymentMethodDetailsCardThreeDSecureResult = "exempted" 154 ChargePaymentMethodDetailsCardThreeDSecureResultFailed ChargePaymentMethodDetailsCardThreeDSecureResult = "failed" 155 ChargePaymentMethodDetailsCardThreeDSecureResultNotSupported ChargePaymentMethodDetailsCardThreeDSecureResult = "not_supported" 156 ChargePaymentMethodDetailsCardThreeDSecureResultProcessingError ChargePaymentMethodDetailsCardThreeDSecureResult = "processing_error" 157 ) 158 159 // Additional information about why 3D Secure succeeded or failed based 160 // on the `result`. 161 type ChargePaymentMethodDetailsCardThreeDSecureResultReason string 162 163 // List of values that ChargePaymentMethodDetailsCardThreeDSecureResultReason can take 164 const ( 165 ChargePaymentMethodDetailsCardThreeDSecureResultReasonAbandoned ChargePaymentMethodDetailsCardThreeDSecureResultReason = "abandoned" 166 ChargePaymentMethodDetailsCardThreeDSecureResultReasonBypassed ChargePaymentMethodDetailsCardThreeDSecureResultReason = "bypassed" 167 ChargePaymentMethodDetailsCardThreeDSecureResultReasonCanceled ChargePaymentMethodDetailsCardThreeDSecureResultReason = "canceled" 168 ChargePaymentMethodDetailsCardThreeDSecureResultReasonCardNotEnrolled ChargePaymentMethodDetailsCardThreeDSecureResultReason = "card_not_enrolled" 169 ChargePaymentMethodDetailsCardThreeDSecureResultReasonNetworkNotSupported ChargePaymentMethodDetailsCardThreeDSecureResultReason = "network_not_supported" 170 ChargePaymentMethodDetailsCardThreeDSecureResultReasonProtocolError ChargePaymentMethodDetailsCardThreeDSecureResultReason = "protocol_error" 171 ChargePaymentMethodDetailsCardThreeDSecureResultReasonRejected ChargePaymentMethodDetailsCardThreeDSecureResultReason = "rejected" 172 ) 173 174 // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 175 type ChargePaymentMethodDetailsCardPresentNetwork string 176 177 // List of values that ChargePaymentMethodDetailsCardPresentNetwork can take 178 const ( 179 ChargePaymentMethodDetailsCardPresentNetworkAmex ChargePaymentMethodDetailsCardPresentNetwork = "amex" 180 ChargePaymentMethodDetailsCardPresentNetworkCartesBancaires ChargePaymentMethodDetailsCardPresentNetwork = "cartes_bancaires" 181 ChargePaymentMethodDetailsCardPresentNetworkDiners ChargePaymentMethodDetailsCardPresentNetwork = "diners" 182 ChargePaymentMethodDetailsCardPresentNetworkDiscover ChargePaymentMethodDetailsCardPresentNetwork = "discover" 183 ChargePaymentMethodDetailsCardPresentNetworkInterac ChargePaymentMethodDetailsCardPresentNetwork = "interac" 184 ChargePaymentMethodDetailsCardPresentNetworkJCB ChargePaymentMethodDetailsCardPresentNetwork = "jcb" 185 ChargePaymentMethodDetailsCardPresentNetworkMastercard ChargePaymentMethodDetailsCardPresentNetwork = "mastercard" 186 ChargePaymentMethodDetailsCardPresentNetworkUnionpay ChargePaymentMethodDetailsCardPresentNetwork = "unionpay" 187 ChargePaymentMethodDetailsCardPresentNetworkVisa ChargePaymentMethodDetailsCardPresentNetwork = "visa" 188 ChargePaymentMethodDetailsCardPresentNetworkUnknown ChargePaymentMethodDetailsCardPresentNetwork = "unknown" 189 ) 190 191 // The type of account being debited or credited 192 type ChargePaymentMethodDetailsCardPresentReceiptAccountType string 193 194 // List of values that ChargePaymentMethodDetailsCardPresentReceiptAccountType can take 195 const ( 196 ChargePaymentMethodDetailsCardPresentReceiptAccountTypeChecking ChargePaymentMethodDetailsCardPresentReceiptAccountType = "checking" 197 ChargePaymentMethodDetailsCardPresentReceiptAccountTypeCredit ChargePaymentMethodDetailsCardPresentReceiptAccountType = "credit" 198 ChargePaymentMethodDetailsCardPresentReceiptAccountTypePrepaid ChargePaymentMethodDetailsCardPresentReceiptAccountType = "prepaid" 199 ChargePaymentMethodDetailsCardPresentReceiptAccountTypeUnknown ChargePaymentMethodDetailsCardPresentReceiptAccountType = "unknown" 200 ) 201 202 // The Klarna payment method used for this transaction. 203 // Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` 204 type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory string 205 206 // List of values that ChargePaymentMethodDetailsKlarnaPaymentMethodCategory can take 207 const ( 208 ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayLater ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_later" 209 ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayNow ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_now" 210 ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayWithFinancing ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_with_financing" 211 ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayInInstallments ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_in_installments" 212 ) 213 214 // The name of the convenience store chain where the payment was completed. 215 type ChargePaymentMethodDetailsKonbiniStoreChain string 216 217 // List of values that ChargePaymentMethodDetailsKonbiniStoreChain can take 218 const ( 219 ChargePaymentMethodDetailsKonbiniStoreChainFamilyMart ChargePaymentMethodDetailsKonbiniStoreChain = "familymart" 220 ChargePaymentMethodDetailsKonbiniStoreChainLawson ChargePaymentMethodDetailsKonbiniStoreChain = "lawson" 221 ChargePaymentMethodDetailsKonbiniStoreChainMinistop ChargePaymentMethodDetailsKonbiniStoreChain = "ministop" 222 ChargePaymentMethodDetailsKonbiniStoreChainSeicomart ChargePaymentMethodDetailsKonbiniStoreChain = "seicomart" 223 ) 224 225 // An array of conditions that are covered for the transaction, if applicable. 226 type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory string 227 228 // List of values that ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory can take 229 const ( 230 ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryFraudulent ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "fraudulent" 231 ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryProductNotReceived ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "product_not_received" 232 ) 233 234 // Indicates whether the transaction is eligible for PayPal's seller protection. 235 type ChargePaymentMethodDetailsPaypalSellerProtectionStatus string 236 237 // List of values that ChargePaymentMethodDetailsPaypalSellerProtectionStatus can take 238 const ( 239 ChargePaymentMethodDetailsPaypalSellerProtectionStatusEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "eligible" 240 ChargePaymentMethodDetailsPaypalSellerProtectionStatusNotEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "not_eligible" 241 ChargePaymentMethodDetailsPaypalSellerProtectionStatusPartiallyEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "partially_eligible" 242 ) 243 244 // 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`. 245 // An additional hash is included on `payment_method_details` with a name matching this value. 246 // It contains information specific to the payment method. 247 type ChargePaymentMethodDetailsType string 248 249 // List of values that ChargePaymentMethodDetailsType can take 250 const ( 251 ChargePaymentMethodDetailsTypeACHCreditTransfer ChargePaymentMethodDetailsType = "ach_credit_transfer" 252 ChargePaymentMethodDetailsTypeACHDebit ChargePaymentMethodDetailsType = "ach_debit" 253 ChargePaymentMethodDetailsTypeACSSDebit ChargePaymentMethodDetailsType = "acss_debit" 254 ChargePaymentMethodDetailsTypeAlipay ChargePaymentMethodDetailsType = "alipay" 255 ChargePaymentMethodDetailsTypeAUBECSDebit ChargePaymentMethodDetailsType = "au_becs_debit" 256 ChargePaymentMethodDetailsTypeBACSDebit ChargePaymentMethodDetailsType = "bacs_debit" 257 ChargePaymentMethodDetailsTypeBancontact ChargePaymentMethodDetailsType = "bancontact" 258 ChargePaymentMethodDetailsTypeCard ChargePaymentMethodDetailsType = "card" 259 ChargePaymentMethodDetailsTypeCardPresent ChargePaymentMethodDetailsType = "card_present" 260 ChargePaymentMethodDetailsTypeEPS ChargePaymentMethodDetailsType = "eps" 261 ChargePaymentMethodDetailsTypeFPX ChargePaymentMethodDetailsType = "fpx" 262 ChargePaymentMethodDetailsTypeGiropay ChargePaymentMethodDetailsType = "giropay" 263 ChargePaymentMethodDetailsTypeGrabpay ChargePaymentMethodDetailsType = "grabpay" 264 ChargePaymentMethodDetailsTypeIDEAL ChargePaymentMethodDetailsType = "ideal" 265 ChargePaymentMethodDetailsTypeInteracPresent ChargePaymentMethodDetailsType = "interac_present" 266 ChargePaymentMethodDetailsTypeKlarna ChargePaymentMethodDetailsType = "klarna" 267 ChargePaymentMethodDetailsTypeMultibanco ChargePaymentMethodDetailsType = "multibanco" 268 ChargePaymentMethodDetailsTypeP24 ChargePaymentMethodDetailsType = "p24" 269 ChargePaymentMethodDetailsTypeSEPADebit ChargePaymentMethodDetailsType = "sepa_debit" 270 ChargePaymentMethodDetailsTypeSofort ChargePaymentMethodDetailsType = "sofort" 271 ChargePaymentMethodDetailsTypeSwish ChargePaymentMethodDetailsType = "swish" 272 ChargePaymentMethodDetailsTypeStripeAccount ChargePaymentMethodDetailsType = "stripe_account" 273 ChargePaymentMethodDetailsTypeWeChat ChargePaymentMethodDetailsType = "wechat" 274 ) 275 276 // Account holder type: individual or company. 277 type ChargePaymentMethodDetailsUSBankAccountAccountHolderType string 278 279 // List of values that ChargePaymentMethodDetailsUSBankAccountAccountHolderType can take 280 const ( 281 ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeCompany ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "company" 282 ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "individual" 283 ) 284 285 // Account type: checkings or savings. Defaults to checking if omitted. 286 type ChargePaymentMethodDetailsUSBankAccountAccountType string 287 288 // List of values that ChargePaymentMethodDetailsUSBankAccountAccountType can take 289 const ( 290 ChargePaymentMethodDetailsUSBankAccountAccountTypeChecking ChargePaymentMethodDetailsUSBankAccountAccountType = "checking" 291 ChargePaymentMethodDetailsUSBankAccountAccountTypeSavings ChargePaymentMethodDetailsUSBankAccountAccountType = "savings" 292 ) 293 294 // The status of the payment is either `succeeded`, `pending`, or `failed`. 295 type ChargeStatus string 296 297 // List of values that ChargeStatus can take 298 const ( 299 ChargeStatusFailed ChargeStatus = "failed" 300 ChargeStatusPending ChargeStatus = "pending" 301 ChargeStatusSucceeded ChargeStatus = "succeeded" 302 ) 303 304 // Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. 305 type ChargeListParams struct { 306 ListParams `form:"*"` 307 // Only return charges that were created during the given date interval. 308 Created *int64 `form:"created"` 309 // Only return charges that were created during the given date interval. 310 CreatedRange *RangeQueryParams `form:"created"` 311 // Only return charges for the customer specified by this customer ID. 312 Customer *string `form:"customer"` 313 // Specifies which fields in the response should be expanded. 314 Expand []*string `form:"expand"` 315 // Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. 316 PaymentIntent *string `form:"payment_intent"` 317 // Only return charges for this transfer group. 318 TransferGroup *string `form:"transfer_group"` 319 } 320 321 // AddExpand appends a new field to expand. 322 func (p *ChargeListParams) AddExpand(f string) { 323 p.Expand = append(p.Expand, &f) 324 } 325 326 type ChargeDestinationParams struct { 327 // ID of an existing, connected Stripe account. 328 Account *string `form:"account"` 329 // 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. 330 Amount *int64 `form:"amount"` 331 } 332 333 // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. 334 type ChargeRadarOptionsParams struct { 335 // 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. 336 Session *string `form:"session"` 337 } 338 339 // 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. 340 type ChargeTransferDataParams struct { 341 // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. 342 Amount *int64 `form:"amount"` 343 // This parameter can only be used on Charge creation. 344 // ID of an existing, connected Stripe account. 345 Destination *string `form:"destination"` 346 } 347 type ChargeLevel3LineItemParams struct { 348 DiscountAmount *int64 `form:"discount_amount"` 349 ProductCode *string `form:"product_code"` 350 ProductDescription *string `form:"product_description"` 351 Quantity *int64 `form:"quantity"` 352 TaxAmount *int64 `form:"tax_amount"` 353 UnitCost *int64 `form:"unit_cost"` 354 } 355 type ChargeLevel3Params struct { 356 CustomerReference *string `form:"customer_reference"` 357 LineItems []*ChargeLevel3LineItemParams `form:"line_items"` 358 MerchantReference *string `form:"merchant_reference"` 359 ShippingAddressZip *string `form:"shipping_address_zip"` 360 ShippingAmount *int64 `form:"shipping_amount"` 361 ShippingFromZip *string `form:"shipping_from_zip"` 362 } 363 364 // This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) 365 // to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge 366 // object used to request payment. 367 type ChargeParams struct { 368 Params `form:"*"` 369 // 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). 370 Amount *int64 `form:"amount"` 371 ApplicationFee *int64 `form:"application_fee"` 372 // 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#collecting-fees). 373 ApplicationFeeAmount *int64 `form:"application_fee_amount"` 374 // 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. 375 Capture *bool `form:"capture"` 376 // 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). 377 Currency *string `form:"currency"` 378 // 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. 379 Customer *string `form:"customer"` 380 // 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. 381 Description *string `form:"description"` 382 Destination *ChargeDestinationParams `form:"destination"` 383 ExchangeRate *float64 `form:"exchange_rate"` 384 // Specifies which fields in the response should be expanded. 385 Expand []*string `form:"expand"` 386 // 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. 387 FraudDetails *ChargeFraudDetailsParams `form:"fraud_details"` 388 Level3 *ChargeLevel3Params `form:"level3"` 389 // 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`. 390 Metadata map[string]string `form:"metadata"` 391 // 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#on-behalf-of). 392 OnBehalfOf *string `form:"on_behalf_of"` 393 // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. 394 RadarOptions *ChargeRadarOptionsParams `form:"radar_options"` 395 // 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). 396 ReceiptEmail *string `form:"receipt_email"` 397 // Shipping information for the charge. Helps prevent fraud on charges for physical goods. 398 Shipping *ShippingDetailsParams `form:"shipping"` 399 Source *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*" 400 // For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. 401 StatementDescriptor *string `form:"statement_descriptor"` 402 // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. 403 StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` 404 // 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. 405 TransferData *ChargeTransferDataParams `form:"transfer_data"` 406 // 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. 407 TransferGroup *string `form:"transfer_group"` 408 } 409 410 // SetSource adds valid sources to a ChargeParams object, 411 // returning an error for unsupported sources. 412 func (p *ChargeParams) SetSource(sp interface{}) error { 413 source, err := SourceParamsFor(sp) 414 p.Source = source 415 return err 416 } 417 418 // AddExpand appends a new field to expand. 419 func (p *ChargeParams) AddExpand(f string) { 420 p.Expand = append(p.Expand, &f) 421 } 422 423 // AddMetadata adds a new key-value pair to the Metadata. 424 func (p *ChargeParams) AddMetadata(key string, value string) { 425 if p.Metadata == nil { 426 p.Metadata = make(map[string]string) 427 } 428 429 p.Metadata[key] = value 430 } 431 432 // 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. 433 type ChargeFraudDetailsParams struct { 434 // Either `safe` or `fraudulent`. 435 UserReport *string `form:"user_report"` 436 } 437 438 // Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). 439 // Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating 440 // conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up 441 // to an hour behind during outages. Search functionality is not available to merchants in India. 442 type ChargeSearchParams struct { 443 SearchParams `form:"*"` 444 // Specifies which fields in the response should be expanded. 445 Expand []*string `form:"expand"` 446 // 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. 447 Page *string `form:"page"` 448 } 449 450 // AddExpand appends a new field to expand. 451 func (p *ChargeSearchParams) AddExpand(f string) { 452 p.Expand = append(p.Expand, &f) 453 } 454 455 // 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. 456 type ChargeCaptureTransferDataParams struct { 457 // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. 458 Amount *int64 `form:"amount"` 459 } 460 461 // Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. 462 // 463 // 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. 464 // 465 // Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture). 466 type ChargeCaptureParams struct { 467 Params `form:"*"` 468 // The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. 469 Amount *int64 `form:"amount"` 470 // An application fee to add on to this charge. 471 ApplicationFee *int64 `form:"application_fee"` 472 // An application fee amount to add on to this charge, which must be less than or equal to the original amount. 473 ApplicationFeeAmount *int64 `form:"application_fee_amount"` 474 ExchangeRate *float64 `form:"exchange_rate"` 475 // Specifies which fields in the response should be expanded. 476 Expand []*string `form:"expand"` 477 // 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. 478 ReceiptEmail *string `form:"receipt_email"` 479 // For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. 480 StatementDescriptor *string `form:"statement_descriptor"` 481 // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. 482 StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"` 483 // 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. 484 TransferData *ChargeCaptureTransferDataParams `form:"transfer_data"` 485 // 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. 486 TransferGroup *string `form:"transfer_group"` 487 } 488 489 // AddExpand appends a new field to expand. 490 func (p *ChargeCaptureParams) AddExpand(f string) { 491 p.Expand = append(p.Expand, &f) 492 } 493 494 type ChargeBillingDetails struct { 495 // Billing address. 496 Address *Address `json:"address"` 497 // Email address. 498 Email string `json:"email"` 499 // Full name. 500 Name string `json:"name"` 501 // Billing phone number (including extension). 502 Phone string `json:"phone"` 503 } 504 505 // Information on fraud assessments for the charge. 506 type ChargeFraudDetails struct { 507 // Assessments from Stripe. If set, the value is `fraudulent`. 508 StripeReport ChargeFraudStripeReport `json:"stripe_report"` 509 // Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. 510 UserReport ChargeFraudUserReport `json:"user_report"` 511 } 512 type ChargeLevel3LineItem struct { 513 DiscountAmount int64 `json:"discount_amount"` 514 ProductCode string `json:"product_code"` 515 ProductDescription string `json:"product_description"` 516 Quantity int64 `json:"quantity"` 517 TaxAmount int64 `json:"tax_amount"` 518 UnitCost int64 `json:"unit_cost"` 519 } 520 type ChargeLevel3 struct { 521 CustomerReference string `json:"customer_reference"` 522 LineItems []*ChargeLevel3LineItem `json:"line_items"` 523 MerchantReference string `json:"merchant_reference"` 524 ShippingAddressZip string `json:"shipping_address_zip"` 525 ShippingAmount int64 `json:"shipping_amount"` 526 ShippingFromZip string `json:"shipping_from_zip"` 527 } 528 529 // The ID of the Radar rule that matched the payment, if applicable. 530 type ChargeOutcomeRule struct { 531 // The action taken on the payment. 532 Action string `json:"action"` 533 // Unique identifier for the object. 534 ID string `json:"id"` 535 // The predicate to evaluate the payment against. 536 Predicate string `json:"predicate"` 537 } 538 539 // Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. 540 type ChargeOutcome struct { 541 // 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. 542 NetworkStatus string `json:"network_status"` 543 // 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. 544 Reason string `json:"reason"` 545 // 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. 546 RiskLevel string `json:"risk_level"` 547 // 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. 548 RiskScore int64 `json:"risk_score"` 549 // The ID of the Radar rule that matched the payment, if applicable. 550 Rule *ChargeOutcomeRule `json:"rule"` 551 // A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. 552 SellerMessage string `json:"seller_message"` 553 // 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. 554 Type string `json:"type"` 555 } 556 557 // UnmarshalJSON handles deserialization of a ChargeOutcomeRule. 558 // This custom unmarshaling is needed because the resulting 559 // property may be an id or the full struct if it was expanded. 560 func (c *ChargeOutcomeRule) UnmarshalJSON(data []byte) error { 561 if id, ok := ParseID(data); ok { 562 c.ID = id 563 return nil 564 } 565 type chargeOutcomeRule ChargeOutcomeRule 566 var v chargeOutcomeRule 567 if err := json.Unmarshal(data, &v); err != nil { 568 return err 569 } 570 *c = ChargeOutcomeRule(v) 571 return nil 572 } 573 574 type ChargePaymentMethodDetailsACHCreditTransfer struct { 575 // Account number to transfer funds to. 576 AccountNumber string `json:"account_number"` 577 // Name of the bank associated with the routing number. 578 BankName string `json:"bank_name"` 579 // Routing transit number for the bank account to transfer funds to. 580 RoutingNumber string `json:"routing_number"` 581 // SWIFT code of the bank associated with the routing number. 582 SwiftCode string `json:"swift_code"` 583 } 584 type ChargePaymentMethodDetailsACHDebit struct { 585 // Type of entity that holds the account. This can be either `individual` or `company`. 586 AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"` 587 // Name of the bank associated with the bank account. 588 BankName string `json:"bank_name"` 589 // Two-letter ISO code representing the country the bank account is located in. 590 Country string `json:"country"` 591 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 592 Fingerprint string `json:"fingerprint"` 593 // Last four digits of the bank account number. 594 Last4 string `json:"last4"` 595 // Routing transit number of the bank account. 596 RoutingNumber string `json:"routing_number"` 597 } 598 type ChargePaymentMethodDetailsACSSDebit struct { 599 // Name of the bank associated with the bank account. 600 BankName string `json:"bank_name"` 601 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 602 Fingerprint string `json:"fingerprint"` 603 // Institution number of the bank account 604 InstitutionNumber string `json:"institution_number"` 605 // Last four digits of the bank account number. 606 Last4 string `json:"last4"` 607 // ID of the mandate used to make this payment. 608 Mandate string `json:"mandate"` 609 // Transit number of the bank account. 610 TransitNumber string `json:"transit_number"` 611 } 612 type ChargePaymentMethodDetailsAffirm struct{} 613 type ChargePaymentMethodDetailsAfterpayClearpay struct { 614 // The Afterpay order ID associated with this payment intent. 615 OrderID string `json:"order_id"` 616 // Order identifier shown to the merchant in Afterpay's online portal. 617 Reference string `json:"reference"` 618 } 619 type ChargePaymentMethodDetailsAlipay struct { 620 // Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. 621 BuyerID string `json:"buyer_id"` 622 // Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. 623 Fingerprint string `json:"fingerprint"` 624 // Transaction ID of this particular Alipay transaction. 625 TransactionID string `json:"transaction_id"` 626 } 627 type ChargePaymentMethodDetailsAUBECSDebit struct { 628 // Bank-State-Branch number of the bank account. 629 BSBNumber string `json:"bsb_number"` 630 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 631 Fingerprint string `json:"fingerprint"` 632 // Last four digits of the bank account number. 633 Last4 string `json:"last4"` 634 // ID of the mandate used to make this payment. 635 Mandate string `json:"mandate"` 636 } 637 type ChargePaymentMethodDetailsBACSDebit struct { 638 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 639 Fingerprint string `json:"fingerprint"` 640 // Last four digits of the bank account number. 641 Last4 string `json:"last4"` 642 // ID of the mandate used to make this payment. 643 Mandate string `json:"mandate"` 644 // Sort code of the bank account. (e.g., `10-20-30`) 645 SortCode string `json:"sort_code"` 646 } 647 type ChargePaymentMethodDetailsBancontact struct { 648 // Bank code of bank associated with the bank account. 649 BankCode string `json:"bank_code"` 650 // Name of the bank associated with the bank account. 651 BankName string `json:"bank_name"` 652 // Bank Identifier Code of the bank associated with the bank account. 653 BIC string `json:"bic"` 654 // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. 655 GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` 656 // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. 657 GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` 658 // Last four characters of the IBAN. 659 IBANLast4 string `json:"iban_last4"` 660 // Preferred language of the Bancontact authorization page that the customer is redirected to. 661 // Can be one of `en`, `de`, `fr`, or `nl` 662 PreferredLanguage string `json:"preferred_language"` 663 // Owner's verified full name. Values are verified or provided by Bancontact directly 664 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 665 VerifiedName string `json:"verified_name"` 666 } 667 type ChargePaymentMethodDetailsBLIK struct{} 668 type ChargePaymentMethodDetailsBoleto struct { 669 // The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) 670 TaxID string `json:"tax_id"` 671 } 672 673 // Check results by Card networks on Card address and CVC at time of payment. 674 type ChargePaymentMethodDetailsCardChecks struct { 675 // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. 676 AddressLine1Check ChargePaymentMethodDetailsCardChecksAddressLine1Check `json:"address_line1_check"` 677 // If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. 678 AddressPostalCodeCheck ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck `json:"address_postal_code_check"` 679 // If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. 680 CVCCheck ChargePaymentMethodDetailsCardChecksCVCCheck `json:"cvc_check"` 681 } 682 type ChargePaymentMethodDetailsCardExtendedAuthorization struct { 683 // Indicates whether or not the capture window is extended beyond the standard authorization. 684 Status ChargePaymentMethodDetailsCardExtendedAuthorizationStatus `json:"status"` 685 } 686 type ChargePaymentMethodDetailsCardIncrementalAuthorization struct { 687 // Indicates whether or not the incremental authorization feature is supported. 688 Status ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus `json:"status"` 689 } 690 691 // Installment details for this payment (Mexico only). 692 // 693 // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). 694 type ChargePaymentMethodDetailsCardInstallments struct { 695 // Installment plan selected for the payment. 696 Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"` 697 } 698 type ChargePaymentMethodDetailsCardMulticapture struct { 699 // Indicates whether or not multiple captures are supported. 700 Status ChargePaymentMethodDetailsCardMulticaptureStatus `json:"status"` 701 } 702 703 // If this card has network token credentials, this contains the details of the network token credentials. 704 type ChargePaymentMethodDetailsCardNetworkToken struct { 705 // Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. 706 Used bool `json:"used"` 707 } 708 type ChargePaymentMethodDetailsCardOvercapture struct { 709 // The maximum amount that can be captured. 710 MaximumAmountCapturable int64 `json:"maximum_amount_capturable"` 711 // Indicates whether or not the authorized amount can be over-captured. 712 Status ChargePaymentMethodDetailsCardOvercaptureStatus `json:"status"` 713 } 714 715 // Populated if this transaction used 3D Secure authentication. 716 type ChargePaymentMethodDetailsCardThreeDSecure struct { 717 // For authenticated transactions: how the customer was authenticated by 718 // the issuing bank. 719 AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"` 720 // The Electronic Commerce Indicator (ECI). A protocol-level field 721 // indicating what degree of authentication was performed. 722 ElectronicCommerceIndicator ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator `json:"electronic_commerce_indicator"` 723 // The exemption requested via 3DS and accepted by the issuer at authentication time. 724 ExemptionIndicator ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator `json:"exemption_indicator"` 725 // Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on 726 // the outcome of Stripe's internal risk assessment. 727 ExemptionIndicatorApplied bool `json:"exemption_indicator_applied"` 728 // Indicates the outcome of 3D Secure authentication. 729 Result ChargePaymentMethodDetailsCardThreeDSecureResult `json:"result"` 730 // Additional information about why 3D Secure succeeded or failed based 731 // on the `result`. 732 ResultReason ChargePaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"` 733 // The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID 734 // (dsTransId) for this payment. 735 TransactionID string `json:"transaction_id"` 736 // The version of 3D Secure that was used. 737 Version string `json:"version"` 738 } 739 type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct{} 740 type ChargePaymentMethodDetailsCardWalletApplePay struct{} 741 type ChargePaymentMethodDetailsCardWalletGooglePay struct{} 742 type ChargePaymentMethodDetailsCardWalletLink struct{} 743 type ChargePaymentMethodDetailsCardWalletMasterpass struct { 744 // 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. 745 BillingAddress *Address `json:"billing_address"` 746 // 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. 747 Email string `json:"email"` 748 // 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. 749 Name string `json:"name"` 750 // 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. 751 ShippingAddress *Address `json:"shipping_address"` 752 } 753 type ChargePaymentMethodDetailsCardWalletSamsungPay struct{} 754 type ChargePaymentMethodDetailsCardWalletVisaCheckout struct { 755 // 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. 756 BillingAddress *Address `json:"billing_address"` 757 // 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. 758 Email string `json:"email"` 759 // 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. 760 Name string `json:"name"` 761 // 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. 762 ShippingAddress *Address `json:"shipping_address"` 763 } 764 765 // If this Card is part of a card wallet, this contains the details of the card wallet. 766 type ChargePaymentMethodDetailsCardWallet struct { 767 AmexExpressCheckout *ChargePaymentMethodDetailsCardWalletAmexExpressCheckout `json:"amex_express_checkout"` 768 ApplePay *ChargePaymentMethodDetailsCardWalletApplePay `json:"apple_pay"` 769 // (For tokenized numbers only.) The last four digits of the device account number. 770 DynamicLast4 string `json:"dynamic_last4"` 771 GooglePay *ChargePaymentMethodDetailsCardWalletGooglePay `json:"google_pay"` 772 Link *ChargePaymentMethodDetailsCardWalletLink `json:"link"` 773 Masterpass *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"` 774 SamsungPay *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"` 775 // 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. 776 Type PaymentMethodCardWalletType `json:"type"` 777 VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"` 778 } 779 type ChargePaymentMethodDetailsCard struct { 780 // The authorized amount. 781 AmountAuthorized int64 `json:"amount_authorized"` 782 // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 783 Brand PaymentMethodCardBrand `json:"brand"` 784 // When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. 785 CaptureBefore int64 `json:"capture_before"` 786 // Check results by Card networks on Card address and CVC at time of payment. 787 Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"` 788 // 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. 789 Country string `json:"country"` 790 // Two-digit number representing the card's expiration month. 791 ExpMonth int64 `json:"exp_month"` 792 // Four-digit number representing the card's expiration year. 793 ExpYear int64 `json:"exp_year"` 794 ExtendedAuthorization *ChargePaymentMethodDetailsCardExtendedAuthorization `json:"extended_authorization"` 795 // 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. 796 // 797 // *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.* 798 Fingerprint string `json:"fingerprint"` 799 // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. 800 Funding CardFunding `json:"funding"` 801 IncrementalAuthorization *ChargePaymentMethodDetailsCardIncrementalAuthorization `json:"incremental_authorization"` 802 // Installment details for this payment (Mexico only). 803 // 804 // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). 805 Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"` 806 // The last four digits of the card. 807 Last4 string `json:"last4"` 808 // ID of the mandate used to make this payment or created by it. 809 Mandate string `json:"mandate"` 810 // True if this payment was marked as MOTO and out of scope for SCA. 811 MOTO bool `json:"moto"` 812 Multicapture *ChargePaymentMethodDetailsCardMulticapture `json:"multicapture"` 813 // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 814 Network ChargePaymentMethodDetailsCardNetwork `json:"network"` 815 // If this card has network token credentials, this contains the details of the network token credentials. 816 NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` 817 Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` 818 // Populated if this transaction used 3D Secure authentication. 819 ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` 820 // If this Card is part of a card wallet, this contains the details of the card wallet. 821 Wallet *ChargePaymentMethodDetailsCardWallet `json:"wallet"` 822 // Please note that the fields below are for internal use only and are not returned 823 // as part of standard API requests. 824 // 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.) 825 Description string `json:"description"` 826 // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) 827 IIN string `json:"iin"` 828 // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) 829 Issuer string `json:"issuer"` 830 } 831 832 // Details about payments collected offline. 833 type ChargePaymentMethodDetailsCardPresentOffline struct { 834 // Time at which the payment was collected while offline 835 StoredAt int64 `json:"stored_at"` 836 } 837 838 // A collection of fields required to be displayed on receipts. Only required for EMV transactions. 839 type ChargePaymentMethodDetailsCardPresentReceipt struct { 840 // The type of account being debited or credited 841 AccountType ChargePaymentMethodDetailsCardPresentReceiptAccountType `json:"account_type"` 842 // EMV tag 9F26, cryptogram generated by the integrated circuit chip. 843 ApplicationCryptogram string `json:"application_cryptogram"` 844 // Mnenomic of the Application Identifier. 845 ApplicationPreferredName string `json:"application_preferred_name"` 846 // Identifier for this transaction. 847 AuthorizationCode string `json:"authorization_code"` 848 // EMV tag 8A. A code returned by the card issuer. 849 AuthorizationResponseCode string `json:"authorization_response_code"` 850 // 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`. 851 CardholderVerificationMethod string `json:"cardholder_verification_method"` 852 // EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. 853 DedicatedFileName string `json:"dedicated_file_name"` 854 // The outcome of a series of EMV functions performed by the card reader. 855 TerminalVerificationResults string `json:"terminal_verification_results"` 856 // An indication of various EMV functions performed during the transaction. 857 TransactionStatusInformation string `json:"transaction_status_information"` 858 } 859 type ChargePaymentMethodDetailsCardPresent struct { 860 // The authorized amount 861 AmountAuthorized int64 `json:"amount_authorized"` 862 // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 863 Brand PaymentMethodCardBrand `json:"brand"` 864 // When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. 865 CaptureBefore int64 `json:"capture_before"` 866 // 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. 867 CardholderName string `json:"cardholder_name"` 868 // 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. 869 Country string `json:"country"` 870 // Authorization response cryptogram. 871 EmvAuthData string `json:"emv_auth_data"` 872 // Two-digit number representing the card's expiration month. 873 ExpMonth int64 `json:"exp_month"` 874 // Four-digit number representing the card's expiration year. 875 ExpYear int64 `json:"exp_year"` 876 // 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. 877 // 878 // *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.* 879 Fingerprint string `json:"fingerprint"` 880 // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. 881 Funding CardFunding `json:"funding"` 882 // 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. 883 GeneratedCard string `json:"generated_card"` 884 // 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). 885 IncrementalAuthorizationSupported bool `json:"incremental_authorization_supported"` 886 // The last four digits of the card. 887 Last4 string `json:"last4"` 888 // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 889 Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"` 890 // Details about payments collected offline. 891 Offline *ChargePaymentMethodDetailsCardPresentOffline `json:"offline"` 892 // Defines whether the authorized amount can be over-captured or not 893 OvercaptureSupported bool `json:"overcapture_supported"` 894 // How card details were read in this transaction. 895 ReadMethod string `json:"read_method"` 896 // A collection of fields required to be displayed on receipts. Only required for EMV transactions. 897 Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"` 898 // Please note that the fields below are for internal use only and are not returned 899 // as part of standard API requests. 900 // 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.) 901 Description string `json:"description"` 902 // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) 903 IIN string `json:"iin"` 904 // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) 905 Issuer string `json:"issuer"` 906 } 907 type ChargePaymentMethodDetailsCashApp struct { 908 // A unique and immutable identifier assigned by Cash App to every buyer. 909 BuyerID string `json:"buyer_id"` 910 // A public identifier for buyers using Cash App. 911 Cashtag string `json:"cashtag"` 912 } 913 type ChargePaymentMethodDetailsCustomerBalance struct{} 914 type ChargePaymentMethodDetailsEPS struct { 915 // 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`. 916 Bank string `json:"bank"` 917 // Owner's verified full name. Values are verified or provided by EPS directly 918 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 919 // EPS rarely provides this information so the attribute is usually empty. 920 VerifiedName string `json:"verified_name"` 921 } 922 type ChargePaymentMethodDetailsFPX struct { 923 // Account holder type, if provided. Can be one of `individual` or `company`. 924 AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"` 925 // 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`. 926 Bank string `json:"bank"` 927 // Unique transaction id generated by FPX for every request from the merchant 928 TransactionID string `json:"transaction_id"` 929 } 930 type ChargePaymentMethodDetailsGiropay struct { 931 // Bank code of bank associated with the bank account. 932 BankCode string `json:"bank_code"` 933 // Name of the bank associated with the bank account. 934 BankName string `json:"bank_name"` 935 // Bank Identifier Code of the bank associated with the bank account. 936 BIC string `json:"bic"` 937 // Owner's verified full name. Values are verified or provided by Giropay directly 938 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 939 // Giropay rarely provides this information so the attribute is usually empty. 940 VerifiedName string `json:"verified_name"` 941 } 942 type ChargePaymentMethodDetailsGrabpay struct { 943 // Unique transaction id generated by GrabPay 944 TransactionID string `json:"transaction_id"` 945 } 946 type ChargePaymentMethodDetailsIDEAL struct { 947 // 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`. 948 Bank string `json:"bank"` 949 // The Bank Identifier Code of the customer's bank. 950 BIC string `json:"bic"` 951 // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. 952 GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` 953 // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. 954 GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` 955 // Last four characters of the IBAN. 956 IBANLast4 string `json:"iban_last4"` 957 // Owner's verified full name. Values are verified or provided by iDEAL directly 958 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 959 VerifiedName string `json:"verified_name"` 960 } 961 962 // A collection of fields required to be displayed on receipts. Only required for EMV transactions. 963 type ChargePaymentMethodDetailsInteracPresentReceipt struct { 964 // The type of account being debited or credited 965 AccountType string `json:"account_type"` 966 // EMV tag 9F26, cryptogram generated by the integrated circuit chip. 967 ApplicationCryptogram string `json:"application_cryptogram"` 968 // Mnenomic of the Application Identifier. 969 ApplicationPreferredName string `json:"application_preferred_name"` 970 // Identifier for this transaction. 971 AuthorizationCode string `json:"authorization_code"` 972 // EMV tag 8A. A code returned by the card issuer. 973 AuthorizationResponseCode string `json:"authorization_response_code"` 974 // 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`. 975 CardholderVerificationMethod string `json:"cardholder_verification_method"` 976 // EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. 977 DedicatedFileName string `json:"dedicated_file_name"` 978 // The outcome of a series of EMV functions performed by the card reader. 979 TerminalVerificationResults string `json:"terminal_verification_results"` 980 // An indication of various EMV functions performed during the transaction. 981 TransactionStatusInformation string `json:"transaction_status_information"` 982 } 983 type ChargePaymentMethodDetailsInteracPresent struct { 984 // Card brand. Can be `interac`, `mastercard` or `visa`. 985 Brand string `json:"brand"` 986 // 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. 987 CardholderName string `json:"cardholder_name"` 988 // 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. 989 Country string `json:"country"` 990 // Authorization response cryptogram. 991 EmvAuthData string `json:"emv_auth_data"` 992 // Two-digit number representing the card's expiration month. 993 ExpMonth int64 `json:"exp_month"` 994 // Four-digit number representing the card's expiration year. 995 ExpYear int64 `json:"exp_year"` 996 // 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. 997 // 998 // *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.* 999 Fingerprint string `json:"fingerprint"` 1000 // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. 1001 Funding string `json:"funding"` 1002 // 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. 1003 GeneratedCard string `json:"generated_card"` 1004 // The last four digits of the card. 1005 Last4 string `json:"last4"` 1006 // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. 1007 Network string `json:"network"` 1008 // EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. 1009 PreferredLocales []string `json:"preferred_locales"` 1010 // How card details were read in this transaction. 1011 ReadMethod string `json:"read_method"` 1012 // A collection of fields required to be displayed on receipts. Only required for EMV transactions. 1013 Receipt *ChargePaymentMethodDetailsInteracPresentReceipt `json:"receipt"` 1014 // Please note that the fields below are for internal use only and are not returned 1015 // as part of standard API requests. 1016 // 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.) 1017 Description string `json:"description"` 1018 // Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) 1019 IIN string `json:"iin"` 1020 // The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) 1021 Issuer string `json:"issuer"` 1022 } 1023 type ChargePaymentMethodDetailsKlarna struct { 1024 // The Klarna payment method used for this transaction. 1025 // Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` 1026 PaymentMethodCategory ChargePaymentMethodDetailsKlarnaPaymentMethodCategory `json:"payment_method_category"` 1027 // Preferred language of the Klarna authorization page that the customer is redirected to. 1028 // 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`, `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` 1029 PreferredLocale string `json:"preferred_locale"` 1030 } 1031 1032 // If the payment succeeded, this contains the details of the convenience store where the payment was completed. 1033 type ChargePaymentMethodDetailsKonbiniStore struct { 1034 // The name of the convenience store chain where the payment was completed. 1035 Chain ChargePaymentMethodDetailsKonbiniStoreChain `json:"chain"` 1036 } 1037 type ChargePaymentMethodDetailsKonbini struct { 1038 // If the payment succeeded, this contains the details of the convenience store where the payment was completed. 1039 Store *ChargePaymentMethodDetailsKonbiniStore `json:"store"` 1040 } 1041 type ChargePaymentMethodDetailsLink struct { 1042 // Two-letter ISO code representing the funding source country beneath the Link payment. 1043 // You could use this attribute to get a sense of international fees. 1044 Country string `json:"country"` 1045 } 1046 type ChargePaymentMethodDetailsMobilepayCard struct { 1047 // Brand of the card used in the transaction 1048 Brand string `json:"brand"` 1049 // Two-letter ISO code representing the country of the card 1050 Country string `json:"country"` 1051 // Two digit number representing the card's expiration month 1052 ExpMonth int64 `json:"exp_month"` 1053 // Two digit number representing the card's expiration year 1054 ExpYear int64 `json:"exp_year"` 1055 // The last 4 digits of the card 1056 Last4 string `json:"last4"` 1057 } 1058 type ChargePaymentMethodDetailsMobilepay struct { 1059 Card *ChargePaymentMethodDetailsMobilepayCard `json:"card"` 1060 } 1061 type ChargePaymentMethodDetailsMultibanco struct { 1062 // Entity number associated with this Multibanco payment. 1063 Entity string `json:"entity"` 1064 // Reference number associated with this Multibanco payment. 1065 Reference string `json:"reference"` 1066 } 1067 type ChargePaymentMethodDetailsOXXO struct { 1068 // OXXO reference number 1069 Number string `json:"number"` 1070 } 1071 type ChargePaymentMethodDetailsP24 struct { 1072 // 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`. 1073 Bank string `json:"bank"` 1074 // Unique reference for this Przelewy24 payment. 1075 Reference string `json:"reference"` 1076 // Owner's verified full name. Values are verified or provided by Przelewy24 directly 1077 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 1078 // Przelewy24 rarely provides this information so the attribute is usually empty. 1079 VerifiedName string `json:"verified_name"` 1080 } 1081 type ChargePaymentMethodDetailsPayNow struct { 1082 // Reference number associated with this PayNow payment 1083 Reference string `json:"reference"` 1084 } 1085 1086 // The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. 1087 type ChargePaymentMethodDetailsPaypalSellerProtection struct { 1088 // An array of conditions that are covered for the transaction, if applicable. 1089 DisputeCategories []ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory `json:"dispute_categories"` 1090 // Indicates whether the transaction is eligible for PayPal's seller protection. 1091 Status ChargePaymentMethodDetailsPaypalSellerProtectionStatus `json:"status"` 1092 } 1093 type ChargePaymentMethodDetailsPaypal struct { 1094 // Owner's email. Values are provided by PayPal directly 1095 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 1096 PayerEmail string `json:"payer_email"` 1097 // PayPal account PayerID. This identifier uniquely identifies the PayPal customer. 1098 PayerID string `json:"payer_id"` 1099 // Owner's full name. Values provided by PayPal directly 1100 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 1101 PayerName string `json:"payer_name"` 1102 // The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. 1103 SellerProtection *ChargePaymentMethodDetailsPaypalSellerProtection `json:"seller_protection"` 1104 // A unique ID generated by PayPal for this transaction. 1105 TransactionID string `json:"transaction_id"` 1106 } 1107 type ChargePaymentMethodDetailsPix struct { 1108 // Unique transaction id generated by BCB 1109 BankTransactionID string `json:"bank_transaction_id"` 1110 } 1111 type ChargePaymentMethodDetailsPromptPay struct { 1112 // Bill reference generated by PromptPay 1113 Reference string `json:"reference"` 1114 } 1115 type ChargePaymentMethodDetailsRevolutPay struct{} 1116 type ChargePaymentMethodDetailsSEPACreditTransfer struct { 1117 // Name of the bank associated with the bank account. 1118 BankName string `json:"bank_name"` 1119 // Bank Identifier Code of the bank associated with the bank account. 1120 BIC string `json:"bic"` 1121 // IBAN of the bank account to transfer funds to. 1122 IBAN string `json:"iban"` 1123 } 1124 type ChargePaymentMethodDetailsSEPADebit struct { 1125 // Bank code of bank associated with the bank account. 1126 BankCode string `json:"bank_code"` 1127 // Branch code of bank associated with the bank account. 1128 BranchCode string `json:"branch_code"` 1129 // Two-letter ISO code representing the country the bank account is located in. 1130 Country string `json:"country"` 1131 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 1132 Fingerprint string `json:"fingerprint"` 1133 // Last four characters of the IBAN. 1134 Last4 string `json:"last4"` 1135 // 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). 1136 Mandate string `json:"mandate"` 1137 } 1138 type ChargePaymentMethodDetailsSofort struct { 1139 // Bank code of bank associated with the bank account. 1140 BankCode string `json:"bank_code"` 1141 // Name of the bank associated with the bank account. 1142 BankName string `json:"bank_name"` 1143 // Bank Identifier Code of the bank associated with the bank account. 1144 BIC string `json:"bic"` 1145 // Two-letter ISO code representing the country the bank account is located in. 1146 Country string `json:"country"` 1147 // The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. 1148 GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"` 1149 // The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. 1150 GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"` 1151 // Last four characters of the IBAN. 1152 IBANLast4 string `json:"iban_last4"` 1153 // Preferred language of the SOFORT authorization page that the customer is redirected to. 1154 // Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` 1155 PreferredLanguage string `json:"preferred_language"` 1156 // Owner's verified full name. Values are verified or provided by SOFORT directly 1157 // (if supported) at the time of authorization or settlement. They cannot be set or mutated. 1158 VerifiedName string `json:"verified_name"` 1159 } 1160 type ChargePaymentMethodDetailsStripeAccount struct{} 1161 type ChargePaymentMethodDetailsSwish struct { 1162 // 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 1163 Fingerprint string `json:"fingerprint"` 1164 // Payer bank reference number for the payment 1165 PaymentReference string `json:"payment_reference"` 1166 // The last four digits of the Swish account phone number 1167 VerifiedPhoneLast4 string `json:"verified_phone_last4"` 1168 } 1169 type ChargePaymentMethodDetailsUSBankAccount struct { 1170 // Account holder type: individual or company. 1171 AccountHolderType ChargePaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"` 1172 // Account type: checkings or savings. Defaults to checking if omitted. 1173 AccountType ChargePaymentMethodDetailsUSBankAccountAccountType `json:"account_type"` 1174 // Name of the bank associated with the bank account. 1175 BankName string `json:"bank_name"` 1176 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 1177 Fingerprint string `json:"fingerprint"` 1178 // Last four digits of the bank account number. 1179 Last4 string `json:"last4"` 1180 // ID of the mandate used to make this payment. 1181 Mandate *Mandate `json:"mandate"` 1182 // Reference number to locate ACH payments with customer's bank. 1183 PaymentReference string `json:"payment_reference"` 1184 // Routing number of the bank account. 1185 RoutingNumber string `json:"routing_number"` 1186 } 1187 type ChargePaymentMethodDetailsWeChat struct{} 1188 type ChargePaymentMethodDetailsWeChatPay struct { 1189 // Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. 1190 Fingerprint string `json:"fingerprint"` 1191 // Transaction ID of this particular WeChat Pay transaction. 1192 TransactionID string `json:"transaction_id"` 1193 } 1194 type ChargePaymentMethodDetailsZip struct{} 1195 1196 // Details about the payment method at the time of the transaction. 1197 type ChargePaymentMethodDetails struct { 1198 ACHCreditTransfer *ChargePaymentMethodDetailsACHCreditTransfer `json:"ach_credit_transfer"` 1199 ACHDebit *ChargePaymentMethodDetailsACHDebit `json:"ach_debit"` 1200 ACSSDebit *ChargePaymentMethodDetailsACSSDebit `json:"acss_debit"` 1201 Affirm *ChargePaymentMethodDetailsAffirm `json:"affirm"` 1202 AfterpayClearpay *ChargePaymentMethodDetailsAfterpayClearpay `json:"afterpay_clearpay"` 1203 Alipay *ChargePaymentMethodDetailsAlipay `json:"alipay"` 1204 AUBECSDebit *ChargePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` 1205 BACSDebit *ChargePaymentMethodDetailsBACSDebit `json:"bacs_debit"` 1206 Bancontact *ChargePaymentMethodDetailsBancontact `json:"bancontact"` 1207 BLIK *ChargePaymentMethodDetailsBLIK `json:"blik"` 1208 Boleto *ChargePaymentMethodDetailsBoleto `json:"boleto"` 1209 Card *ChargePaymentMethodDetailsCard `json:"card"` 1210 CardPresent *ChargePaymentMethodDetailsCardPresent `json:"card_present"` 1211 CashApp *ChargePaymentMethodDetailsCashApp `json:"cashapp"` 1212 CustomerBalance *ChargePaymentMethodDetailsCustomerBalance `json:"customer_balance"` 1213 EPS *ChargePaymentMethodDetailsEPS `json:"eps"` 1214 FPX *ChargePaymentMethodDetailsFPX `json:"fpx"` 1215 Giropay *ChargePaymentMethodDetailsGiropay `json:"giropay"` 1216 Grabpay *ChargePaymentMethodDetailsGrabpay `json:"grabpay"` 1217 IDEAL *ChargePaymentMethodDetailsIDEAL `json:"ideal"` 1218 InteracPresent *ChargePaymentMethodDetailsInteracPresent `json:"interac_present"` 1219 Klarna *ChargePaymentMethodDetailsKlarna `json:"klarna"` 1220 Konbini *ChargePaymentMethodDetailsKonbini `json:"konbini"` 1221 Link *ChargePaymentMethodDetailsLink `json:"link"` 1222 Mobilepay *ChargePaymentMethodDetailsMobilepay `json:"mobilepay"` 1223 Multibanco *ChargePaymentMethodDetailsMultibanco `json:"multibanco"` 1224 OXXO *ChargePaymentMethodDetailsOXXO `json:"oxxo"` 1225 P24 *ChargePaymentMethodDetailsP24 `json:"p24"` 1226 PayNow *ChargePaymentMethodDetailsPayNow `json:"paynow"` 1227 Paypal *ChargePaymentMethodDetailsPaypal `json:"paypal"` 1228 Pix *ChargePaymentMethodDetailsPix `json:"pix"` 1229 PromptPay *ChargePaymentMethodDetailsPromptPay `json:"promptpay"` 1230 RevolutPay *ChargePaymentMethodDetailsRevolutPay `json:"revolut_pay"` 1231 SEPACreditTransfer *ChargePaymentMethodDetailsSEPACreditTransfer `json:"sepa_credit_transfer"` 1232 SEPADebit *ChargePaymentMethodDetailsSEPADebit `json:"sepa_debit"` 1233 Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"` 1234 StripeAccount *ChargePaymentMethodDetailsStripeAccount `json:"stripe_account"` 1235 Swish *ChargePaymentMethodDetailsSwish `json:"swish"` 1236 // 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`. 1237 // An additional hash is included on `payment_method_details` with a name matching this value. 1238 // It contains information specific to the payment method. 1239 Type ChargePaymentMethodDetailsType `json:"type"` 1240 USBankAccount *ChargePaymentMethodDetailsUSBankAccount `json:"us_bank_account"` 1241 WeChat *ChargePaymentMethodDetailsWeChat `json:"wechat"` 1242 WeChatPay *ChargePaymentMethodDetailsWeChatPay `json:"wechat_pay"` 1243 Zip *ChargePaymentMethodDetailsZip `json:"zip"` 1244 } 1245 1246 // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. 1247 type ChargeRadarOptions struct { 1248 // 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. 1249 Session string `json:"session"` 1250 } 1251 1252 // 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. 1253 type ChargeTransferData struct { 1254 // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. 1255 Amount int64 `json:"amount"` 1256 // ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. 1257 Destination *Account `json:"destination"` 1258 } 1259 1260 // The `Charge` object represents a single attempt to move money into your Stripe account. 1261 // PaymentIntent confirmation is the most common way to create Charges, but transferring 1262 // money to a different Stripe account through Connect also creates Charges. 1263 // Some legacy payment flows create Charges directly, which is not recommended for new integrations. 1264 type Charge struct { 1265 APIResource 1266 // 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). 1267 Amount int64 `json:"amount"` 1268 // Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). 1269 AmountCaptured int64 `json:"amount_captured"` 1270 // Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). 1271 AmountRefunded int64 `json:"amount_refunded"` 1272 // ID of the Connect application that created the charge. 1273 Application *Application `json:"application"` 1274 // The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. 1275 ApplicationFee *ApplicationFee `json:"application_fee"` 1276 // The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. 1277 ApplicationFeeAmount int64 `json:"application_fee_amount"` 1278 // Authorization code on the charge. 1279 AuthorizationCode string `json:"authorization_code"` 1280 // ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). 1281 BalanceTransaction *BalanceTransaction `json:"balance_transaction"` 1282 BillingDetails *ChargeBillingDetails `json:"billing_details"` 1283 // 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. 1284 CalculatedStatementDescriptor string `json:"calculated_statement_descriptor"` 1285 // If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. 1286 Captured bool `json:"captured"` 1287 // Time at which the object was created. Measured in seconds since the Unix epoch. 1288 Created int64 `json:"created"` 1289 // 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). 1290 Currency Currency `json:"currency"` 1291 // ID of the customer this charge is for if one exists. 1292 Customer *Customer `json:"customer"` 1293 // An arbitrary string attached to the object. Often useful for displaying to users. 1294 Description string `json:"description"` 1295 // Whether the charge has been disputed. 1296 Disputed bool `json:"disputed"` 1297 // ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. 1298 FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"` 1299 // Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). 1300 FailureCode string `json:"failure_code"` 1301 // Message to user further explaining reason for charge failure if available. 1302 FailureMessage string `json:"failure_message"` 1303 // Information on fraud assessments for the charge. 1304 FraudDetails *ChargeFraudDetails `json:"fraud_details"` 1305 // Unique identifier for the object. 1306 ID string `json:"id"` 1307 // ID of the invoice this charge is for if one exists. 1308 Invoice *Invoice `json:"invoice"` 1309 Level3 *ChargeLevel3 `json:"level3"` 1310 // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. 1311 Livemode bool `json:"livemode"` 1312 // 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. 1313 Metadata map[string]string `json:"metadata"` 1314 // String representing the object's type. Objects of the same type share the same value. 1315 Object string `json:"object"` 1316 // 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. 1317 OnBehalfOf *Account `json:"on_behalf_of"` 1318 // Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. 1319 Outcome *ChargeOutcome `json:"outcome"` 1320 // `true` if the charge succeeded, or was successfully authorized for later capture. 1321 Paid bool `json:"paid"` 1322 // ID of the PaymentIntent associated with this charge, if one exists. 1323 PaymentIntent *PaymentIntent `json:"payment_intent"` 1324 // ID of the payment method used in this charge. 1325 PaymentMethod string `json:"payment_method"` 1326 // Details about the payment method at the time of the transaction. 1327 PaymentMethodDetails *ChargePaymentMethodDetails `json:"payment_method_details"` 1328 // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. 1329 RadarOptions *ChargeRadarOptions `json:"radar_options"` 1330 // This is the email address that the receipt for this charge was sent to. 1331 ReceiptEmail string `json:"receipt_email"` 1332 // 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. 1333 ReceiptNumber string `json:"receipt_number"` 1334 // 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. 1335 ReceiptURL string `json:"receipt_url"` 1336 // Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. 1337 Refunded bool `json:"refunded"` 1338 // A list of refunds that have been applied to the charge. 1339 Refunds *RefundList `json:"refunds"` 1340 // ID of the review associated with this charge if one exists. 1341 Review *Review `json:"review"` 1342 // Shipping information for the charge. 1343 Shipping *ShippingDetails `json:"shipping"` 1344 // 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. 1345 Source *PaymentSource `json:"source"` 1346 // The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. 1347 SourceTransfer *Transfer `json:"source_transfer"` 1348 // For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. 1349 StatementDescriptor string `json:"statement_descriptor"` 1350 // Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. 1351 StatementDescriptorSuffix string `json:"statement_descriptor_suffix"` 1352 // The status of the payment is either `succeeded`, `pending`, or `failed`. 1353 Status ChargeStatus `json:"status"` 1354 // ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). 1355 Transfer *Transfer `json:"transfer"` 1356 // 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. 1357 TransferData *ChargeTransferData `json:"transfer_data"` 1358 // 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. 1359 TransferGroup string `json:"transfer_group"` 1360 } 1361 1362 // ChargeList is a list of Charges as retrieved from a list endpoint. 1363 type ChargeList struct { 1364 APIResource 1365 ListMeta 1366 Data []*Charge `json:"data"` 1367 } 1368 1369 // ChargeSearchResult is a list of Charge search results as retrieved from a search endpoint. 1370 type ChargeSearchResult struct { 1371 APIResource 1372 SearchMeta 1373 Data []*Charge `json:"data"` 1374 } 1375 1376 // UnmarshalJSON handles deserialization of a Charge. 1377 // This custom unmarshaling is needed because the resulting 1378 // property may be an id or the full struct if it was expanded. 1379 func (c *Charge) UnmarshalJSON(data []byte) error { 1380 if id, ok := ParseID(data); ok { 1381 c.ID = id 1382 return nil 1383 } 1384 1385 type charge Charge 1386 var v charge 1387 if err := json.Unmarshal(data, &v); err != nil { 1388 return err 1389 } 1390 1391 *c = Charge(v) 1392 return nil 1393 }