Stripe redirect_uri will not work
Asked Answered
C

5

8

I have connected stripe standalone accounts to platform accounts before. In fact I did it a week back and it worked perfectly. But somehow this time it simply will not work even though I am following exactly the same procedure. I have set the redirect_uri to a url that is valid. This is what the link looks for my stripe connect button in my platform's page looks like

https://connect.stripe.com/oauth/authorize?response_type=code&client_id=platform_clientid&scope=read_write&redirect_uri=redirecturi

I have also set the redirect_uri to exactly the same thing in the stripe dashboard of the stand alone account. But when I click on the stripe button instead of being taken to the stripe site I end up with an error like this.

{
 "error": "invalid_redirect_uri",
  "error_description": "Invalid redirect URI 'redirecturi'. Ensure this 
   uri exactly matches one of the uris specified in your application 
   settings",
  "state": null
}

I am not even taken to the stripe site to log into my standalone account. As soon as I click the button I get this error. And the redirect_uri url is valid and points to a page that exists. Can anyone help?

Coma answered 27/4, 2017 at 6:29 Comment(0)
M
14

This error indicates that you are explicitly telling Stripe to redirect to a specific URL and that URL is not in the list of whitelisted redirect URLs in your platform settings.

When you redirect your user to Stripe, you send them to a URL that looks like this:

https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_XXXX&scope=read_write

If you have multiple redirect URLs, you would explicitly tell Stripe where to send the user back by adding an extra GET parameter with the name redirect_uri. You must be setting this at the moment and that URL does not exactly match one of the URLs in your settings so Stripe is returning an error.

You need to double check the URLs you've set in Stripe and make sure that you use one from the list or add a new one to the list.

Malemute answered 27/4, 2017 at 8:9 Comment(1)
koopajah thanks. The problem was I added the redirect_uri to the stripe stand alone account's application settings instead of the platform account's application settings. It works now.Coma
L
3

One thing to double check here as well: make sure you save the redirect URL in both test mode and in live mode. Stripe has separate settings for each, and the settings are only exposed when you change from live to test, or vice vera.

Liana answered 1/11, 2018 at 0:41 Comment(1)
thank you, this was in my case. You saved a lot of my time!Confucian
D
2

Redirect URL set to your stripe connect setting.

Stripe->setting->connect settings

See:

enter image description here

Disreputable answered 10/8, 2021 at 7:41 Comment(1)
There is no connect settings under stripe - > settings menu.Monongahela
W
1

There is an option available in Connect Onboarding Under the OAuth tab to add the whitelisted redirect URI. You require to have the admin rights to add this, developer role is not able to do this.

Stripe->setting->connect settings->Connect Onboarding#OAuth

enter image description here

Weary answered 8/6, 2024 at 17:17 Comment(0)
G
-1

I had this error with a WordPress multivendor marketplace that I have. Whenever a client tries to connect with stripe, the site redirects them to this error:

{"error":{"message":"Invalid request: Invalid redirect URI 'https://yoursite.com/dashboard/settings/payment-manage-dokan-stripe-connect/'. Ensure this uri exactly matches one of the uris specified in your application settings"}}

I solved it by going into the settings, connect settings, and then at the bottom, you should see a button saying "add URI" and I just copied and pasted 'https://yoursite.com/dashboard/settings/payment-manage-dokan-stripe-connect/' and that was it. Hopes it helps

Grigg answered 15/8, 2022 at 16:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.