Connect Business Central to your Square Account
This is pre-release documentation for an API in public beta and is subject to change.
This topic continues the configuration process for the Dynamics 365 Business Central Payments extension and walks through the steps to connect Business Central to Square. Ensure that you have completed steps 1–3 to establish a connection between Business Central and Azure before completing the following steps.
When taking payments in Business Central through the Square Payments extension, you need a Square account to hold any payments received before they are transferred to your bank account on file. If you already have a Square account, you can skip to Step 5: Create a developer application.
In your browser, navigate to https://squareup.com/signup to create a Square account.
Enter and confirm your email address, create a password, and then choose Continue.
The account setup process walks you through a number of questions regarding your business type, where you do business, how you plan to take payments, and verification of your identity. Many of these steps can be skipped when setting up and testing a sandbox environment, but you must complete identity verification and enter valid bank account details to take payments and transfer your Square balance in production. This can be done at any time in the Seller Dashboard.
When complete, your Square account is ready to use and you have access to the Seller Dashboard.
Sign in to the Developer Dashboard.
Create a new application and name it something descriptive like "Business Central Terminal Integration".
Choose Save. Your new application appears in the Developer Dashboard.
Open the application.
In the left pane, choose OAuth.
If you are setting up the Square Sandbox environment for testing, skip to the next step. After you have completed Sandbox testing, followed the steps to connect Business Central to Azure, and are now creating a new application to take payments in production, switch your environment from Sandbox to Production.
Set the Redirect URL value to the URL saved in step 3.12.
Copy your application ID and application secret to the Square Settings page in Business Central. You can navigate to the Square Settings page by searching “Square Settings” in the Business Central search bar.
Return to the Developer Dashboard.
In the left pane, choose Webhooks, and then choose Subscriptions.
Choose Add subscription, and then enter a descriptive name in Webhook name.
In the URL box, add the same notification URL saved in step 3.12. This should also match the redirect URL saved in step 5.6. You can find this URL listed as Webhook URL on the Square Settings page.
Scroll down the list of events and select the boxes for the following events:
You can select additional events depending on which webhooks you care about. Note that increasing the number of notification events might increase the cost of your Azure resources.
Choose Save. The new webhook subscriptions appear on the Webhook subscriptions page in the Developer Dashboard.
You can test your webhooks by choosing the webhook subscription name, and then choosing More and Send test event. If you receive a
200response, the Azure function is working as expected.
Navigate to the Square Settings page in Business Central by searching for "Square" in the Business Central Search.
Choose the Authorize button, which takes you to the Square OAuth flow. Sign in to your Square account and review the relevant permissions.
Choose Allow. You are redirected to the callback URL saved in step 5.6. When complete, the resulting page displays an “Authorization successfully passed” message. Return to the Square Settings page in Business Central. The Authorization status is now Authorized.
Now that the Square Payments extension and webhooks have been configured and your Square account is authorized, you are ready to collect payments with Dynamics 365 Business Central.
If you need more assistance, contact Developer Support or ask for help in the Developer Forums.