#blueish

1 messages · Page 1 of 1 (latest)

clever bayBOT
sweet jay
#

👋 Bancontact is a single-use payment method so you won't be able to use setup_future_usage with this payment method type (correction: you'll need to use SEPA if you want to use setup_future_usage with Bancontact)

oblique lava
#

then why the Payment Element is showing this as an option when I use SetupIntent to initialize payment element?

#

can't payment element automatically filter out payment methods that can't be used for future use?

sweet jay
#

You should be able to use bancontact as a payment method type for SetupIntents as long as SEPA is enabled for your account

oblique lava
#

let me check the id

#

request-id: req_dWbeBW50xylZFa

sweet jay
#

Okay, I see the PaymentMethod was created as part of a SetupIntent and you're attempting to attach the PaymentMethod to a customer after having confirmed the SetupIntent

#

Is there a particular reason why the customer ID wasn't included in the call to create the SetupIntent?

oblique lava
#

I thought im including the customer id

Is there a problem here?

Map<String, Object> automaticPaymentMethods = new HashMap<>();
automaticPaymentMethods.put("enabled", true);

    Map<String, Object> setupIntentParams = new HashMap<>();
    setupIntentParams.put("customer", customer.getId());
    setupIntentParams.put("automatic_payment_methods", automaticPaymentMethods);

    SetupIntent setupIntent = SetupIntent.create(setupIntentParams, requestOptions);
sweet jay
#

Ah, okay, you're right. I see you passed a customer ID when creating the SetupIntent. That means there shouldn't be a reason to make a separate call to attach the PaymentMethod to this same customer.

oblique lava
#

does that mean that after the redirection to the return url and if it's succeed then it's already attached?

sweet jay
#

Yep, it should be!

clever bayBOT