Closed i18n-now closed 1 month ago
Hi @i18n-now , thanks for the issue! The error codes you mentioned are only used by the Sources API, which is deprecated. As mentioned on the page you linked, Stripe recommends using the Payment Intents and PaymentMethods APIs to integrate with SEPA Direct Debit - you can follow the instructions at https://stripe.com/docs/payments/sepa-debit/accept-a-payment. Would that alternative work for you?
@anniel-stripe
I'm using the PaymentMethods API with setup_intent
As shown in the screenshot below, select Euro payment, set setup Indent , enter only one letter here and submit.
, there will be a return a setup_intent with last_setup_error containing errors invalid_owner_name
you can get seti_1OYkYPBS6OLyeF2QCeCxPRQP
in test mode for example
{"id":"seti_1OYkYPBS6OLyeF2QCeCxPRQP","object":"setup_intent","application":null,"automatic_payment_methods":{"allow_redirects":"always","enabled":true},"cancellation_reason":null,"client_secret":"seti_1OYkYPBS6OLyeF2QCeCxPRQP_secret_PNVZGM5M8qfpA0i53eDlw0fyf2F339n","created":1705303553,"customer":"cus_PNShbMnVo5L9gd","description":null,"flow_directions":null,"last_setup_error":{"code":"invalid_owner_name","message":"The name provided in billing_details must have between 3 and 100 characters.","payment_method":{"id":"pm_1OYkYQBS6OLyeF2QuMGbBv15","object":"payment_method","bancontact":{},"billing_details":{"address":{"city":null,"country":null,"line1":null,"line2":null,"postal_code":null,"state":null},"email":"i18n.site@gmail.com","name":"22","phone":null},"created":1705303554,"customer":null,"livemode":false,"metadata":{},"type":"bancontact"},"type":"invalid_request_error"},"latest_attempt":"setatt_1OYkYQBS6OLyeF2QzU7iIAGD","livemode":false,"mandate":null,"metadata":{},"next_action":null,"on_behalf_of":null,"payment_method":null,"payment_method_configuration_details":{"id":"pmc_1OREowBS6OLyeF2Qf9TEW9H4","parent":null},"payment_method_options":{"card":{"mandate_options":null,"network":null,"request_three_d_secure":"automatic"}},"payment_method_types":["card","bancontact","ideal","sepa_debit","sofort","link"],"single_use_mandate":null,"status":"requires_payment_method","usage":"off_session"}"
Apologies for my confusion @i18n-now , I double checked with the team behind SEPA Direct Debit and it seems these errors are shared between the deprecated Sources API and the PaymentIntents and PaymentMethods APIs. You're right that these are missing from the spec, I'll look into getting these added.
Looking forward to adding it soon, because missing these errors will cause the rust program to crash. (The rust program is the code generated based on this configuration)
Hello @i18n-now -- this should now be resolved, as the SEPA Direct Debit API will now return errors that are documented in the spec. Thanks again for flagging this!
https://stripe.com/docs/sources/sepa-debit
Source creation for SEPA Direct Debit payments may return any of the following errors: invalid_owner_name invalid_bank_account_iban processing_error payment_method_not_available
seems loss invalid_owner_name\invalid_bank_account_iban
will cause error in rust https://github.com/arlyon/async-stripe/issues/479
Describe the bug
crash
To Reproduce
parse
Expected behavior
crash on this setup indent
Code snippets
OS
mac
Rust version
cargo 1.77.0-nightly (3e428a38a 2024-01-09)
Library version
v0.29.0
API version
latest