#mathias-henriksen_error

1 messages ยท Page 1 of 1 (latest)

brazen nexusBOT
#

๐Ÿ‘‹ 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/1372181037865766983

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

thorny harbor
#

๐Ÿ‘‹ happy to help

#

would you mind sharing the request ID that failed?

elder goblet
#

Yes, I will see what I can find ๐Ÿ‘

#

I cannot see any failed requests related to the attempted purchase, but this is the last request related to the customer that got the PayPal issue: req_v73inK9RNPzPSM

thorny harbor
#

where did you see that error message at?

elder goblet
#

under Developers -> Logs in the Stripe Dashboard

thorny harbor
#

I'm not talking about req_v73inK9RNPzPSM I'm talking about

    "error": {
        "message": "Sorry, something went wrong. We've already been notified of the problem, but if you need any help, you can reach us as support.stripe.com/contact."
        "type: "api_error"
    }
}
elder goblet
#

ohh yeah, that shows up when clicking "Agree & Continue" in PayPal

thorny harbor
#

oh I see now

#

is this a new issue? or have you been seen this for a period of time?

elder goblet
#

It is new. PayPal is currently working in production where we do subscription creation on the server and payment confirmation on the client.
In our new solution we do subscription creation and payment confirmation on the server, and then do stripe.handleNextAction on the client. This is when PayPal stops working

thorny harbor
#

would you mind redoing a test now?

#

just wanted to check whether this is still happening or just an intermitent thing?

elder goblet
#

Okay, I just have to set up an account to test

#

alright I tried to pay now and got the same error

thorny harbor
#

ok taking a look thanks for confirming

elder goblet
#

great, thanks

brazen nexusBOT
short hollow
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away. I just want to make sure I'm understanding correctly. You're using handleNextAction from Stripe.js after confirming the intent server-side?

Do you have the ID of a payment that you were processing when this happened? Like the ID of a Payment Intent or related Invoice object?

elder goblet
#

Hey! Yes here is the related payment intent: pi_3ROZwXJxfuw0gUii0L65DbOP

#

Invoice: in_1ROZwXJxfuw0gUiiu2DgYvlN

short hollow
#

I see this is all in livemode, are you seeing this same issue in testmode or your sandbox account?

elder goblet
#

No when I try to use paypal in testmode I don't get redirected to paypal, the payment just goes through

short hollow
#

Gotcha, thank you for that insight. Unfortunately, that makes it hard for me to try to test and reproduce, but it does give me some insight to approach this differently.

elder goblet
#

Alright nice

short hollow
#

And to confirm, are you using handleNextAction from Stripe.js, or are you redirecting your customers to the URL we provide in the response to the confirmation request?

elder goblet
#

The former, like this:

const onCreateSubscriptionSuccess = async (createSubscriptionData: StripeCreateSubscriptionResponse) => {
if (!stripe) {
throw new Error();
}

if (createSubscriptionData.status === "requires_action") {
  const { error, paymentIntent } = await stripe.handleNextAction({
    clientSecret: createSubscriptionData.clientSecret,
  });
  if (error) {
    throw new Error(error.message);
  } else {
    onPaymentSuccess(createSubscriptionData.subscription);
  }
} else {
  onPaymentSuccess(createSubscriptionData.subscription);
}

};

#

I tried again now and it worked. Did you do anything?

Before I tried I changed the return_url to the same URL that I am using to test the integration. So, unless it was fixed from your side it seems that the domain of the return_url needs to be the same as the one you are redirected from. In that case, this info would be handy to have in the error message ๐Ÿ˜…

short hollow
#

I did not change anything, and I agree if that is a requirement it should absolutely be documented.

elder goblet
#

Well, at least it seems to be working now! Thanks for your time ๐Ÿ˜„

short hollow
#

I'm glad to hear it's working again, and I really appreciate you sharing your firndings! We're going to keep looking into this no our side and see if our docs need to be updated.