#cmchen_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1212667543181860885
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!
how to use ReturnUrl in PaymentIntent when Confirm=true
when i set Confirm=true stripe will auto AUTOMATIC Capture the money
i think there is no need to use ReturnUrl
why ReturnUrl is required, can't be nmpey
empty
Not necessary! The payment method provider might request for additional action. For example, the card issuer might ask for 3DS authentication. When such scenario happens, customer will have to perform 3DS. After the authentication is completed, Stripe will redirect the customer to the return_url specified
return_url is required when confirm: true as mentioned in the doc: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-return_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
what will return when PaymentIntentCreate ask for 3DS authentication
PaymentIntentCreateParams params = PaymentIntentCreateParams.builder()
.setAmount(amount.multiply(new BigDecimal("100")).longValue())
.setCurrency("USD")
.setReceiptEmail(session.getEmail())
.setDescription(rfid == null ? ("wallet top up" + session.getIdentifier()) : ("rfid top up:" + rfid))
.setPaymentMethod(paymentMethods)
.setCustomer(session.getStripeId())
.setConfirm(true)
.setReturnUrl("http://xxx.com")
.setCaptureMethod(PaymentIntentCreateParams.CaptureMethod.AUTOMATIC)
.build();
PaymentIntent paymentIntent = null;
try {
paymentIntent = PaymentIntent.create(params);
} catch (StripeException e) {
log.error("stripe payment error:" + e.getMessage());
return Result.error(e.getMessage());
}
The payment intent status will be in requires_action and next_action hash will be present. Your client side should use stripe.handleNextAction() to complete 3DS: https://docs.stripe.com/js/payment_intents/handle_next_action
this is my code i use a payment methods to dedute money in my backend
customer no need to confirm again
Card issuing bank may still ask for 3DS regardless whether the request is sent from your backend
Your integration should handle additional action when such scenario happens
ok tks