Hi,
It is unclear to me how to handle the signup process for new users. When a merchant select an app from the marketplace and clicks on the “Get Started” Button, they get directed to the app website. But the url doesn’t have any info about the merchant that is trying to signup and try the app. I’m not sure how to handle the signup process if I don’t have the merchant id or something like that. Also, it is required for authenticating the new merchant account.
Could you please provide some context on this. Thanks
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Get Started
https://developer.squareup.com/docs/get-started/create-an-account
In-App Payments SDK Quickstart
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
When a merchant selects an app from the marketplace and clicks on the “Get Started” button, they are directed to the app’s website. At this point, you should initiate the OAuth flow to authenticate the merchant and get their consent for the necessary permissions.
The OAuth flow involves redirecting the merchant to Square’s OAuth page. The merchant will then be asked to log in to their Square account and grant your application the permissions it requests. After the merchant grants these permissions, Square will redirect them back to your application with a code in the URL.
Your application can exchange this code for an access token using the ObtainToken endpoint. This access token is unique to the merchant and can be used to make API calls on their behalf. The response from the ObtainToken call also includes the merchant ID, which you can use to identify the merchant in your system.
Remember to securely store the access token as it allows your application to access and modify the merchant’s Square account.
This answer was reviewed by @Bryan-Square.