github.com/stripe/stripe-go/v76@v76.25.0/account.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 package stripe 8 9 import ( 10 "encoding/json" 11 "github.com/stripe/stripe-go/v76/form" 12 ) 13 14 // The business type. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property is only returned for Custom accounts. 15 type AccountBusinessType string 16 17 // List of values that AccountBusinessType can take 18 const ( 19 AccountBusinessTypeCompany AccountBusinessType = "company" 20 AccountBusinessTypeGovernmentEntity AccountBusinessType = "government_entity" 21 AccountBusinessTypeIndividual AccountBusinessType = "individual" 22 AccountBusinessTypeNonProfit AccountBusinessType = "non_profit" 23 ) 24 25 // The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. 26 type AccountCapabilityStatus string 27 28 // List of values that AccountCapabilityStatus can take 29 const ( 30 AccountCapabilityStatusActive AccountCapabilityStatus = "active" 31 AccountCapabilityStatusInactive AccountCapabilityStatus = "inactive" 32 AccountCapabilityStatusPending AccountCapabilityStatus = "pending" 33 ) 34 35 // The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. 36 type AccountCompanyStructure string 37 38 // List of values that AccountCompanyStructure can take 39 const ( 40 AccountCompanyStructureFreeZoneEstablishment AccountCompanyStructure = "free_zone_establishment" 41 AccountCompanyStructureFreeZoneLLC AccountCompanyStructure = "free_zone_llc" 42 AccountCompanyStructureGovernmentInstrumentality AccountCompanyStructure = "government_instrumentality" 43 AccountCompanyStructureGovernmentalUnit AccountCompanyStructure = "governmental_unit" 44 AccountCompanyStructureIncorporatedNonProfit AccountCompanyStructure = "incorporated_non_profit" 45 AccountCompanyStructureIncorporatedPartnership AccountCompanyStructure = "incorporated_partnership" 46 AccountCompanyStructureLimitedLiabilityPartnership AccountCompanyStructure = "limited_liability_partnership" 47 AccountCompanyStructureLLC AccountCompanyStructure = "llc" 48 AccountCompanyStructureMultiMemberLLC AccountCompanyStructure = "multi_member_llc" 49 AccountCompanyStructurePrivateCompany AccountCompanyStructure = "private_company" 50 AccountCompanyStructurePrivateCorporation AccountCompanyStructure = "private_corporation" 51 AccountCompanyStructurePrivatePartnership AccountCompanyStructure = "private_partnership" 52 AccountCompanyStructurePublicCompany AccountCompanyStructure = "public_company" 53 AccountCompanyStructurePublicCorporation AccountCompanyStructure = "public_corporation" 54 AccountCompanyStructurePublicPartnership AccountCompanyStructure = "public_partnership" 55 AccountCompanyStructureRegisteredCharity AccountCompanyStructure = "registered_charity" 56 AccountCompanyStructureSingleMemberLLC AccountCompanyStructure = "single_member_llc" 57 AccountCompanyStructureSoleEstablishment AccountCompanyStructure = "sole_establishment" 58 AccountCompanyStructureSoleProprietorship AccountCompanyStructure = "sole_proprietorship" 59 AccountCompanyStructureTaxExemptGovernmentInstrumentality AccountCompanyStructure = "tax_exempt_government_instrumentality" 60 AccountCompanyStructureUnincorporatedAssociation AccountCompanyStructure = "unincorporated_association" 61 AccountCompanyStructureUnincorporatedNonProfit AccountCompanyStructure = "unincorporated_non_profit" 62 AccountCompanyStructureUnincorporatedPartnership AccountCompanyStructure = "unincorporated_partnership" 63 ) 64 65 // One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. 66 type AccountCompanyVerificationDocumentDetailsCode string 67 68 // List of values that AccountCompanyVerificationDocumentDetailsCode can take 69 const ( 70 AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt AccountCompanyVerificationDocumentDetailsCode = "document_corrupt" 71 AccountCompanyVerificationDocumentDetailsCodeDocumentExpired AccountCompanyVerificationDocumentDetailsCode = "document_expired" 72 AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy" 73 AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther AccountCompanyVerificationDocumentDetailsCode = "document_failed_other" 74 AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode" 75 AccountCompanyVerificationDocumentDetailsCodeDocumentFailedGreyscale AccountCompanyVerificationDocumentDetailsCode = "document_failed_greyscale" 76 AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent" 77 AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid AccountCompanyVerificationDocumentDetailsCode = "document_invalid" 78 AccountCompanyVerificationDocumentDetailsCodeDocumentIncomplete AccountCompanyVerificationDocumentDetailsCode = "document_incomplete" 79 AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated AccountCompanyVerificationDocumentDetailsCode = "document_manipulated" 80 AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable AccountCompanyVerificationDocumentDetailsCode = "document_not_readable" 81 AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded" 82 AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge AccountCompanyVerificationDocumentDetailsCode = "document_too_large" 83 AccountCompanyVerificationDocumentDetailsCodeDocumentTypeNotSupported AccountCompanyVerificationDocumentDetailsCode = "document_type_not_supported" 84 ) 85 86 // A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. 87 type AccountControllerFeesPayer string 88 89 // List of values that AccountControllerFeesPayer can take 90 const ( 91 AccountControllerFeesPayerAccount AccountControllerFeesPayer = "account" 92 AccountControllerFeesPayerApplication AccountControllerFeesPayer = "application" 93 AccountControllerFeesPayerApplicationCustom AccountControllerFeesPayer = "application_custom" 94 AccountControllerFeesPayerApplicationExpress AccountControllerFeesPayer = "application_express" 95 ) 96 97 // A value indicating who is liable when this account can't pay back negative balances from payments. 98 type AccountControllerLossesPayments string 99 100 // List of values that AccountControllerLossesPayments can take 101 const ( 102 AccountControllerLossesPaymentsApplication AccountControllerLossesPayments = "application" 103 AccountControllerLossesPaymentsStripe AccountControllerLossesPayments = "stripe" 104 ) 105 106 // A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. 107 type AccountControllerRequirementCollection string 108 109 // List of values that AccountControllerRequirementCollection can take 110 const ( 111 AccountControllerRequirementCollectionApplication AccountControllerRequirementCollection = "application" 112 AccountControllerRequirementCollectionStripe AccountControllerRequirementCollection = "stripe" 113 ) 114 115 // A value indicating the Stripe dashboard this account has access to independent of the Connect application. 116 type AccountControllerStripeDashboardType string 117 118 // List of values that AccountControllerStripeDashboardType can take 119 const ( 120 AccountControllerStripeDashboardTypeExpress AccountControllerStripeDashboardType = "express" 121 AccountControllerStripeDashboardTypeFull AccountControllerStripeDashboardType = "full" 122 AccountControllerStripeDashboardTypeNone AccountControllerStripeDashboardType = "none" 123 ) 124 125 // The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. 126 type AccountControllerType string 127 128 // List of values that AccountControllerType can take 129 const ( 130 AccountControllerTypeAccount AccountControllerType = "account" 131 AccountControllerTypeApplication AccountControllerType = "application" 132 ) 133 134 type AccountExternalAccountType string 135 136 // List of values that AccountExternalAccountType can take 137 const ( 138 AccountExternalAccountTypeBankAccount AccountExternalAccountType = "bank_account" 139 AccountExternalAccountTypeCard AccountExternalAccountType = "card" 140 ) 141 142 // If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. 143 type AccountRequirementsDisabledReason string 144 145 // List of values that AccountRequirementsDisabledReason can take 146 const ( 147 AccountRequirementsDisabledReasonFieldsNeeded AccountRequirementsDisabledReason = "fields_needed" 148 AccountRequirementsDisabledReasonListed AccountRequirementsDisabledReason = "listed" 149 AccountRequirementsDisabledReasonOther AccountRequirementsDisabledReason = "other" 150 AccountRequirementsDisabledReasonRejectedFraud AccountRequirementsDisabledReason = "rejected.fraud" 151 AccountRequirementsDisabledReasonRejectedListed AccountRequirementsDisabledReason = "rejected.listed" 152 AccountRequirementsDisabledReasonRejectedOther AccountRequirementsDisabledReason = "rejected.other" 153 AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service" 154 AccountRequirementsDisabledReasonUnderReview AccountRequirementsDisabledReason = "under_review" 155 ) 156 157 // How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. 158 type AccountSettingsPayoutsScheduleInterval string 159 160 // List of values that AccountSettingsPayoutsScheduleInterval can take 161 const ( 162 AccountSettingsPayoutsScheduleIntervalDaily AccountSettingsPayoutsScheduleInterval = "daily" 163 AccountSettingsPayoutsScheduleIntervalManual AccountSettingsPayoutsScheduleInterval = "manual" 164 AccountSettingsPayoutsScheduleIntervalMonthly AccountSettingsPayoutsScheduleInterval = "monthly" 165 AccountSettingsPayoutsScheduleIntervalWeekly AccountSettingsPayoutsScheduleInterval = "weekly" 166 ) 167 168 // The user's service agreement type 169 type AccountTOSAcceptanceServiceAgreement string 170 171 // List of values that AccountTOSAcceptanceServiceAgreement can take 172 const ( 173 AccountTOSAcceptanceServiceAgreementFull AccountTOSAcceptanceServiceAgreement = "full" 174 AccountTOSAcceptanceServiceAgreementRecipient AccountTOSAcceptanceServiceAgreement = "recipient" 175 ) 176 177 // The Stripe account type. Can be `standard`, `express`, or `custom`. 178 type AccountType string 179 180 // List of values that AccountType can take 181 const ( 182 AccountTypeCustom AccountType = "custom" 183 AccountTypeExpress AccountType = "express" 184 AccountTypeNone AccountType = "none" 185 AccountTypeStandard AccountType = "standard" 186 ) 187 188 // With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage. 189 // 190 // Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. 191 // 192 // If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. 193 type AccountParams struct { 194 Params `form:"*"` 195 // An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. 196 AccountToken *string `form:"account_token"` 197 // Business information about the account. 198 BusinessProfile *AccountBusinessProfileParams `form:"business_profile"` 199 // The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts. 200 BusinessType *string `form:"business_type"` 201 // Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. 202 Capabilities *AccountCapabilitiesParams `form:"capabilities"` 203 // Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts. 204 Company *AccountCompanyParams `form:"company"` 205 // A hash of configuration describing the account controller's attributes. 206 Controller *AccountControllerParams `form:"controller"` 207 // The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. 208 Country *string `form:"country"` 209 // Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). 210 DefaultCurrency *string `form:"default_currency"` 211 // Documents that may be submitted to satisfy various informational requests. 212 Documents *AccountDocumentsParams `form:"documents"` 213 // The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. 214 Email *string `form:"email"` 215 // Specifies which fields in the response should be expanded. 216 Expand []*string `form:"expand"` 217 // A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation. 218 // 219 // By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts. 220 ExternalAccount *AccountExternalAccountParams `form:"external_account"` 221 // Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts. 222 Individual *PersonParams `form:"individual"` 223 // 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`. 224 Metadata map[string]string `form:"metadata"` 225 // Options for customizing how the account functions within Stripe. 226 Settings *AccountSettingsParams `form:"settings"` 227 // Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts. 228 TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"` 229 // The type of Stripe account to create. May be one of `custom`, `express` or `standard`. 230 Type *string `form:"type"` 231 } 232 233 // AddExpand appends a new field to expand. 234 func (p *AccountParams) AddExpand(f string) { 235 p.Expand = append(p.Expand, &f) 236 } 237 238 // AddMetadata adds a new key-value pair to the Metadata. 239 func (p *AccountParams) AddMetadata(key string, value string) { 240 if p.Metadata == nil { 241 p.Metadata = make(map[string]string) 242 } 243 244 p.Metadata[key] = value 245 } 246 247 // The applicant's gross annual revenue for its preceding fiscal year. 248 type AccountBusinessProfileAnnualRevenueParams struct { 249 // A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). 250 Amount *int64 `form:"amount"` 251 // 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). 252 Currency *string `form:"currency"` 253 // The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. 254 FiscalYearEnd *string `form:"fiscal_year_end"` 255 } 256 257 // An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. 258 type AccountBusinessProfileMonthlyEstimatedRevenueParams struct { 259 // A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). 260 Amount *int64 `form:"amount"` 261 // 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). 262 Currency *string `form:"currency"` 263 } 264 265 // Business information about the account. 266 type AccountBusinessProfileParams struct { 267 // The applicant's gross annual revenue for its preceding fiscal year. 268 AnnualRevenue *AccountBusinessProfileAnnualRevenueParams `form:"annual_revenue"` 269 // An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. 270 EstimatedWorkerCount *int64 `form:"estimated_worker_count"` 271 // [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. 272 MCC *string `form:"mcc"` 273 // An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. 274 MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenueParams `form:"monthly_estimated_revenue"` 275 // The customer-facing business name. 276 Name *string `form:"name"` 277 // Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. 278 ProductDescription *string `form:"product_description"` 279 // A publicly available mailing address for sending support issues to. 280 SupportAddress *AddressParams `form:"support_address"` 281 // A publicly available email address for sending support issues to. 282 SupportEmail *string `form:"support_email"` 283 // A publicly available phone number to call with support issues. 284 SupportPhone *string `form:"support_phone"` 285 // A publicly available website for handling support issues. 286 SupportURL *string `form:"support_url"` 287 // The business's publicly available website. 288 URL *string `form:"url"` 289 } 290 291 // The acss_debit_payments capability. 292 type AccountCapabilitiesACSSDebitPaymentsParams struct { 293 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 294 Requested *bool `form:"requested"` 295 } 296 297 // The affirm_payments capability. 298 type AccountCapabilitiesAffirmPaymentsParams struct { 299 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 300 Requested *bool `form:"requested"` 301 } 302 303 // The afterpay_clearpay_payments capability. 304 type AccountCapabilitiesAfterpayClearpayPaymentsParams struct { 305 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 306 Requested *bool `form:"requested"` 307 } 308 309 // The amazon_pay_payments capability. 310 type AccountCapabilitiesAmazonPayPaymentsParams struct { 311 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 312 Requested *bool `form:"requested"` 313 } 314 315 // The au_becs_debit_payments capability. 316 type AccountCapabilitiesAUBECSDebitPaymentsParams struct { 317 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 318 Requested *bool `form:"requested"` 319 } 320 321 // The bacs_debit_payments capability. 322 type AccountCapabilitiesBACSDebitPaymentsParams struct { 323 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 324 Requested *bool `form:"requested"` 325 } 326 327 // The bancontact_payments capability. 328 type AccountCapabilitiesBancontactPaymentsParams struct { 329 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 330 Requested *bool `form:"requested"` 331 } 332 333 // The bank_transfer_payments capability. 334 type AccountCapabilitiesBankTransferPaymentsParams struct { 335 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 336 Requested *bool `form:"requested"` 337 } 338 339 // The blik_payments capability. 340 type AccountCapabilitiesBLIKPaymentsParams struct { 341 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 342 Requested *bool `form:"requested"` 343 } 344 345 // The boleto_payments capability. 346 type AccountCapabilitiesBoletoPaymentsParams struct { 347 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 348 Requested *bool `form:"requested"` 349 } 350 351 // The card_issuing capability. 352 type AccountCapabilitiesCardIssuingParams struct { 353 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 354 Requested *bool `form:"requested"` 355 } 356 357 // The card_payments capability. 358 type AccountCapabilitiesCardPaymentsParams struct { 359 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 360 Requested *bool `form:"requested"` 361 } 362 363 // The cartes_bancaires_payments capability. 364 type AccountCapabilitiesCartesBancairesPaymentsParams struct { 365 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 366 Requested *bool `form:"requested"` 367 } 368 369 // The cashapp_payments capability. 370 type AccountCapabilitiesCashAppPaymentsParams struct { 371 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 372 Requested *bool `form:"requested"` 373 } 374 375 // The eps_payments capability. 376 type AccountCapabilitiesEPSPaymentsParams struct { 377 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 378 Requested *bool `form:"requested"` 379 } 380 381 // The fpx_payments capability. 382 type AccountCapabilitiesFPXPaymentsParams struct { 383 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 384 Requested *bool `form:"requested"` 385 } 386 387 // The giropay_payments capability. 388 type AccountCapabilitiesGiropayPaymentsParams struct { 389 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 390 Requested *bool `form:"requested"` 391 } 392 393 // The grabpay_payments capability. 394 type AccountCapabilitiesGrabpayPaymentsParams struct { 395 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 396 Requested *bool `form:"requested"` 397 } 398 399 // The ideal_payments capability. 400 type AccountCapabilitiesIDEALPaymentsParams struct { 401 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 402 Requested *bool `form:"requested"` 403 } 404 405 // The india_international_payments capability. 406 type AccountCapabilitiesIndiaInternationalPaymentsParams struct { 407 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 408 Requested *bool `form:"requested"` 409 } 410 411 // The jcb_payments capability. 412 type AccountCapabilitiesJCBPaymentsParams struct { 413 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 414 Requested *bool `form:"requested"` 415 } 416 417 // The klarna_payments capability. 418 type AccountCapabilitiesKlarnaPaymentsParams struct { 419 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 420 Requested *bool `form:"requested"` 421 } 422 423 // The konbini_payments capability. 424 type AccountCapabilitiesKonbiniPaymentsParams struct { 425 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 426 Requested *bool `form:"requested"` 427 } 428 429 // The legacy_payments capability. 430 type AccountCapabilitiesLegacyPaymentsParams struct { 431 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 432 Requested *bool `form:"requested"` 433 } 434 435 // The link_payments capability. 436 type AccountCapabilitiesLinkPaymentsParams struct { 437 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 438 Requested *bool `form:"requested"` 439 } 440 441 // The mobilepay_payments capability. 442 type AccountCapabilitiesMobilepayPaymentsParams struct { 443 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 444 Requested *bool `form:"requested"` 445 } 446 447 // The oxxo_payments capability. 448 type AccountCapabilitiesOXXOPaymentsParams struct { 449 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 450 Requested *bool `form:"requested"` 451 } 452 453 // The p24_payments capability. 454 type AccountCapabilitiesP24PaymentsParams struct { 455 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 456 Requested *bool `form:"requested"` 457 } 458 459 // The paynow_payments capability. 460 type AccountCapabilitiesPayNowPaymentsParams struct { 461 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 462 Requested *bool `form:"requested"` 463 } 464 465 // The promptpay_payments capability. 466 type AccountCapabilitiesPromptPayPaymentsParams struct { 467 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 468 Requested *bool `form:"requested"` 469 } 470 471 // The revolut_pay_payments capability. 472 type AccountCapabilitiesRevolutPayPaymentsParams struct { 473 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 474 Requested *bool `form:"requested"` 475 } 476 477 // The sepa_debit_payments capability. 478 type AccountCapabilitiesSEPADebitPaymentsParams struct { 479 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 480 Requested *bool `form:"requested"` 481 } 482 483 // The sofort_payments capability. 484 type AccountCapabilitiesSofortPaymentsParams struct { 485 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 486 Requested *bool `form:"requested"` 487 } 488 489 // The swish_payments capability. 490 type AccountCapabilitiesSwishPaymentsParams struct { 491 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 492 Requested *bool `form:"requested"` 493 } 494 495 // The tax_reporting_us_1099_k capability. 496 type AccountCapabilitiesTaxReportingUS1099KParams struct { 497 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 498 Requested *bool `form:"requested"` 499 } 500 501 // The tax_reporting_us_1099_misc capability. 502 type AccountCapabilitiesTaxReportingUS1099MISCParams struct { 503 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 504 Requested *bool `form:"requested"` 505 } 506 507 // The transfers capability. 508 type AccountCapabilitiesTransfersParams struct { 509 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 510 Requested *bool `form:"requested"` 511 } 512 513 // The treasury capability. 514 type AccountCapabilitiesTreasuryParams struct { 515 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 516 Requested *bool `form:"requested"` 517 } 518 519 // The us_bank_account_ach_payments capability. 520 type AccountCapabilitiesUSBankAccountACHPaymentsParams struct { 521 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 522 Requested *bool `form:"requested"` 523 } 524 525 // The zip_payments capability. 526 type AccountCapabilitiesZipPaymentsParams struct { 527 // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. 528 Requested *bool `form:"requested"` 529 } 530 531 // Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. 532 type AccountCapabilitiesParams struct { 533 // The acss_debit_payments capability. 534 ACSSDebitPayments *AccountCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments"` 535 // The affirm_payments capability. 536 AffirmPayments *AccountCapabilitiesAffirmPaymentsParams `form:"affirm_payments"` 537 // The afterpay_clearpay_payments capability. 538 AfterpayClearpayPayments *AccountCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments"` 539 // The amazon_pay_payments capability. 540 AmazonPayPayments *AccountCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_payments"` 541 // The au_becs_debit_payments capability. 542 AUBECSDebitPayments *AccountCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"` 543 // The bacs_debit_payments capability. 544 BACSDebitPayments *AccountCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"` 545 // The bancontact_payments capability. 546 BancontactPayments *AccountCapabilitiesBancontactPaymentsParams `form:"bancontact_payments"` 547 // The bank_transfer_payments capability. 548 BankTransferPayments *AccountCapabilitiesBankTransferPaymentsParams `form:"bank_transfer_payments"` 549 // The blik_payments capability. 550 BLIKPayments *AccountCapabilitiesBLIKPaymentsParams `form:"blik_payments"` 551 // The boleto_payments capability. 552 BoletoPayments *AccountCapabilitiesBoletoPaymentsParams `form:"boleto_payments"` 553 // The card_issuing capability. 554 CardIssuing *AccountCapabilitiesCardIssuingParams `form:"card_issuing"` 555 // The card_payments capability. 556 CardPayments *AccountCapabilitiesCardPaymentsParams `form:"card_payments"` 557 // The cartes_bancaires_payments capability. 558 CartesBancairesPayments *AccountCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments"` 559 // The cashapp_payments capability. 560 CashAppPayments *AccountCapabilitiesCashAppPaymentsParams `form:"cashapp_payments"` 561 // The eps_payments capability. 562 EPSPayments *AccountCapabilitiesEPSPaymentsParams `form:"eps_payments"` 563 // The fpx_payments capability. 564 FPXPayments *AccountCapabilitiesFPXPaymentsParams `form:"fpx_payments"` 565 // The giropay_payments capability. 566 GiropayPayments *AccountCapabilitiesGiropayPaymentsParams `form:"giropay_payments"` 567 // The grabpay_payments capability. 568 GrabpayPayments *AccountCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"` 569 // The ideal_payments capability. 570 IDEALPayments *AccountCapabilitiesIDEALPaymentsParams `form:"ideal_payments"` 571 // The india_international_payments capability. 572 IndiaInternationalPayments *AccountCapabilitiesIndiaInternationalPaymentsParams `form:"india_international_payments"` 573 // The jcb_payments capability. 574 JCBPayments *AccountCapabilitiesJCBPaymentsParams `form:"jcb_payments"` 575 // The klarna_payments capability. 576 KlarnaPayments *AccountCapabilitiesKlarnaPaymentsParams `form:"klarna_payments"` 577 // The konbini_payments capability. 578 KonbiniPayments *AccountCapabilitiesKonbiniPaymentsParams `form:"konbini_payments"` 579 // The legacy_payments capability. 580 LegacyPayments *AccountCapabilitiesLegacyPaymentsParams `form:"legacy_payments"` 581 // The link_payments capability. 582 LinkPayments *AccountCapabilitiesLinkPaymentsParams `form:"link_payments"` 583 // The mobilepay_payments capability. 584 MobilepayPayments *AccountCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments"` 585 // The oxxo_payments capability. 586 OXXOPayments *AccountCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"` 587 // The p24_payments capability. 588 P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"` 589 // The paynow_payments capability. 590 PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"` 591 // The promptpay_payments capability. 592 PromptPayPayments *AccountCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"` 593 // The revolut_pay_payments capability. 594 RevolutPayPayments *AccountCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments"` 595 // The sepa_debit_payments capability. 596 SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"` 597 // The sofort_payments capability. 598 SofortPayments *AccountCapabilitiesSofortPaymentsParams `form:"sofort_payments"` 599 // The swish_payments capability. 600 SwishPayments *AccountCapabilitiesSwishPaymentsParams `form:"swish_payments"` 601 // The tax_reporting_us_1099_k capability. 602 TaxReportingUS1099K *AccountCapabilitiesTaxReportingUS1099KParams `form:"tax_reporting_us_1099_k"` 603 // The tax_reporting_us_1099_misc capability. 604 TaxReportingUS1099MISC *AccountCapabilitiesTaxReportingUS1099MISCParams `form:"tax_reporting_us_1099_misc"` 605 // The transfers capability. 606 Transfers *AccountCapabilitiesTransfersParams `form:"transfers"` 607 // The treasury capability. 608 Treasury *AccountCapabilitiesTreasuryParams `form:"treasury"` 609 // The us_bank_account_ach_payments capability. 610 USBankAccountACHPayments *AccountCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"` 611 // The zip_payments capability. 612 ZipPayments *AccountCapabilitiesZipPaymentsParams `form:"zip_payments"` 613 } 614 615 // The Kana variation of the company's primary address (Japan only). 616 type AccountCompanyAddressKanaParams struct { 617 // City or ward. 618 City *string `form:"city"` 619 // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). 620 Country *string `form:"country"` 621 // Block or building number. 622 Line1 *string `form:"line1"` 623 // Building details. 624 Line2 *string `form:"line2"` 625 // Postal code. 626 PostalCode *string `form:"postal_code"` 627 // Prefecture. 628 State *string `form:"state"` 629 // Town or cho-me. 630 Town *string `form:"town"` 631 } 632 633 // The Kanji variation of the company's primary address (Japan only). 634 type AccountCompanyAddressKanjiParams struct { 635 // City or ward. 636 City *string `form:"city"` 637 // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). 638 Country *string `form:"country"` 639 // Block or building number. 640 Line1 *string `form:"line1"` 641 // Building details. 642 Line2 *string `form:"line2"` 643 // Postal code. 644 PostalCode *string `form:"postal_code"` 645 // Prefecture. 646 State *string `form:"state"` 647 // Town or cho-me. 648 Town *string `form:"town"` 649 } 650 651 // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. 652 type AccountCompanyOwnershipDeclarationParams struct { 653 // The Unix timestamp marking when the beneficial owner attestation was made. 654 Date *int64 `form:"date"` 655 // The IP address from which the beneficial owner attestation was made. 656 IP *string `form:"ip"` 657 // The user agent of the browser from which the beneficial owner attestation was made. 658 UserAgent *string `form:"user_agent"` 659 } 660 661 // A document verifying the business. 662 type AccountCompanyVerificationDocumentParams struct { 663 // The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. 664 Back *string `form:"back"` 665 // The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. 666 Front *string `form:"front"` 667 } 668 669 // Information on the verification state of the company. 670 type AccountCompanyVerificationParams struct { 671 // A document verifying the business. 672 Document *AccountCompanyVerificationDocumentParams `form:"document"` 673 } 674 675 // Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts. 676 type AccountCompanyParams struct { 677 // The company's primary address. 678 Address *AddressParams `form:"address"` 679 // The Kana variation of the company's primary address (Japan only). 680 AddressKana *AccountCompanyAddressKanaParams `form:"address_kana"` 681 // The Kanji variation of the company's primary address (Japan only). 682 AddressKanji *AccountCompanyAddressKanjiParams `form:"address_kanji"` 683 // Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. 684 DirectorsProvided *bool `form:"directors_provided"` 685 // Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. 686 ExecutivesProvided *bool `form:"executives_provided"` 687 // The export license ID number of the company, also referred as Import Export Code (India only). 688 ExportLicenseID *string `form:"export_license_id"` 689 // The purpose code to use for export transactions (India only). 690 ExportPurposeCode *string `form:"export_purpose_code"` 691 // The company's legal name. 692 Name *string `form:"name"` 693 // The Kana variation of the company's legal name (Japan only). 694 NameKana *string `form:"name_kana"` 695 // The Kanji variation of the company's legal name (Japan only). 696 NameKanji *string `form:"name_kanji"` 697 // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. 698 OwnershipDeclaration *AccountCompanyOwnershipDeclarationParams `form:"ownership_declaration"` 699 // This parameter can only be used on Token creation. 700 OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"` 701 // Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. 702 OwnersProvided *bool `form:"owners_provided"` 703 // The company's phone number (used for verification). 704 Phone *string `form:"phone"` 705 // The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). 706 RegistrationNumber *string `form:"registration_number"` 707 // The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. 708 Structure *string `form:"structure"` 709 // The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) 710 TaxID *string `form:"tax_id"` 711 // The jurisdiction in which the `tax_id` is registered (Germany-based companies only). 712 TaxIDRegistrar *string `form:"tax_id_registrar"` 713 // The VAT number of the company. 714 VATID *string `form:"vat_id"` 715 // Information on the verification state of the company. 716 Verification *AccountCompanyVerificationParams `form:"verification"` 717 } 718 719 // One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. 720 type AccountDocumentsBankAccountOwnershipVerificationParams struct { 721 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 722 Files []*string `form:"files"` 723 } 724 725 // One or more documents that demonstrate proof of a company's license to operate. 726 type AccountDocumentsCompanyLicenseParams struct { 727 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 728 Files []*string `form:"files"` 729 } 730 731 // One or more documents showing the company's Memorandum of Association. 732 type AccountDocumentsCompanyMemorandumOfAssociationParams struct { 733 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 734 Files []*string `form:"files"` 735 } 736 737 // (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. 738 type AccountDocumentsCompanyMinisterialDecreeParams struct { 739 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 740 Files []*string `form:"files"` 741 } 742 743 // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. 744 type AccountDocumentsCompanyRegistrationVerificationParams struct { 745 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 746 Files []*string `form:"files"` 747 } 748 749 // One or more documents that demonstrate proof of a company's tax ID. 750 type AccountDocumentsCompanyTaxIDVerificationParams struct { 751 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 752 Files []*string `form:"files"` 753 } 754 755 // One or more documents showing the company's proof of registration with the national business registry. 756 type AccountDocumentsProofOfRegistrationParams struct { 757 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 758 Files []*string `form:"files"` 759 } 760 761 // Documents that may be submitted to satisfy various informational requests. 762 type AccountDocumentsParams struct { 763 // One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. 764 BankAccountOwnershipVerification *AccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"` 765 // One or more documents that demonstrate proof of a company's license to operate. 766 CompanyLicense *AccountDocumentsCompanyLicenseParams `form:"company_license"` 767 // One or more documents showing the company's Memorandum of Association. 768 CompanyMemorandumOfAssociation *AccountDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"` 769 // (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. 770 CompanyMinisterialDecree *AccountDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"` 771 // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. 772 CompanyRegistrationVerification *AccountDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"` 773 // One or more documents that demonstrate proof of a company's tax ID. 774 CompanyTaxIDVerification *AccountDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"` 775 // One or more documents showing the company's proof of registration with the national business registry. 776 ProofOfRegistration *AccountDocumentsProofOfRegistrationParams `form:"proof_of_registration"` 777 } 778 779 // AccountExternalAccountParams are the parameters allowed to reference an 780 // external account when creating an account. It should either have Token set 781 // or everything else. 782 type AccountExternalAccountParams struct { 783 Params `form:"*"` 784 AccountNumber *string `form:"account_number"` 785 AccountHolderName *string `form:"account_holder_name"` 786 AccountHolderType *string `form:"account_holder_type"` 787 Country *string `form:"country"` 788 Currency *string `form:"currency"` 789 RoutingNumber *string `form:"routing_number"` 790 Token *string `form:"token"` 791 } 792 793 // AppendTo implements custom encoding logic for AccountExternalAccountParams 794 // so that we can send the special required `object` field up along with the 795 // other specified parameters or the token value. 796 func (p *AccountExternalAccountParams) AppendTo(body *form.Values, keyParts []string) { 797 if p.Token != nil { 798 body.Add(form.FormatKey(keyParts), StringValue(p.Token)) 799 } else { 800 body.Add(form.FormatKey(append(keyParts, "object")), "bank_account") 801 } 802 } 803 804 // AddMetadata adds a new key-value pair to the Metadata. 805 func (p *AccountExternalAccountParams) AddMetadata(key string, value string) { 806 if p.Metadata == nil { 807 p.Metadata = make(map[string]string) 808 } 809 810 p.Metadata[key] = value 811 } 812 813 // Settings specific to Bacs Direct Debit payments. 814 type AccountSettingsBACSDebitPaymentsParams struct { 815 // The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. 816 DisplayName *string `form:"display_name"` 817 } 818 819 // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. 820 type AccountSettingsBrandingParams struct { 821 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. 822 Icon *string `form:"icon"` 823 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. 824 Logo *string `form:"logo"` 825 // A CSS hex color value representing the primary branding color for this account. 826 PrimaryColor *string `form:"primary_color"` 827 // A CSS hex color value representing the secondary branding color for this account. 828 SecondaryColor *string `form:"secondary_color"` 829 } 830 831 // Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). 832 type AccountSettingsCardIssuingTOSAcceptanceParams struct { 833 // The Unix timestamp marking when the account representative accepted the service agreement. 834 Date *int64 `form:"date"` 835 // The IP address from which the account representative accepted the service agreement. 836 IP *string `form:"ip"` 837 // The user agent of the browser from which the account representative accepted the service agreement. 838 UserAgent *string `form:"user_agent"` 839 } 840 841 // Settings specific to the account's use of the Card Issuing product. 842 type AccountSettingsCardIssuingParams struct { 843 // Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). 844 TOSAcceptance *AccountSettingsCardIssuingTOSAcceptanceParams `form:"tos_acceptance"` 845 } 846 847 // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. 848 type AccountSettingsCardPaymentsDeclineOnParams struct { 849 // Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. 850 AVSFailure *bool `form:"avs_failure"` 851 // Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. 852 CVCFailure *bool `form:"cvc_failure"` 853 } 854 855 // Settings specific to card charging on the account. 856 type AccountSettingsCardPaymentsParams struct { 857 // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. 858 DeclineOn *AccountSettingsCardPaymentsDeclineOnParams `form:"decline_on"` 859 // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. 860 StatementDescriptorPrefix *string `form:"statement_descriptor_prefix"` 861 // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. 862 StatementDescriptorPrefixKana *string `form:"statement_descriptor_prefix_kana"` 863 // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. 864 StatementDescriptorPrefixKanji *string `form:"statement_descriptor_prefix_kanji"` 865 } 866 867 // Settings specific to the account's use of Invoices. 868 type AccountSettingsInvoicesParams struct { 869 // The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. 870 DefaultAccountTaxIDs []*string `form:"default_account_tax_ids"` 871 } 872 873 // Settings that apply across payment methods for charging on the account. 874 type AccountSettingsPaymentsParams struct { 875 // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. 876 StatementDescriptor *string `form:"statement_descriptor"` 877 // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). 878 StatementDescriptorKana *string `form:"statement_descriptor_kana"` 879 // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). 880 StatementDescriptorKanji *string `form:"statement_descriptor_kanji"` 881 } 882 883 // Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. 884 type AccountSettingsPayoutsScheduleParams struct { 885 // The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). 886 DelayDays *int64 `form:"delay_days"` 887 DelayDaysMinimum *bool `form:"-"` // See custom AppendTo 888 // How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. 889 Interval *string `form:"interval"` 890 // The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. 891 MonthlyAnchor *int64 `form:"monthly_anchor"` 892 // The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) 893 WeeklyAnchor *string `form:"weekly_anchor"` 894 } 895 896 // AppendTo implements custom encoding logic for AccountSettingsPayoutsScheduleParams. 897 func (p *AccountSettingsPayoutsScheduleParams) AppendTo(body *form.Values, keyParts []string) { 898 if BoolValue(p.DelayDaysMinimum) { 899 body.Add(form.FormatKey(append(keyParts, "delay_days")), "minimum") 900 } 901 } 902 903 // Settings specific to the account's payouts. 904 type AccountSettingsPayoutsParams struct { 905 // A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). 906 DebitNegativeBalances *bool `form:"debit_negative_balances"` 907 // Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. 908 Schedule *AccountSettingsPayoutsScheduleParams `form:"schedule"` 909 // The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. 910 StatementDescriptor *string `form:"statement_descriptor"` 911 } 912 913 // Details on the account's acceptance of the Stripe Treasury Services Agreement. 914 type AccountSettingsTreasuryTOSAcceptanceParams struct { 915 // The Unix timestamp marking when the account representative accepted the service agreement. 916 Date *int64 `form:"date"` 917 // The IP address from which the account representative accepted the service agreement. 918 IP *string `form:"ip"` 919 // The user agent of the browser from which the account representative accepted the service agreement. 920 UserAgent *string `form:"user_agent"` 921 } 922 923 // Settings specific to the account's Treasury FinancialAccounts. 924 type AccountSettingsTreasuryParams struct { 925 // Details on the account's acceptance of the Stripe Treasury Services Agreement. 926 TOSAcceptance *AccountSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"` 927 } 928 929 // Options for customizing how the account functions within Stripe. 930 type AccountSettingsParams struct { 931 // Settings specific to Bacs Direct Debit payments. 932 BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"` 933 // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. 934 Branding *AccountSettingsBrandingParams `form:"branding"` 935 // Settings specific to the account's use of the Card Issuing product. 936 CardIssuing *AccountSettingsCardIssuingParams `form:"card_issuing"` 937 // Settings specific to card charging on the account. 938 CardPayments *AccountSettingsCardPaymentsParams `form:"card_payments"` 939 // Settings specific to the account's use of Invoices. 940 Invoices *AccountSettingsInvoicesParams `form:"invoices"` 941 // Settings that apply across payment methods for charging on the account. 942 Payments *AccountSettingsPaymentsParams `form:"payments"` 943 // Settings specific to the account's payouts. 944 Payouts *AccountSettingsPayoutsParams `form:"payouts"` 945 // Settings specific to the account's Treasury FinancialAccounts. 946 Treasury *AccountSettingsTreasuryParams `form:"treasury"` 947 } 948 949 // Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts. 950 type AccountTOSAcceptanceParams struct { 951 // The Unix timestamp marking when the account representative accepted their service agreement. 952 Date *int64 `form:"date"` 953 // The IP address from which the account representative accepted their service agreement. 954 IP *string `form:"ip"` 955 // The user's service agreement type. 956 ServiceAgreement *string `form:"service_agreement"` 957 // The user agent of the browser from which the account representative accepted their service agreement. 958 UserAgent *string `form:"user_agent"` 959 } 960 961 // Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty. 962 type AccountListParams struct { 963 ListParams `form:"*"` 964 // Only return connected accounts that were created during the given date interval. 965 Created *int64 `form:"created"` 966 // Only return connected accounts that were created during the given date interval. 967 CreatedRange *RangeQueryParams `form:"created"` 968 // Specifies which fields in the response should be expanded. 969 Expand []*string `form:"expand"` 970 } 971 972 // AddExpand appends a new field to expand. 973 func (p *AccountListParams) AddExpand(f string) { 974 p.Expand = append(p.Expand, &f) 975 } 976 977 // A hash of configuration for who pays Stripe fees for product usage on this account. 978 type AccountControllerFeesParams struct { 979 // A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. 980 Payer *string `form:"payer"` 981 } 982 983 // A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. 984 type AccountControllerLossesParams struct { 985 // A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. 986 Payments *string `form:"payments"` 987 } 988 989 // A hash of configuration for Stripe-hosted dashboards. 990 type AccountControllerStripeDashboardParams struct { 991 // Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. 992 Type *string `form:"type"` 993 } 994 995 // A hash of configuration describing the account controller's attributes. 996 type AccountControllerParams struct { 997 // A hash of configuration for who pays Stripe fees for product usage on this account. 998 Fees *AccountControllerFeesParams `form:"fees"` 999 // A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. 1000 Losses *AccountControllerLossesParams `form:"losses"` 1001 // A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. 1002 RequirementCollection *string `form:"requirement_collection"` 1003 // A hash of configuration for Stripe-hosted dashboards. 1004 StripeDashboard *AccountControllerStripeDashboardParams `form:"stripe_dashboard"` 1005 } 1006 1007 // With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious. 1008 // 1009 // Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero. 1010 type AccountRejectParams struct { 1011 Params `form:"*"` 1012 // Specifies which fields in the response should be expanded. 1013 Expand []*string `form:"expand"` 1014 // The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. 1015 Reason *string `form:"reason"` 1016 } 1017 1018 // AddExpand appends a new field to expand. 1019 func (p *AccountRejectParams) AddExpand(f string) { 1020 p.Expand = append(p.Expand, &f) 1021 } 1022 1023 // The applicant's gross annual revenue for its preceding fiscal year. 1024 type AccountBusinessProfileAnnualRevenue struct { 1025 // A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). 1026 Amount int64 `json:"amount"` 1027 // 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). 1028 Currency Currency `json:"currency"` 1029 // The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. 1030 FiscalYearEnd string `json:"fiscal_year_end"` 1031 } 1032 type AccountBusinessProfileMonthlyEstimatedRevenue struct { 1033 // A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). 1034 Amount int64 `json:"amount"` 1035 // 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). 1036 Currency Currency `json:"currency"` 1037 } 1038 1039 // Business information about the account. 1040 type AccountBusinessProfile struct { 1041 // The applicant's gross annual revenue for its preceding fiscal year. 1042 AnnualRevenue *AccountBusinessProfileAnnualRevenue `json:"annual_revenue"` 1043 // An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. 1044 EstimatedWorkerCount int64 `json:"estimated_worker_count"` 1045 // [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. 1046 MCC string `json:"mcc"` 1047 MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenue `json:"monthly_estimated_revenue"` 1048 // The customer-facing business name. 1049 Name string `json:"name"` 1050 // Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. 1051 ProductDescription string `json:"product_description"` 1052 // A publicly available mailing address for sending support issues to. 1053 SupportAddress *Address `json:"support_address"` 1054 // A publicly available email address for sending support issues to. 1055 SupportEmail string `json:"support_email"` 1056 // A publicly available phone number to call with support issues. 1057 SupportPhone string `json:"support_phone"` 1058 // A publicly available website for handling support issues. 1059 SupportURL string `json:"support_url"` 1060 // The business's publicly available website. 1061 URL string `json:"url"` 1062 } 1063 type AccountCapabilities struct { 1064 // The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. 1065 ACSSDebitPayments AccountCapabilityStatus `json:"acss_debit_payments"` 1066 // The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. 1067 AffirmPayments AccountCapabilityStatus `json:"affirm_payments"` 1068 // The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. 1069 AfterpayClearpayPayments AccountCapabilityStatus `json:"afterpay_clearpay_payments"` 1070 // The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. 1071 AmazonPayPayments AccountCapabilityStatus `json:"amazon_pay_payments"` 1072 // The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. 1073 AUBECSDebitPayments AccountCapabilityStatus `json:"au_becs_debit_payments"` 1074 // The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. 1075 BACSDebitPayments AccountCapabilityStatus `json:"bacs_debit_payments"` 1076 // The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. 1077 BancontactPayments AccountCapabilityStatus `json:"bancontact_payments"` 1078 // The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. 1079 BankTransferPayments AccountCapabilityStatus `json:"bank_transfer_payments"` 1080 // The status of the blik payments capability of the account, or whether the account can directly process blik charges. 1081 BLIKPayments AccountCapabilityStatus `json:"blik_payments"` 1082 // The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. 1083 BoletoPayments AccountCapabilityStatus `json:"boleto_payments"` 1084 // The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards 1085 CardIssuing AccountCapabilityStatus `json:"card_issuing"` 1086 // The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. 1087 CardPayments AccountCapabilityStatus `json:"card_payments"` 1088 // The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. 1089 CartesBancairesPayments AccountCapabilityStatus `json:"cartes_bancaires_payments"` 1090 // The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. 1091 CashAppPayments AccountCapabilityStatus `json:"cashapp_payments"` 1092 // The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. 1093 EPSPayments AccountCapabilityStatus `json:"eps_payments"` 1094 // The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. 1095 FPXPayments AccountCapabilityStatus `json:"fpx_payments"` 1096 // The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. 1097 GiropayPayments AccountCapabilityStatus `json:"giropay_payments"` 1098 // The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. 1099 GrabpayPayments AccountCapabilityStatus `json:"grabpay_payments"` 1100 // The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. 1101 IDEALPayments AccountCapabilityStatus `json:"ideal_payments"` 1102 // The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. 1103 IndiaInternationalPayments AccountCapabilityStatus `json:"india_international_payments"` 1104 // The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. 1105 JCBPayments AccountCapabilityStatus `json:"jcb_payments"` 1106 // The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. 1107 KlarnaPayments AccountCapabilityStatus `json:"klarna_payments"` 1108 // The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. 1109 KonbiniPayments AccountCapabilityStatus `json:"konbini_payments"` 1110 // The status of the legacy payments capability of the account. 1111 LegacyPayments AccountCapabilityStatus `json:"legacy_payments"` 1112 // The status of the link_payments capability of the account, or whether the account can directly process Link charges. 1113 LinkPayments AccountCapabilityStatus `json:"link_payments"` 1114 // The status of the MobilepPay capability of the account, or whether the account can directly process MobilePay charges. 1115 MobilepayPayments AccountCapabilityStatus `json:"mobilepay_payments"` 1116 // The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. 1117 OXXOPayments AccountCapabilityStatus `json:"oxxo_payments"` 1118 // The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. 1119 P24Payments AccountCapabilityStatus `json:"p24_payments"` 1120 // The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. 1121 PayNowPayments AccountCapabilityStatus `json:"paynow_payments"` 1122 // The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. 1123 PromptPayPayments AccountCapabilityStatus `json:"promptpay_payments"` 1124 // The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. 1125 RevolutPayPayments AccountCapabilityStatus `json:"revolut_pay_payments"` 1126 // The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. 1127 SEPADebitPayments AccountCapabilityStatus `json:"sepa_debit_payments"` 1128 // The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. 1129 SofortPayments AccountCapabilityStatus `json:"sofort_payments"` 1130 // The status of the Swish capability of the account, or whether the account can directly process Swish payments. 1131 SwishPayments AccountCapabilityStatus `json:"swish_payments"` 1132 // The status of the tax reporting 1099-K (US) capability of the account. 1133 TaxReportingUS1099K AccountCapabilityStatus `json:"tax_reporting_us_1099_k"` 1134 // The status of the tax reporting 1099-MISC (US) capability of the account. 1135 TaxReportingUS1099MISC AccountCapabilityStatus `json:"tax_reporting_us_1099_misc"` 1136 // The status of the transfers capability of the account, or whether your platform can transfer funds to the account. 1137 Transfers AccountCapabilityStatus `json:"transfers"` 1138 // The status of the banking capability, or whether the account can have bank accounts. 1139 Treasury AccountCapabilityStatus `json:"treasury"` 1140 // The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. 1141 USBankAccountACHPayments AccountCapabilityStatus `json:"us_bank_account_ach_payments"` 1142 // The status of the Zip capability of the account, or whether the account can directly process Zip charges. 1143 ZipPayments AccountCapabilityStatus `json:"zip_payments"` 1144 } 1145 1146 // The Kana variation of the company's primary address (Japan only). 1147 type AccountCompanyAddressKana struct { 1148 // City/Ward. 1149 City string `json:"city"` 1150 // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). 1151 Country string `json:"country"` 1152 // Block/Building number. 1153 Line1 string `json:"line1"` 1154 // Building details. 1155 Line2 string `json:"line2"` 1156 // ZIP or postal code. 1157 PostalCode string `json:"postal_code"` 1158 // Prefecture. 1159 State string `json:"state"` 1160 // Town/cho-me. 1161 Town string `json:"town"` 1162 } 1163 1164 // The Kanji variation of the company's primary address (Japan only). 1165 type AccountCompanyAddressKanji struct { 1166 // City/Ward. 1167 City string `json:"city"` 1168 // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). 1169 Country string `json:"country"` 1170 // Block/Building number. 1171 Line1 string `json:"line1"` 1172 // Building details. 1173 Line2 string `json:"line2"` 1174 // ZIP or postal code. 1175 PostalCode string `json:"postal_code"` 1176 // Prefecture. 1177 State string `json:"state"` 1178 // Town/cho-me. 1179 Town string `json:"town"` 1180 } 1181 1182 // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. 1183 type AccountCompanyOwnershipDeclaration struct { 1184 // The Unix timestamp marking when the beneficial owner attestation was made. 1185 Date int64 `json:"date"` 1186 // The IP address from which the beneficial owner attestation was made. 1187 IP string `json:"ip"` 1188 // The user-agent string from the browser where the beneficial owner attestation was made. 1189 UserAgent string `json:"user_agent"` 1190 } 1191 type AccountCompanyVerificationDocument struct { 1192 // The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. 1193 Back *File `json:"back"` 1194 // A user-displayable string describing the verification state of this document. 1195 Details string `json:"details"` 1196 // One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. 1197 DetailsCode AccountCompanyVerificationDocumentDetailsCode `json:"details_code"` 1198 // The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. 1199 Front *File `json:"front"` 1200 } 1201 1202 // Information on the verification state of the company. 1203 type AccountCompanyVerification struct { 1204 Document *AccountCompanyVerificationDocument `json:"document"` 1205 } 1206 type AccountCompany struct { 1207 Address *Address `json:"address"` 1208 // The Kana variation of the company's primary address (Japan only). 1209 AddressKana *AccountCompanyAddressKana `json:"address_kana"` 1210 // The Kanji variation of the company's primary address (Japan only). 1211 AddressKanji *AccountCompanyAddressKanji `json:"address_kanji"` 1212 // Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). 1213 DirectorsProvided bool `json:"directors_provided"` 1214 // Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. 1215 ExecutivesProvided bool `json:"executives_provided"` 1216 // The export license ID number of the company, also referred as Import Export Code (India only). 1217 ExportLicenseID string `json:"export_license_id"` 1218 // The purpose code to use for export transactions (India only). 1219 ExportPurposeCode string `json:"export_purpose_code"` 1220 // The company's legal name. 1221 Name string `json:"name"` 1222 // The Kana variation of the company's legal name (Japan only). 1223 NameKana string `json:"name_kana"` 1224 // The Kanji variation of the company's legal name (Japan only). 1225 NameKanji string `json:"name_kanji"` 1226 // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. 1227 OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"` 1228 // Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). 1229 OwnersProvided bool `json:"owners_provided"` 1230 // The company's phone number (used for verification). 1231 Phone string `json:"phone"` 1232 // The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. 1233 Structure AccountCompanyStructure `json:"structure"` 1234 // Whether the company's business ID number was provided. 1235 TaxIDProvided bool `json:"tax_id_provided"` 1236 // The jurisdiction in which the `tax_id` is registered (Germany-based companies only). 1237 TaxIDRegistrar string `json:"tax_id_registrar"` 1238 // Whether the company's business VAT number was provided. 1239 VATIDProvided bool `json:"vat_id_provided"` 1240 // Information on the verification state of the company. 1241 Verification *AccountCompanyVerification `json:"verification"` 1242 } 1243 type AccountControllerFees struct { 1244 // A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. 1245 Payer AccountControllerFeesPayer `json:"payer"` 1246 } 1247 type AccountControllerLosses struct { 1248 // A value indicating who is liable when this account can't pay back negative balances from payments. 1249 Payments AccountControllerLossesPayments `json:"payments"` 1250 } 1251 type AccountControllerStripeDashboard struct { 1252 // A value indicating the Stripe dashboard this account has access to independent of the Connect application. 1253 Type AccountControllerStripeDashboardType `json:"type"` 1254 } 1255 type AccountController struct { 1256 Fees *AccountControllerFees `json:"fees"` 1257 // `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. 1258 IsController bool `json:"is_controller"` 1259 Losses *AccountControllerLosses `json:"losses"` 1260 // A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. 1261 RequirementCollection AccountControllerRequirementCollection `json:"requirement_collection"` 1262 StripeDashboard *AccountControllerStripeDashboard `json:"stripe_dashboard"` 1263 // The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. 1264 Type AccountControllerType `json:"type"` 1265 } 1266 1267 // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. 1268 type AccountFutureRequirementsAlternative struct { 1269 // Fields that can be provided to satisfy all fields in `original_fields_due`. 1270 AlternativeFieldsDue []string `json:"alternative_fields_due"` 1271 // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. 1272 OriginalFieldsDue []string `json:"original_fields_due"` 1273 } 1274 1275 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 1276 type AccountFutureRequirementsError struct { 1277 // The code for the type of error. 1278 Code string `json:"code"` 1279 // An informative message that indicates the error type and provides additional details about the error. 1280 Reason string `json:"reason"` 1281 // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. 1282 Requirement string `json:"requirement"` 1283 } 1284 type AccountFutureRequirements struct { 1285 // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. 1286 Alternatives []*AccountFutureRequirementsAlternative `json:"alternatives"` 1287 // Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. 1288 CurrentDeadline int64 `json:"current_deadline"` 1289 // Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. 1290 CurrentlyDue []string `json:"currently_due"` 1291 // This is typed as a string for consistency with `requirements.disabled_reason`. 1292 DisabledReason string `json:"disabled_reason"` 1293 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 1294 Errors []*AccountFutureRequirementsError `json:"errors"` 1295 // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. 1296 EventuallyDue []string `json:"eventually_due"` 1297 // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. 1298 PastDue []string `json:"past_due"` 1299 // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. 1300 PendingVerification []string `json:"pending_verification"` 1301 } 1302 1303 // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. 1304 type AccountRequirementsAlternative struct { 1305 // Fields that can be provided to satisfy all fields in `original_fields_due`. 1306 AlternativeFieldsDue []string `json:"alternative_fields_due"` 1307 // Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. 1308 OriginalFieldsDue []string `json:"original_fields_due"` 1309 } 1310 1311 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 1312 type AccountRequirementsError struct { 1313 // The code for the type of error. 1314 Code string `json:"code"` 1315 // An informative message that indicates the error type and provides additional details about the error. 1316 Reason string `json:"reason"` 1317 // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. 1318 Requirement string `json:"requirement"` 1319 } 1320 type AccountRequirements struct { 1321 // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. 1322 Alternatives []*AccountRequirementsAlternative `json:"alternatives"` 1323 // Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. 1324 CurrentDeadline int64 `json:"current_deadline"` 1325 // Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. 1326 CurrentlyDue []string `json:"currently_due"` 1327 // If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. 1328 DisabledReason AccountRequirementsDisabledReason `json:"disabled_reason"` 1329 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 1330 Errors []*AccountRequirementsError `json:"errors"` 1331 // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. 1332 EventuallyDue []string `json:"eventually_due"` 1333 // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. 1334 PastDue []string `json:"past_due"` 1335 // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. 1336 PendingVerification []string `json:"pending_verification"` 1337 } 1338 type AccountSettingsBACSDebitPayments struct { 1339 // The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. 1340 DisplayName string `json:"display_name"` 1341 // The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. 1342 ServiceUserNumber string `json:"service_user_number"` 1343 } 1344 type AccountSettingsBranding struct { 1345 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. 1346 Icon *File `json:"icon"` 1347 // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. 1348 Logo *File `json:"logo"` 1349 // A CSS hex color value representing the primary branding color for this account 1350 PrimaryColor string `json:"primary_color"` 1351 // A CSS hex color value representing the secondary branding color for this account 1352 SecondaryColor string `json:"secondary_color"` 1353 } 1354 type AccountSettingsCardIssuingTOSAcceptance struct { 1355 // The Unix timestamp marking when the account representative accepted the service agreement. 1356 Date int64 `json:"date"` 1357 // The IP address from which the account representative accepted the service agreement. 1358 IP string `json:"ip"` 1359 // The user agent of the browser from which the account representative accepted the service agreement. 1360 UserAgent string `json:"user_agent"` 1361 } 1362 type AccountSettingsCardIssuing struct { 1363 TOSAcceptance *AccountSettingsCardIssuingTOSAcceptance `json:"tos_acceptance"` 1364 } 1365 type AccountSettingsCardPaymentsDeclineOn struct { 1366 // Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. 1367 AVSFailure bool `json:"avs_failure"` 1368 // Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. 1369 CVCFailure bool `json:"cvc_failure"` 1370 } 1371 type AccountSettingsCardPayments struct { 1372 DeclineOn *AccountSettingsCardPaymentsDeclineOn `json:"decline_on"` 1373 // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. 1374 StatementDescriptorPrefix string `json:"statement_descriptor_prefix"` 1375 // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. 1376 StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"` 1377 // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. 1378 StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"` 1379 } 1380 type AccountSettingsDashboard struct { 1381 // The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. 1382 DisplayName string `json:"display_name"` 1383 // The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). 1384 Timezone string `json:"timezone"` 1385 } 1386 type AccountSettingsInvoices struct { 1387 // The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. 1388 DefaultAccountTaxIDs []*TaxID `json:"default_account_tax_ids"` 1389 } 1390 type AccountSettingsPayments struct { 1391 // The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. 1392 StatementDescriptor string `json:"statement_descriptor"` 1393 // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) 1394 StatementDescriptorKana string `json:"statement_descriptor_kana"` 1395 // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) 1396 StatementDescriptorKanji string `json:"statement_descriptor_kanji"` 1397 // The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. 1398 StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"` 1399 // The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. 1400 StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"` 1401 } 1402 type AccountSettingsPayoutsSchedule struct { 1403 // The number of days charges for the account will be held before being paid out. 1404 DelayDays int64 `json:"delay_days"` 1405 // How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. 1406 Interval AccountSettingsPayoutsScheduleInterval `json:"interval"` 1407 // The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. 1408 MonthlyAnchor int64 `json:"monthly_anchor"` 1409 // The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. 1410 WeeklyAnchor string `json:"weekly_anchor"` 1411 } 1412 type AccountSettingsPayouts struct { 1413 // A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`. 1414 DebitNegativeBalances bool `json:"debit_negative_balances"` 1415 Schedule *AccountSettingsPayoutsSchedule `json:"schedule"` 1416 // The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. 1417 StatementDescriptor string `json:"statement_descriptor"` 1418 } 1419 type AccountSettingsSEPADebitPayments struct { 1420 // SEPA creditor identifier that identifies the company making the payment. 1421 CreditorID string `json:"creditor_id"` 1422 } 1423 type AccountSettingsTreasuryTOSAcceptance struct { 1424 // The Unix timestamp marking when the account representative accepted the service agreement. 1425 Date int64 `json:"date"` 1426 // The IP address from which the account representative accepted the service agreement. 1427 IP string `json:"ip"` 1428 // The user agent of the browser from which the account representative accepted the service agreement. 1429 UserAgent string `json:"user_agent"` 1430 } 1431 type AccountSettingsTreasury struct { 1432 TOSAcceptance *AccountSettingsTreasuryTOSAcceptance `json:"tos_acceptance"` 1433 } 1434 1435 // Options for customizing how the account functions within Stripe. 1436 type AccountSettings struct { 1437 BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"` 1438 Branding *AccountSettingsBranding `json:"branding"` 1439 CardIssuing *AccountSettingsCardIssuing `json:"card_issuing"` 1440 CardPayments *AccountSettingsCardPayments `json:"card_payments"` 1441 Dashboard *AccountSettingsDashboard `json:"dashboard"` 1442 Invoices *AccountSettingsInvoices `json:"invoices"` 1443 Payments *AccountSettingsPayments `json:"payments"` 1444 Payouts *AccountSettingsPayouts `json:"payouts"` 1445 SEPADebitPayments *AccountSettingsSEPADebitPayments `json:"sepa_debit_payments"` 1446 Treasury *AccountSettingsTreasury `json:"treasury"` 1447 } 1448 type AccountTOSAcceptance struct { 1449 // The Unix timestamp marking when the account representative accepted their service agreement 1450 Date int64 `json:"date"` 1451 // The IP address from which the account representative accepted their service agreement 1452 IP string `json:"ip"` 1453 // The user's service agreement type 1454 ServiceAgreement AccountTOSAcceptanceServiceAgreement `json:"service_agreement"` 1455 // The user agent of the browser from which the account representative accepted their service agreement 1456 UserAgent string `json:"user_agent"` 1457 } 1458 1459 // This is an object representing a Stripe account. You can retrieve it to see 1460 // properties on the account like its current requirements or if the account is 1461 // enabled to make live charges or receive payouts. 1462 // 1463 // For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that 1464 // account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), 1465 // some properties are only returned for Custom accounts. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts). 1466 type Account struct { 1467 APIResource 1468 // Business information about the account. 1469 BusinessProfile *AccountBusinessProfile `json:"business_profile"` 1470 // The business type. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property is only returned for Custom accounts. 1471 BusinessType AccountBusinessType `json:"business_type"` 1472 Capabilities *AccountCapabilities `json:"capabilities"` 1473 // Whether the account can create live charges. 1474 ChargesEnabled bool `json:"charges_enabled"` 1475 Company *AccountCompany `json:"company"` 1476 Controller *AccountController `json:"controller"` 1477 // The account's country. 1478 Country string `json:"country"` 1479 // Time at which the account was connected. Measured in seconds since the Unix epoch. 1480 Created int64 `json:"created"` 1481 // Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). 1482 DefaultCurrency Currency `json:"default_currency"` 1483 Deleted bool `json:"deleted"` 1484 // Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. 1485 DetailsSubmitted bool `json:"details_submitted"` 1486 // An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. 1487 Email string `json:"email"` 1488 // External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. 1489 ExternalAccounts *AccountExternalAccountList `json:"external_accounts"` 1490 FutureRequirements *AccountFutureRequirements `json:"future_requirements"` 1491 // Unique identifier for the object. 1492 ID string `json:"id"` 1493 // This is an object representing a person associated with a Stripe account. 1494 // 1495 // A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. 1496 // See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. 1497 // 1498 // Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) 1499 Individual *Person `json:"individual"` 1500 // 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. 1501 Metadata map[string]string `json:"metadata"` 1502 // String representing the object's type. Objects of the same type share the same value. 1503 Object string `json:"object"` 1504 // Whether Stripe can send payouts to this account. 1505 PayoutsEnabled bool `json:"payouts_enabled"` 1506 Requirements *AccountRequirements `json:"requirements"` 1507 // Options for customizing how the account functions within Stripe. 1508 Settings *AccountSettings `json:"settings"` 1509 TOSAcceptance *AccountTOSAcceptance `json:"tos_acceptance"` 1510 // The Stripe account type. Can be `standard`, `express`, or `custom`. 1511 Type AccountType `json:"type"` 1512 } 1513 type AccountExternalAccount struct { 1514 ID string `json:"id"` 1515 Type AccountExternalAccountType `json:"object"` 1516 1517 BankAccount *BankAccount `json:"-"` 1518 Card *Card `json:"-"` 1519 } 1520 1521 // AccountList is a list of Accounts as retrieved from a list endpoint. 1522 type AccountList struct { 1523 APIResource 1524 ListMeta 1525 Data []*Account `json:"data"` 1526 } 1527 1528 // AccountExternalAccountList is a list of external accounts that may be either bank 1529 // accounts or cards. 1530 type AccountExternalAccountList struct { 1531 APIResource 1532 ListMeta 1533 1534 // Values contains any external accounts (bank accounts and/or cards) 1535 // currently attached to this account. 1536 Data []*AccountExternalAccount `json:"data"` 1537 } 1538 1539 // UnmarshalJSON handles deserialization of an Account. 1540 // This custom unmarshaling is needed because the resulting 1541 // property may be an id or the full struct if it was expanded. 1542 func (a *Account) UnmarshalJSON(data []byte) error { 1543 if id, ok := ParseID(data); ok { 1544 a.ID = id 1545 return nil 1546 } 1547 1548 type account Account 1549 var v account 1550 if err := json.Unmarshal(data, &v); err != nil { 1551 return err 1552 } 1553 1554 *a = Account(v) 1555 return nil 1556 } 1557 1558 // UnmarshalJSON handles deserialization of an AccountExternalAccount. 1559 // This custom unmarshaling is needed because the specific type of 1560 // AccountExternalAccount it refers to is specified in the JSON 1561 func (a *AccountExternalAccount) UnmarshalJSON(data []byte) error { 1562 if id, ok := ParseID(data); ok { 1563 a.ID = id 1564 return nil 1565 } 1566 1567 type accountExternalAccount AccountExternalAccount 1568 var v accountExternalAccount 1569 if err := json.Unmarshal(data, &v); err != nil { 1570 return err 1571 } 1572 1573 *a = AccountExternalAccount(v) 1574 var err error 1575 1576 switch a.Type { 1577 case AccountExternalAccountTypeBankAccount: 1578 err = json.Unmarshal(data, &a.BankAccount) 1579 case AccountExternalAccountTypeCard: 1580 err = json.Unmarshal(data, &a.Card) 1581 } 1582 return err 1583 }