#Dooing-3DSecure
1 messages ยท Page 1 of 1 (latest)
I am not following what you described, but generally Backend create PaymentIntent first, then forward its client_secret to frontend to confirm.
Np, good luck ๐
public String createPaymentMethodIntent(String stripeCustomerId, String stripePaymentMethodId) {
try {
PaymentIntent paymentIntent = PaymentIntent.create(PaymentIntentCreateParams.builder()
.build(), requestOptions);
return paymentIntent.getClientSecret();
} catch (StripeException e) {
throw new StripeExternalException(e);
}
}
just this, right?
Or something like offline usage to add as I once did with the setup intent?
.setCustomer(stripeCustomerId) maybe????
First code block looks correct. It's described in this Doc https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
For offline usage and SetupIntent we have a different Doc https://stripe.com/docs/payments/save-and-reuse?platform=web
Checked your page and the diagram of the flow. It says nothing of how the created card would be assigned to an actual stripe customer.
I assume - I have to add:
.setCustomer(stripeCustomerId) to the PaymentIntent call
Yes that works too. But you would also need setup_future_usage
It's explained on another flow (sorry) https://stripe.com/docs/payments/save-during-payment
Hey, I am stepping down for the day. If you have other questions, feel free to ask in the channel!