github.com/stripe/stripe-go/v76@v76.25.0/bankaccount.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 "strconv" 13 ) 14 15 // The type of entity that holds the account. This can be either `individual` or `company`. 16 type BankAccountAccountHolderType string 17 18 // List of values that BankAccountAccountHolderType can take 19 const ( 20 BankAccountAccountHolderTypeCompany BankAccountAccountHolderType = "company" 21 BankAccountAccountHolderTypeIndividual BankAccountAccountHolderType = "individual" 22 ) 23 24 // A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. 25 type BankAccountAvailablePayoutMethod string 26 27 // List of values that BankAccountAvailablePayoutMethod can take 28 const ( 29 BankAccountAvailablePayoutMethodInstant BankAccountAvailablePayoutMethod = "instant" 30 BankAccountAvailablePayoutMethodStandard BankAccountAvailablePayoutMethod = "standard" 31 ) 32 33 // The code for the type of error. 34 type BankAccountFutureRequirementsErrorCode string 35 36 // List of values that BankAccountFutureRequirementsErrorCode can take 37 const ( 38 BankAccountFutureRequirementsErrorCodeInvalidAddressCityStatePostalCode BankAccountFutureRequirementsErrorCode = "invalid_address_city_state_postal_code" 39 BankAccountFutureRequirementsErrorCodeInvalidAddressHighwayContractBox BankAccountFutureRequirementsErrorCode = "invalid_address_highway_contract_box" 40 BankAccountFutureRequirementsErrorCodeInvalidAddressPrivateMailbox BankAccountFutureRequirementsErrorCode = "invalid_address_private_mailbox" 41 BankAccountFutureRequirementsErrorCodeInvalidBusinessProfileName BankAccountFutureRequirementsErrorCode = "invalid_business_profile_name" 42 BankAccountFutureRequirementsErrorCodeInvalidBusinessProfileNameDenylisted BankAccountFutureRequirementsErrorCode = "invalid_business_profile_name_denylisted" 43 BankAccountFutureRequirementsErrorCodeInvalidCompanyNameDenylisted BankAccountFutureRequirementsErrorCode = "invalid_company_name_denylisted" 44 BankAccountFutureRequirementsErrorCodeInvalidDOBAgeOverMaximum BankAccountFutureRequirementsErrorCode = "invalid_dob_age_over_maximum" 45 BankAccountFutureRequirementsErrorCodeInvalidDOBAgeUnder18 BankAccountFutureRequirementsErrorCode = "invalid_dob_age_under_18" 46 BankAccountFutureRequirementsErrorCodeInvalidDOBAgeUnderMinimum BankAccountFutureRequirementsErrorCode = "invalid_dob_age_under_minimum" 47 BankAccountFutureRequirementsErrorCodeInvalidProductDescriptionLength BankAccountFutureRequirementsErrorCode = "invalid_product_description_length" 48 BankAccountFutureRequirementsErrorCodeInvalidProductDescriptionURLMatch BankAccountFutureRequirementsErrorCode = "invalid_product_description_url_match" 49 BankAccountFutureRequirementsErrorCodeInvalidRepresentativeCountry BankAccountFutureRequirementsErrorCode = "invalid_representative_country" 50 BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorBusinessMismatch BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_business_mismatch" 51 BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorDenylisted BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_denylisted" 52 BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorLength BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_length" 53 BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorPrefixDenylisted BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_prefix_denylisted" 54 BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorPrefixMismatch BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_prefix_mismatch" 55 BankAccountFutureRequirementsErrorCodeInvalidStreetAddress BankAccountFutureRequirementsErrorCode = "invalid_street_address" 56 BankAccountFutureRequirementsErrorCodeInvalidTaxID BankAccountFutureRequirementsErrorCode = "invalid_tax_id" 57 BankAccountFutureRequirementsErrorCodeInvalidTaxIDFormat BankAccountFutureRequirementsErrorCode = "invalid_tax_id_format" 58 BankAccountFutureRequirementsErrorCodeInvalidTOSAcceptance BankAccountFutureRequirementsErrorCode = "invalid_tos_acceptance" 59 BankAccountFutureRequirementsErrorCodeInvalidURLDenylisted BankAccountFutureRequirementsErrorCode = "invalid_url_denylisted" 60 BankAccountFutureRequirementsErrorCodeInvalidURLFormat BankAccountFutureRequirementsErrorCode = "invalid_url_format" 61 BankAccountFutureRequirementsErrorCodeInvalidURLLength BankAccountFutureRequirementsErrorCode = "invalid_url_length" 62 BankAccountFutureRequirementsErrorCodeInvalidURLWebPresenceDetected BankAccountFutureRequirementsErrorCode = "invalid_url_web_presence_detected" 63 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteBusinessInformationMismatch BankAccountFutureRequirementsErrorCode = "invalid_url_website_business_information_mismatch" 64 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteEmpty BankAccountFutureRequirementsErrorCode = "invalid_url_website_empty" 65 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteInaccessible BankAccountFutureRequirementsErrorCode = "invalid_url_website_inaccessible" 66 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteInaccessibleGeoblocked BankAccountFutureRequirementsErrorCode = "invalid_url_website_inaccessible_geoblocked" 67 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteInaccessiblePasswordProtected BankAccountFutureRequirementsErrorCode = "invalid_url_website_inaccessible_password_protected" 68 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncomplete BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete" 69 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteCancellationPolicy BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_cancellation_policy" 70 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteCustomerServiceDetails BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_customer_service_details" 71 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteLegalRestrictions BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_legal_restrictions" 72 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteRefundPolicy BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_refund_policy" 73 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteReturnPolicy BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_return_policy" 74 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteTermsAndConditions BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_terms_and_conditions" 75 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteUnderConstruction BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_under_construction" 76 BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteOther BankAccountFutureRequirementsErrorCode = "invalid_url_website_other" 77 BankAccountFutureRequirementsErrorCodeInvalidValueOther BankAccountFutureRequirementsErrorCode = "invalid_value_other" 78 BankAccountFutureRequirementsErrorCodeVerificationDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_directors_mismatch" 79 BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountFutureRequirementsErrorCode = "verification_document_address_mismatch" 80 BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountFutureRequirementsErrorCode = "verification_document_address_missing" 81 BankAccountFutureRequirementsErrorCodeVerificationDocumentCorrupt BankAccountFutureRequirementsErrorCode = "verification_document_corrupt" 82 BankAccountFutureRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_country_not_supported" 83 BankAccountFutureRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_document_directors_mismatch" 84 BankAccountFutureRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountFutureRequirementsErrorCode = "verification_document_dob_mismatch" 85 BankAccountFutureRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountFutureRequirementsErrorCode = "verification_document_duplicate_type" 86 BankAccountFutureRequirementsErrorCodeVerificationDocumentExpired BankAccountFutureRequirementsErrorCode = "verification_document_expired" 87 BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedCopy BankAccountFutureRequirementsErrorCode = "verification_document_failed_copy" 88 BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedGreyscale BankAccountFutureRequirementsErrorCode = "verification_document_failed_greyscale" 89 BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedOther BankAccountFutureRequirementsErrorCode = "verification_document_failed_other" 90 BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedTestMode BankAccountFutureRequirementsErrorCode = "verification_document_failed_test_mode" 91 BankAccountFutureRequirementsErrorCodeVerificationDocumentFraudulent BankAccountFutureRequirementsErrorCode = "verification_document_fraudulent" 92 BankAccountFutureRequirementsErrorCodeVerificationDocumentIDNumberMismatch BankAccountFutureRequirementsErrorCode = "verification_document_id_number_mismatch" 93 BankAccountFutureRequirementsErrorCodeVerificationDocumentIDNumberMissing BankAccountFutureRequirementsErrorCode = "verification_document_id_number_missing" 94 BankAccountFutureRequirementsErrorCodeVerificationDocumentIncomplete BankAccountFutureRequirementsErrorCode = "verification_document_incomplete" 95 BankAccountFutureRequirementsErrorCodeVerificationDocumentInvalid BankAccountFutureRequirementsErrorCode = "verification_document_invalid" 96 BankAccountFutureRequirementsErrorCodeVerificationDocumentIssueOrExpiryDateMissing BankAccountFutureRequirementsErrorCode = "verification_document_issue_or_expiry_date_missing" 97 BankAccountFutureRequirementsErrorCodeVerificationDocumentManipulated BankAccountFutureRequirementsErrorCode = "verification_document_manipulated" 98 BankAccountFutureRequirementsErrorCodeVerificationDocumentMissingBack BankAccountFutureRequirementsErrorCode = "verification_document_missing_back" 99 BankAccountFutureRequirementsErrorCodeVerificationDocumentMissingFront BankAccountFutureRequirementsErrorCode = "verification_document_missing_front" 100 BankAccountFutureRequirementsErrorCodeVerificationDocumentNameMismatch BankAccountFutureRequirementsErrorCode = "verification_document_name_mismatch" 101 BankAccountFutureRequirementsErrorCodeVerificationDocumentNameMissing BankAccountFutureRequirementsErrorCode = "verification_document_name_missing" 102 BankAccountFutureRequirementsErrorCodeVerificationDocumentNationalityMismatch BankAccountFutureRequirementsErrorCode = "verification_document_nationality_mismatch" 103 BankAccountFutureRequirementsErrorCodeVerificationDocumentNotReadable BankAccountFutureRequirementsErrorCode = "verification_document_not_readable" 104 BankAccountFutureRequirementsErrorCodeVerificationDocumentNotSigned BankAccountFutureRequirementsErrorCode = "verification_document_not_signed" 105 BankAccountFutureRequirementsErrorCodeVerificationDocumentNotUploaded BankAccountFutureRequirementsErrorCode = "verification_document_not_uploaded" 106 BankAccountFutureRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountFutureRequirementsErrorCode = "verification_document_photo_mismatch" 107 BankAccountFutureRequirementsErrorCodeVerificationDocumentTooLarge BankAccountFutureRequirementsErrorCode = "verification_document_too_large" 108 BankAccountFutureRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_type_not_supported" 109 BankAccountFutureRequirementsErrorCodeVerificationExtraneousDirectors BankAccountFutureRequirementsErrorCode = "verification_extraneous_directors" 110 BankAccountFutureRequirementsErrorCodeVerificationFailedAddressMatch BankAccountFutureRequirementsErrorCode = "verification_failed_address_match" 111 BankAccountFutureRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountFutureRequirementsErrorCode = "verification_failed_business_iec_number" 112 BankAccountFutureRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountFutureRequirementsErrorCode = "verification_failed_document_match" 113 BankAccountFutureRequirementsErrorCodeVerificationFailedIDNumberMatch BankAccountFutureRequirementsErrorCode = "verification_failed_id_number_match" 114 BankAccountFutureRequirementsErrorCodeVerificationFailedKeyedIdentity BankAccountFutureRequirementsErrorCode = "verification_failed_keyed_identity" 115 BankAccountFutureRequirementsErrorCodeVerificationFailedKeyedMatch BankAccountFutureRequirementsErrorCode = "verification_failed_keyed_match" 116 BankAccountFutureRequirementsErrorCodeVerificationFailedNameMatch BankAccountFutureRequirementsErrorCode = "verification_failed_name_match" 117 BankAccountFutureRequirementsErrorCodeVerificationFailedOther BankAccountFutureRequirementsErrorCode = "verification_failed_other" 118 BankAccountFutureRequirementsErrorCodeVerificationFailedRepresentativeAuthority BankAccountFutureRequirementsErrorCode = "verification_failed_representative_authority" 119 BankAccountFutureRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountFutureRequirementsErrorCode = "verification_failed_residential_address" 120 BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_match" 121 BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_not_issued" 122 BankAccountFutureRequirementsErrorCodeVerificationMissingDirectors BankAccountFutureRequirementsErrorCode = "verification_missing_directors" 123 BankAccountFutureRequirementsErrorCodeVerificationMissingExecutives BankAccountFutureRequirementsErrorCode = "verification_missing_executives" 124 BankAccountFutureRequirementsErrorCodeVerificationMissingOwners BankAccountFutureRequirementsErrorCode = "verification_missing_owners" 125 BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountFutureRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations" 126 ) 127 128 // The code for the type of error. 129 type BankAccountRequirementsErrorCode string 130 131 // List of values that BankAccountRequirementsErrorCode can take 132 const ( 133 BankAccountRequirementsErrorCodeInvalidAddressCityStatePostalCode BankAccountRequirementsErrorCode = "invalid_address_city_state_postal_code" 134 BankAccountRequirementsErrorCodeInvalidAddressHighwayContractBox BankAccountRequirementsErrorCode = "invalid_address_highway_contract_box" 135 BankAccountRequirementsErrorCodeInvalidAddressPrivateMailbox BankAccountRequirementsErrorCode = "invalid_address_private_mailbox" 136 BankAccountRequirementsErrorCodeInvalidBusinessProfileName BankAccountRequirementsErrorCode = "invalid_business_profile_name" 137 BankAccountRequirementsErrorCodeInvalidBusinessProfileNameDenylisted BankAccountRequirementsErrorCode = "invalid_business_profile_name_denylisted" 138 BankAccountRequirementsErrorCodeInvalidCompanyNameDenylisted BankAccountRequirementsErrorCode = "invalid_company_name_denylisted" 139 BankAccountRequirementsErrorCodeInvalidDOBAgeOverMaximum BankAccountRequirementsErrorCode = "invalid_dob_age_over_maximum" 140 BankAccountRequirementsErrorCodeInvalidDOBAgeUnder18 BankAccountRequirementsErrorCode = "invalid_dob_age_under_18" 141 BankAccountRequirementsErrorCodeInvalidDOBAgeUnderMinimum BankAccountRequirementsErrorCode = "invalid_dob_age_under_minimum" 142 BankAccountRequirementsErrorCodeInvalidProductDescriptionLength BankAccountRequirementsErrorCode = "invalid_product_description_length" 143 BankAccountRequirementsErrorCodeInvalidProductDescriptionURLMatch BankAccountRequirementsErrorCode = "invalid_product_description_url_match" 144 BankAccountRequirementsErrorCodeInvalidRepresentativeCountry BankAccountRequirementsErrorCode = "invalid_representative_country" 145 BankAccountRequirementsErrorCodeInvalidStatementDescriptorBusinessMismatch BankAccountRequirementsErrorCode = "invalid_statement_descriptor_business_mismatch" 146 BankAccountRequirementsErrorCodeInvalidStatementDescriptorDenylisted BankAccountRequirementsErrorCode = "invalid_statement_descriptor_denylisted" 147 BankAccountRequirementsErrorCodeInvalidStatementDescriptorLength BankAccountRequirementsErrorCode = "invalid_statement_descriptor_length" 148 BankAccountRequirementsErrorCodeInvalidStatementDescriptorPrefixDenylisted BankAccountRequirementsErrorCode = "invalid_statement_descriptor_prefix_denylisted" 149 BankAccountRequirementsErrorCodeInvalidStatementDescriptorPrefixMismatch BankAccountRequirementsErrorCode = "invalid_statement_descriptor_prefix_mismatch" 150 BankAccountRequirementsErrorCodeInvalidStreetAddress BankAccountRequirementsErrorCode = "invalid_street_address" 151 BankAccountRequirementsErrorCodeInvalidTaxID BankAccountRequirementsErrorCode = "invalid_tax_id" 152 BankAccountRequirementsErrorCodeInvalidTaxIDFormat BankAccountRequirementsErrorCode = "invalid_tax_id_format" 153 BankAccountRequirementsErrorCodeInvalidTOSAcceptance BankAccountRequirementsErrorCode = "invalid_tos_acceptance" 154 BankAccountRequirementsErrorCodeInvalidURLDenylisted BankAccountRequirementsErrorCode = "invalid_url_denylisted" 155 BankAccountRequirementsErrorCodeInvalidURLFormat BankAccountRequirementsErrorCode = "invalid_url_format" 156 BankAccountRequirementsErrorCodeInvalidURLLength BankAccountRequirementsErrorCode = "invalid_url_length" 157 BankAccountRequirementsErrorCodeInvalidURLWebPresenceDetected BankAccountRequirementsErrorCode = "invalid_url_web_presence_detected" 158 BankAccountRequirementsErrorCodeInvalidURLWebsiteBusinessInformationMismatch BankAccountRequirementsErrorCode = "invalid_url_website_business_information_mismatch" 159 BankAccountRequirementsErrorCodeInvalidURLWebsiteEmpty BankAccountRequirementsErrorCode = "invalid_url_website_empty" 160 BankAccountRequirementsErrorCodeInvalidURLWebsiteInaccessible BankAccountRequirementsErrorCode = "invalid_url_website_inaccessible" 161 BankAccountRequirementsErrorCodeInvalidURLWebsiteInaccessibleGeoblocked BankAccountRequirementsErrorCode = "invalid_url_website_inaccessible_geoblocked" 162 BankAccountRequirementsErrorCodeInvalidURLWebsiteInaccessiblePasswordProtected BankAccountRequirementsErrorCode = "invalid_url_website_inaccessible_password_protected" 163 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncomplete BankAccountRequirementsErrorCode = "invalid_url_website_incomplete" 164 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteCancellationPolicy BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_cancellation_policy" 165 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteCustomerServiceDetails BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_customer_service_details" 166 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteLegalRestrictions BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_legal_restrictions" 167 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteRefundPolicy BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_refund_policy" 168 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteReturnPolicy BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_return_policy" 169 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteTermsAndConditions BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_terms_and_conditions" 170 BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteUnderConstruction BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_under_construction" 171 BankAccountRequirementsErrorCodeInvalidURLWebsiteOther BankAccountRequirementsErrorCode = "invalid_url_website_other" 172 BankAccountRequirementsErrorCodeInvalidValueOther BankAccountRequirementsErrorCode = "invalid_value_other" 173 BankAccountRequirementsErrorCodeVerificationDirectorsMismatch BankAccountRequirementsErrorCode = "verification_directors_mismatch" 174 BankAccountRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountRequirementsErrorCode = "verification_document_address_mismatch" 175 BankAccountRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountRequirementsErrorCode = "verification_document_address_missing" 176 BankAccountRequirementsErrorCodeVerificationDocumentCorrupt BankAccountRequirementsErrorCode = "verification_document_corrupt" 177 BankAccountRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountRequirementsErrorCode = "verification_document_country_not_supported" 178 BankAccountRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountRequirementsErrorCode = "verification_document_directors_mismatch" 179 BankAccountRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountRequirementsErrorCode = "verification_document_dob_mismatch" 180 BankAccountRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountRequirementsErrorCode = "verification_document_duplicate_type" 181 BankAccountRequirementsErrorCodeVerificationDocumentExpired BankAccountRequirementsErrorCode = "verification_document_expired" 182 BankAccountRequirementsErrorCodeVerificationDocumentFailedCopy BankAccountRequirementsErrorCode = "verification_document_failed_copy" 183 BankAccountRequirementsErrorCodeVerificationDocumentFailedGreyscale BankAccountRequirementsErrorCode = "verification_document_failed_greyscale" 184 BankAccountRequirementsErrorCodeVerificationDocumentFailedOther BankAccountRequirementsErrorCode = "verification_document_failed_other" 185 BankAccountRequirementsErrorCodeVerificationDocumentFailedTestMode BankAccountRequirementsErrorCode = "verification_document_failed_test_mode" 186 BankAccountRequirementsErrorCodeVerificationDocumentFraudulent BankAccountRequirementsErrorCode = "verification_document_fraudulent" 187 BankAccountRequirementsErrorCodeVerificationDocumentIDNumberMismatch BankAccountRequirementsErrorCode = "verification_document_id_number_mismatch" 188 BankAccountRequirementsErrorCodeVerificationDocumentIDNumberMissing BankAccountRequirementsErrorCode = "verification_document_id_number_missing" 189 BankAccountRequirementsErrorCodeVerificationDocumentIncomplete BankAccountRequirementsErrorCode = "verification_document_incomplete" 190 BankAccountRequirementsErrorCodeVerificationDocumentInvalid BankAccountRequirementsErrorCode = "verification_document_invalid" 191 BankAccountRequirementsErrorCodeVerificationDocumentIssueOrExpiryDateMissing BankAccountRequirementsErrorCode = "verification_document_issue_or_expiry_date_missing" 192 BankAccountRequirementsErrorCodeVerificationDocumentManipulated BankAccountRequirementsErrorCode = "verification_document_manipulated" 193 BankAccountRequirementsErrorCodeVerificationDocumentMissingBack BankAccountRequirementsErrorCode = "verification_document_missing_back" 194 BankAccountRequirementsErrorCodeVerificationDocumentMissingFront BankAccountRequirementsErrorCode = "verification_document_missing_front" 195 BankAccountRequirementsErrorCodeVerificationDocumentNameMismatch BankAccountRequirementsErrorCode = "verification_document_name_mismatch" 196 BankAccountRequirementsErrorCodeVerificationDocumentNameMissing BankAccountRequirementsErrorCode = "verification_document_name_missing" 197 BankAccountRequirementsErrorCodeVerificationDocumentNationalityMismatch BankAccountRequirementsErrorCode = "verification_document_nationality_mismatch" 198 BankAccountRequirementsErrorCodeVerificationDocumentNotReadable BankAccountRequirementsErrorCode = "verification_document_not_readable" 199 BankAccountRequirementsErrorCodeVerificationDocumentNotSigned BankAccountRequirementsErrorCode = "verification_document_not_signed" 200 BankAccountRequirementsErrorCodeVerificationDocumentNotUploaded BankAccountRequirementsErrorCode = "verification_document_not_uploaded" 201 BankAccountRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountRequirementsErrorCode = "verification_document_photo_mismatch" 202 BankAccountRequirementsErrorCodeVerificationDocumentTooLarge BankAccountRequirementsErrorCode = "verification_document_too_large" 203 BankAccountRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountRequirementsErrorCode = "verification_document_type_not_supported" 204 BankAccountRequirementsErrorCodeVerificationExtraneousDirectors BankAccountRequirementsErrorCode = "verification_extraneous_directors" 205 BankAccountRequirementsErrorCodeVerificationFailedAddressMatch BankAccountRequirementsErrorCode = "verification_failed_address_match" 206 BankAccountRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountRequirementsErrorCode = "verification_failed_business_iec_number" 207 BankAccountRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountRequirementsErrorCode = "verification_failed_document_match" 208 BankAccountRequirementsErrorCodeVerificationFailedIDNumberMatch BankAccountRequirementsErrorCode = "verification_failed_id_number_match" 209 BankAccountRequirementsErrorCodeVerificationFailedKeyedIdentity BankAccountRequirementsErrorCode = "verification_failed_keyed_identity" 210 BankAccountRequirementsErrorCodeVerificationFailedKeyedMatch BankAccountRequirementsErrorCode = "verification_failed_keyed_match" 211 BankAccountRequirementsErrorCodeVerificationFailedNameMatch BankAccountRequirementsErrorCode = "verification_failed_name_match" 212 BankAccountRequirementsErrorCodeVerificationFailedOther BankAccountRequirementsErrorCode = "verification_failed_other" 213 BankAccountRequirementsErrorCodeVerificationFailedRepresentativeAuthority BankAccountRequirementsErrorCode = "verification_failed_representative_authority" 214 BankAccountRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountRequirementsErrorCode = "verification_failed_residential_address" 215 BankAccountRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountRequirementsErrorCode = "verification_failed_tax_id_match" 216 BankAccountRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountRequirementsErrorCode = "verification_failed_tax_id_not_issued" 217 BankAccountRequirementsErrorCodeVerificationMissingDirectors BankAccountRequirementsErrorCode = "verification_missing_directors" 218 BankAccountRequirementsErrorCodeVerificationMissingExecutives BankAccountRequirementsErrorCode = "verification_missing_executives" 219 BankAccountRequirementsErrorCodeVerificationMissingOwners BankAccountRequirementsErrorCode = "verification_missing_owners" 220 BankAccountRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations" 221 ) 222 223 // For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. 224 // 225 // For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. 226 type BankAccountStatus string 227 228 // List of values that BankAccountStatus can take 229 const ( 230 BankAccountStatusErrored BankAccountStatus = "errored" 231 BankAccountStatusNew BankAccountStatus = "new" 232 BankAccountStatusValidated BankAccountStatus = "validated" 233 BankAccountStatusVerificationFailed BankAccountStatus = "verification_failed" 234 BankAccountStatusVerified BankAccountStatus = "verified" 235 ) 236 237 // Delete a specified external account for a given account. 238 type BankAccountParams struct { 239 Params `form:"*"` 240 Customer *string `form:"-"` // Included in URL 241 // Token is a token referencing an external account like one returned from 242 // Stripe.js. 243 Token *string `form:"-"` // Included in URL 244 // Account is the identifier of the parent account under which bank 245 // accounts are nested. 246 Account *string `form:"-"` // Included in URL 247 // The name of the person or business that owns the bank account. 248 AccountHolderName *string `form:"account_holder_name"` 249 // The type of entity that holds the account. This can be either `individual` or `company`. 250 AccountHolderType *string `form:"account_holder_type"` 251 // The account number for the bank account, in string form. Must be a checking account. 252 AccountNumber *string `form:"account_number"` 253 // The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. 254 AccountType *string `form:"account_type"` 255 // City/District/Suburb/Town/Village. 256 AddressCity *string `form:"address_city"` 257 // Billing address country, if provided when creating card. 258 AddressCountry *string `form:"address_country"` 259 // Address line 1 (Street address/PO Box/Company name). 260 AddressLine1 *string `form:"address_line1"` 261 // Address line 2 (Apartment/Suite/Unit/Building). 262 AddressLine2 *string `form:"address_line2"` 263 // State/County/Province/Region. 264 AddressState *string `form:"address_state"` 265 // ZIP or postal code. 266 AddressZip *string `form:"address_zip"` 267 // The country in which the bank account is located. 268 Country *string `form:"country"` 269 // The currency the bank account is in. This must be a country/currency pairing that [Stripe supports](https://stripe.com/docs/payouts). 270 Currency *string `form:"currency"` 271 // When set to true, this becomes the default external account for its currency. 272 DefaultForCurrency *bool `form:"default_for_currency"` 273 // Documents that may be submitted to satisfy various informational requests. 274 Documents *BankAccountDocumentsParams `form:"documents"` 275 // Specifies which fields in the response should be expanded. 276 Expand []*string `form:"expand"` 277 // Two digit number representing the card's expiration month. 278 ExpMonth *string `form:"exp_month"` 279 // Four digit number representing the card's expiration year. 280 ExpYear *string `form:"exp_year"` 281 // 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`. 282 Metadata map[string]string `form:"metadata"` 283 // Cardholder name. 284 Name *string `form:"name"` 285 // The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. 286 RoutingNumber *string `form:"routing_number"` 287 // ID is used when tokenizing a bank account for shared customers 288 ID *string `form:"*"` 289 } 290 291 // AppendToAsSourceOrExternalAccount appends the given BankAccountParams as 292 // either a source or external account. 293 // 294 // It may look like an AppendTo from the form package, but it's not, and is 295 // only used in the special case where we use `bankaccount.New`. It's needed 296 // because we have some weird encoding logic here that can't be handled by the 297 // form package (and it's special enough that it wouldn't be desirable to have 298 // it do so). 299 // 300 // This is not a pattern that we want to push forward, and this largely exists 301 // because the bank accounts endpoint is a little unusual. There is one other 302 // resource like it, which is cards. 303 func (p *BankAccountParams) AppendToAsSourceOrExternalAccount(body *form.Values) { 304 // Rather than being called in addition to `AppendTo`, this function 305 // *replaces* `AppendTo`, so we must also make sure to handle the encoding 306 // of `Params` so metadata and the like is included in the encoded payload. 307 form.AppendTo(body, p.Params) 308 309 isCustomer := p.Customer != nil 310 311 var sourceType string 312 if isCustomer { 313 sourceType = "source" 314 } else { 315 sourceType = "external_account" 316 } 317 318 // Use token (if exists) or a dictionary containing a user’s bank account details. 319 if p.Token != nil { 320 body.Add(sourceType, StringValue(p.Token)) 321 322 if p.DefaultForCurrency != nil { 323 body.Add( 324 "default_for_currency", 325 strconv.FormatBool(BoolValue(p.DefaultForCurrency)), 326 ) 327 } 328 } else { 329 body.Add(sourceType+"[object]", "bank_account") 330 body.Add(sourceType+"[country]", StringValue(p.Country)) 331 body.Add(sourceType+"[account_number]", StringValue(p.AccountNumber)) 332 body.Add(sourceType+"[currency]", StringValue(p.Currency)) 333 334 // These are optional and the API will fail if we try to send empty 335 // values in for them, so make sure to check that they're actually set 336 // before encoding them. 337 if p.AccountHolderName != nil { 338 body.Add(sourceType+"[account_holder_name]", StringValue(p.AccountHolderName)) 339 } 340 341 if p.AccountHolderType != nil { 342 body.Add(sourceType+"[account_holder_type]", StringValue(p.AccountHolderType)) 343 } 344 345 if p.RoutingNumber != nil { 346 body.Add(sourceType+"[routing_number]", StringValue(p.RoutingNumber)) 347 } 348 349 if p.DefaultForCurrency != nil { 350 body.Add(sourceType+"[default_for_currency]", strconv.FormatBool(BoolValue(p.DefaultForCurrency))) 351 } 352 } 353 } 354 355 // AddExpand appends a new field to expand. 356 func (p *BankAccountParams) AddExpand(f string) { 357 p.Expand = append(p.Expand, &f) 358 } 359 360 // AddMetadata adds a new key-value pair to the Metadata. 361 func (p *BankAccountParams) AddMetadata(key string, value string) { 362 if p.Metadata == nil { 363 p.Metadata = make(map[string]string) 364 } 365 366 p.Metadata[key] = value 367 } 368 369 // 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 bank account that displays the last 4 digits of the account number, either a statement or a voided check. 370 type BankAccountDocumentsBankAccountOwnershipVerificationParams struct { 371 // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. 372 Files []*string `form:"files"` 373 } 374 375 // Documents that may be submitted to satisfy various informational requests. 376 type BankAccountDocumentsParams struct { 377 // 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 bank account that displays the last 4 digits of the account number, either a statement or a voided check. 378 BankAccountOwnershipVerification *BankAccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"` 379 } 380 type BankAccountListParams struct { 381 ListParams `form:"*"` 382 // The identifier of the parent account under which the bank accounts are 383 // nested. Either Account or Customer should be populated. 384 Account *string `form:"-"` // Included in URL 385 // The identifier of the parent customer under which the bank accounts are 386 // nested. Either Account or Customer should be populated. 387 Customer *string `form:"-"` // Included in URL 388 } 389 390 // AppendTo implements custom encoding logic for BankAccountListParams 391 // so that we can send the special required `object` field up along with the 392 // other specified parameters. 393 func (p *BankAccountListParams) AppendTo(body *form.Values, keyParts []string) { 394 body.Add(form.FormatKey(append(keyParts, "object")), "bank_account") 395 } 396 397 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 398 type BankAccountFutureRequirementsError struct { 399 // The code for the type of error. 400 Code BankAccountFutureRequirementsErrorCode `json:"code"` 401 // An informative message that indicates the error type and provides additional details about the error. 402 Reason string `json:"reason"` 403 // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. 404 Requirement string `json:"requirement"` 405 } 406 407 // Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. 408 type BankAccountFutureRequirements struct { 409 // Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. 410 CurrentlyDue []string `json:"currently_due"` 411 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 412 Errors []*BankAccountFutureRequirementsError `json:"errors"` 413 // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. 414 PastDue []string `json:"past_due"` 415 // 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`. 416 PendingVerification []string `json:"pending_verification"` 417 } 418 419 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 420 type BankAccountRequirementsError struct { 421 // The code for the type of error. 422 Code BankAccountRequirementsErrorCode `json:"code"` 423 // An informative message that indicates the error type and provides additional details about the error. 424 Reason string `json:"reason"` 425 // The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. 426 Requirement string `json:"requirement"` 427 } 428 429 // Information about the requirements for the bank account, including what information needs to be collected. 430 type BankAccountRequirements struct { 431 // Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. 432 CurrentlyDue []string `json:"currently_due"` 433 // Fields that are `currently_due` and need to be collected again because validation or verification failed. 434 Errors []*BankAccountRequirementsError `json:"errors"` 435 // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. 436 PastDue []string `json:"past_due"` 437 // 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`. 438 PendingVerification []string `json:"pending_verification"` 439 } 440 441 // These bank accounts are payment methods on `Customer` objects. 442 // 443 // On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer 444 // destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). 445 // They can be bank accounts or debit cards as well, and are documented in the links above. 446 // 447 // Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers) 448 type BankAccount struct { 449 APIResource 450 // The ID of the account that the bank account is associated with. 451 Account *Account `json:"account"` 452 // The name of the person or business that owns the bank account. 453 AccountHolderName string `json:"account_holder_name"` 454 // The type of entity that holds the account. This can be either `individual` or `company`. 455 AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"` 456 // The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. 457 AccountType string `json:"account_type"` 458 // A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. 459 AvailablePayoutMethods []BankAccountAvailablePayoutMethod `json:"available_payout_methods"` 460 // Name of the bank associated with the routing number (e.g., `WELLS FARGO`). 461 BankName string `json:"bank_name"` 462 // Two-letter ISO code representing the country the bank account is located in. 463 Country string `json:"country"` 464 // Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. 465 Currency Currency `json:"currency"` 466 // The ID of the customer that the bank account is associated with. 467 Customer *Customer `json:"customer"` 468 // Whether this bank account is the default external account for its currency. 469 DefaultForCurrency bool `json:"default_for_currency"` 470 Deleted bool `json:"deleted"` 471 // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 472 Fingerprint string `json:"fingerprint"` 473 // Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. 474 FutureRequirements *BankAccountFutureRequirements `json:"future_requirements"` 475 // Unique identifier for the object. 476 ID string `json:"id"` 477 // The last four digits of the bank account number. 478 Last4 string `json:"last4"` 479 // 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. 480 Metadata map[string]string `json:"metadata"` 481 // String representing the object's type. Objects of the same type share the same value. 482 Object string `json:"object"` 483 // Information about the requirements for the bank account, including what information needs to be collected. 484 Requirements *BankAccountRequirements `json:"requirements"` 485 // The routing transit number for the bank account. 486 RoutingNumber string `json:"routing_number"` 487 // For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. 488 // 489 // For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. 490 Status BankAccountStatus `json:"status"` 491 } 492 493 // BankAccountList is a list of BankAccounts as retrieved from a list endpoint. 494 type BankAccountList struct { 495 APIResource 496 ListMeta 497 Data []*BankAccount `json:"data"` 498 } 499 500 // UnmarshalJSON handles deserialization of a BankAccount. 501 // This custom unmarshaling is needed because the resulting 502 // property may be an id or the full struct if it was expanded. 503 func (b *BankAccount) UnmarshalJSON(data []byte) error { 504 if id, ok := ParseID(data); ok { 505 b.ID = id 506 return nil 507 } 508 509 type bankAccount BankAccount 510 var v bankAccount 511 if err := json.Unmarshal(data, &v); err != nil { 512 return err 513 } 514 515 *b = BankAccount(v) 516 return nil 517 }