Square is a payments platform aimed at small and medium businesses that allows them to accept credit card payments and use tablet computers as payment registers for a point-of-sale system. You can use Square to fetch commercial information (transactions, subscriptions ...) about your users who have an e-commerce business or use Square as a payment service provider.
This provider supports these data types:
- Commerce transaction: to retrieve a list of user's transactions.
- Commerce subscription: to retrieve a list of user's subscriptions.
- Commerce dispute: to retrieve a list of user's disputes.
- Commerce transactions insight (Insight): to retrieve a commerce transactions insight.
- Commerce subscriptions insight (Insight): to retrieve a commerce subscriptions insight.
- Commerce disputes insight (Insight): to retrieve a commerce disputes insight.
Connect your Square account
To retrieve commerce data from companies using Square, you have to connect your Square application with Qard. To do that, you'll have to:
- Create a Square application if you already don't have one.
- Retrieve your app credential
- Connect Square to Qard API using your application credentials (
- Test your integration by creating a new synchronization using Square provider.
Create a Square application:
If you already have an application, you can skip this part.
- Go to Square Developer sign in page and create a new account.
- On applications page, create a new application (Once create an application, you cannot delete it.).
- Click save, and that's it!
Retrieve your app credential:
- Open Sqaure Developer portal and choose your application.
- Select Sandbox tab if use want to use your app credentials in test mode, or Production tab if you want to use them in live mode.
- In the left sidebar menu, select Oauth and add the Qard callback URI (
https://api.qardfinance.com/callback/square) in the redirect URL input.
- Click save.
Link your Square application to Qard API:
1. Update Square provider credentials:
- is_sandbox: The type of the account (sandbox or live)
- app_id: Your application ID
- app_secret: Your application secret
- oauth_secret: Your application oauth secret
2. Settings Square provider:
3. Enable Square provider:
Test Square integration:
You can test Square integration by creating a new data connection for your user.
After finishing the connecting process by your user, and after validating that the data connection status is CONNECTED, you can run a new synchronization.
To verify that you are receiving your user's commerce data, check out these endpoints: