#akdj16
1 messages ยท Page 1 of 1 (latest)
Hi there!
Can you give more details about your setup in this new thread?
Also what exactly doesn't work? Do you get an error message?
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
yes, I firstly created a setupIntent in the backend with payload payment_method_types= ['bancontact'], then in the frontend, i called the method confirmSetupIntent with paymentMethodType="bancontact" and paymentMethodData= { billingDetails: { name: ibanOwner, email: userEmail } } . When the payment method is attached to the customer. I tried to retrieve the setupIntent + expand 'latest_attempt' in the backend side with the setupIntentId provided by the frontend. And finally I get the error when I tried to update the customer with invoice_settings: { default_payment_method: generated_sepa_debit, },. the generated_sepa_debit is found in latest_attempt
the error message is : "PaymentMethods of type 'bancontact' cannot be saved to customers."
do you have the request id?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
yesterday I tested with the customer cus_Mo1adwkTtYvOEs, request which failed is req_v6smwgtH7tmnY3
do you have a request id where it was successful previously?
I can try to find one
cus_MdXCTSVkrsqENs this customer created one month ago
req_MVlSjlb7eRKgNS this request?
let me check
sorry for keeping you waiting
req_MVlSjlb7eRKgNS this is SEPA and not bancontact
but on the customer page, when i open the pm_1LuGMQC36MeQgD8rDfAxi6cU, it shows a setupintent id seti_1LuGMJC36MeQgD8rwWZpDEjn , inside it is indicated as bancontact
I meant that you're attaching the Bancontact instead of the underlying generated SEPA
just give me a moment please
Hi there ๐ apologies for the delay. I'm jumping in to lend a hand, please bear with me a moment while I catch up on the context here.
Actually, the PaymentMethod pm_1M4PdkC36MeQgD8rX3IkwpVd generated a sepa_debit one pm_1M4PdtC36MeQgD8rEAlvVd1A which is already attached to the customer cus_Mo1adwkTtYvOEs.
When creating the setup_intent you've already specified the customerId :
https://dashboard.stripe.com/test/logs/req_nEyQW8Aj7VHHEq
So the resulting PaymentMethod, will be attached automatically to the customer, no need to call attach API later
In other words, now you can use the attached PaymentMethod to the customer cus_Mo1adwkTtYvOEs for your payments
This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
@languid comet
hi
How can I help?
about the message of @dense burrow I know it is attached to the customer, but what I want is to set it as default payment method
because customer can also have card as the same time attached
Sure, then call this API: https://stripe.com/docs/api/customers/update
And set invoice_settings.default_payment_method to the pm_xxx object you desire.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes, that what I did, and I received the error message is : "PaymentMethods of type 'bancontact' cannot be saved to customers."
You need to use the SEPA Debit object (pm_1M4PdtC36MeQgD8rEAlvVd1A), generated by the flow. That's the reusable part of the Bancontact payment method: https://stripe.com/docs/payments/bancontact/save-during-payment#:~:text=You can use,and validated IBAN.
I am a little confused now, why it is a paymentIntent? and not a setupIntent that have to be created?
I used the generated_sepa_debit in the setupIntent instead of the one in the paymentIntent
Can you please share which pm_xxx object you want to set as the default?
Who mentioned a Payment Intent?
in the document
pm_1M4PdkC36MeQgD8rX3IkwpVd to set
You can ignore that for the most part. I was highlighting that Bancontact PMs are single use and can't be saved/attached to a Customer object. Which is why you saw this error:
"PaymentMethods of type 'bancontact' cannot be saved to customers."
The part of that doc I was highlighting is that when you use a Setup Intent with Bancontact, we generate a re-usueable SEPA PM object which is attached to the related customer.
So yeah, that won't work as its Bancontact โ they're single use so can't be saved to a customer
pm_1M4PdtC36MeQgD8rEAlvVd1A is the re-usable SEPA debit PM that is already attached to cus_Mo1adwkTtYvOEs
oh ok so can I set the pm_1M4PdtC36MeQgD8rEAlvVd1A re-usable sepa as default?
Yes, exactly!
do you mean that the generated_sepa_debit is pm_1M4PdtC36MeQgD8rEAlvVd1A ?
I need to reverify in my code, I think in my code, it shows that the generated_sepa_debit is pm_1M4PdkC36MeQgD8rX3IkwpVd
Yes, that's the re-usable SEPA PM we generated from the Bancontact details
pm_1M4PdtC36MeQgD8rEAlvVd1A is definitely the SEPA PM
ok
let me try again
because I wrote something like:
latestAttempt.payment_method_details.type === PaymentMethod.Bancontact
? (latestAttempt.payment_method_details.bancontact
?.generated_sepa_debit as string)
: (setupIntent.payment_method as string),
but I get the error
in the payload of update customer
Can you share a req_xxx ID?
I need to rerun the workflow with a new customer, i will be back in a few minutes
Nice! Glad you could solve it. ynoj is out right now but I will pass that on. Thanks for the update!