#rockllo-ach-java
1 messages · Page 1 of 1 (latest)
Hello, what kind of bank payments are you working with? ACH?
Yes sorry, ACH - I enabled financial connections. Was hoping that would allow for the instant verification. i think that is there cos I see the options to pick the Test institution (dev mode) etc. Its the link to enter bank details manually I am unsure on
The flow if they go that route, what we should look for. Would rather turn that option off if possi le
You can restrict what verification methods are allowed by setting the payment_method_options.us_bank_account.verification_method parameter on the payment intent. If you set it to instant the payment element will only allow instant verifications
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-us_bank_account-verification_method
Great thank you. Then as the API examples don't go into detail. Woudl it be this:
PaymentIntentCreateParams.Builder builder = PaymentIntentCreateParams.builder()
.setAmount(amountCents)
.setCurrency("usd")
.setAutomaticPaymentMethods(
PaymentIntentCreateParams.AutomaticPaymentMethods
.builder()
.setEnabled(true)
.build()
)
.setPaymentMethodOptions(
PaymentIntentCreateParams.PaymentMethodOptions???
)
dunno if I am in the right realm as the Builder way isn't as well known to me
Good question. I am not that familiar with the builder syntax myself. Looking to see if we have samples here and will get back to you on that
rockllo-ach-java
👋 taking over
https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API#web-create-payment-intent we have some clear examples of how to use the builder pattern here. Did you have a look?
Okay the server calmed down so I was able to write an end to end example: ```PaymentIntentCreateParams params = PaymentIntentCreateParams.builder()
.setAmount(1099L)
.setCurrency("usd")
.setSetupFutureUsage(PaymentIntentCreateParams.SetupFutureUsage.OFF_SESSION)
.setAutomaticPaymentMethods(
PaymentIntentCreateParams.AutomaticPaymentMethods.builder()
.setEnabled(true)
.build())
.setPaymentMethodOptions(
PaymentIntentCreateParams.PaymentMethodOptions.builder()
.setUsBankAccount(
PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.builder()
.setVerificationMethod(PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod.INSTANT)
.build())
.build())
.build();
PaymentIntent paymentIntent = PaymentIntent.create(params);```