#_api

1 messages ยท Page 1 of 1 (latest)

olive forgeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ 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.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— 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/1329097757603922013

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

oak fern
#

PaymentIntentCreateParams.Builder createParams = PaymentIntentCreateParams.builder()
.setAmount(total)
.setDescription(description)
.setConfirm(true)
.setCurrency(currency.getCurrencyCode())
.setPaymentMethod(paymentMethodId)
.setReturnUrl(returnUrl)
this is the paymentintent i use

#

the return url is well formatted also

chilly wyvern
#

๐Ÿ‘‹
According to the requestid you've shared, your integration isn't sending any params.

#

You need to set return_url

oak fern
#

.setReturnUrl(returnUrl)
don't set a return_url?
i'm usiing java to create the payment intennt

chilly wyvern
#

Then how are you using the createParams? Have you had a chance to debug and see if you are pssing it correctly to the API call.

#
PaymentIntentConfirmParams params =
  PaymentIntentConfirmParams.builder()
    .setPaymentMethod("pm_card_visa")
    .setReturnUrl("https://www.example.com")
    .build();
PaymentIntent paymentIntent = resource.confirm(params);
oak fern
#

yea i build the param
i need to pass the params to the confirm? isn't creating the payment intent with the
PaymentIntentCreateParams.Builder createParams = PaymentIntentCreateParams.builder()
.setAmount(total)
.setDescription(description)
.setConfirm(true)
.setCurrency(currency.getCurrencyCode())
.setPaymentMethod(paymentMethodId)
.setReturnUrl(returnUrl)
PaymentIntent.create(intentCreateParams); enough?

chilly wyvern
#

Ah I see what's happening.

#

You were creating the PaymentIntent with confirm:true and a return_url already.

olive forgeBOT
chilly wyvern
#

The PaymentIntent status is in requires_action and the Customer needs to complete the 3ds action in order to proceed. You don't need to call confirm API.

oak fern
#

i check if its in requires_action before i confirm
if (intent.getStatus().equals("requires_action") && intent.getNextAction().getType().equals("use_stripe_sdk")) {
throw new ThreeDSecureRequiredException(intent);
}

#

PaymentIntentCreateParams.Builder createParams = PaymentIntentCreateParams.builder()
.setAmount(total)
.setDescription(description)
.setConfirm(true)
.setCurrency(currency.getCurrencyCode())
.setPaymentMethod(paymentMethodId)
.setReturnUrl(returnUrl)
.setConfirmationMethod(PaymentIntentCreateParams.ConfirmationMethod.MANUAL).build
this is the full list of params

#

if thats would help

chilly wyvern
#

No, according to the requestId you've shared req_qPQOx93BaZdIcH you are confirming the PaymentIntent despite it's in a requires_action

unique berry
oak fern
#

oh thanks @unique berry any idea why the next action is redirect_to_url? my integration with stripe is in page iframe

unique berry
#

It's beacuse you pass return_url

oak fern
#

well if i don't pass a return_url it will fail saying it needs a return_url

unique berry
#

Yeah because you have redirect based payemnt methods enabled. Is the goal to disable redirect based payment methods?

oak fern
#

well thanks for this info
this will help me solve the issue

#

thanks