I have a Stripe app with an OAuth flow, now if you see this Stripe documentation: . It mentions "If you use the Test mode link, you can set redirect_uri
to localhost.
So that's what I did this is my stripe test mode link: *A*****cF****j*****YZg/authorize?client_id=ca_****************Gbs&redirect_uri=http://localhost:3000/api/stripe/install
Now the problem is it gives below error:
You will ask if you have added that localhost
URL to Stripe manifest.json
file, Yes I have tried to add it, but when I try to publish that app it gives me this error:
invalid stripe-app.json:
[
{
"uri": "http://localhost:3000/api/stripe/install",
"errors": [
"expect valid HTTPS URI. got http://localhost:3000/api/stripe/install"
]
}
]
On the other hand, I have added it to the onboarding options:
I have a Stripe app with an OAuth flow, now if you see this Stripe documentation: https://docs.stripe/connect/testing#using-oauth. It mentions "If you use the Test mode link, you can set redirect_uri
to localhost.
So that's what I did this is my stripe test mode link: https://marketplace.stripe/oauth/v2/channellink*A*****cF****j*****YZg/authorize?client_id=ca_****************Gbs&redirect_uri=http://localhost:3000/api/stripe/install
Now the problem is it gives below error:
You will ask if you have added that localhost
URL to Stripe manifest.json
file, Yes I have tried to add it, but when I try to publish that app it gives me this error:
invalid stripe-app.json:
[
{
"uri": "http://localhost:3000/api/stripe/install",
"errors": [
"expect valid HTTPS URI. got http://localhost:3000/api/stripe/install"
]
}
]
On the other hand, I have added it to the onboarding options: https://dashboard.stripe/test/settings/connect/onboarding-options/oauth
Share Improve this question edited Jan 29 at 19:15 Visrut asked Jan 29 at 19:03 VisrutVisrut 6811 gold badge8 silver badges32 bronze badges1 Answer
Reset to default 1Those docs about OAuth are not applicable to Stripe Apps, only Connect platforms (and are no longer a recommended integration pattern).
The OAuth docs for Stripe Apps do not discuss using localhost
as this is not really applicable. Installing the app via OAuth, even in test mode, must be handle via a public redirect URI.
https://docs.stripe/stripe-apps/api-authentication/oauth#create-install-link
When developing the app, OAuth is not used. Instead, you enable the App on your own account via preview using the CLI.
https://docs.stripe/stripe-apps/create-app#preview-app