Learn how to connect Business Central to Square to configure the Square Payments extension.
Square Integrations: Business Central

Connect Business Central to your Square Account Beta release
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.

  1. In your browser, navigate to https://squareup.com/signup to create a Square account. A graphic showing the initial account setup page for Square.

  2. Enter and confirm your email address, create a password, and then choose Continue.

  3. 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.

A page in the Square account setup flow asking sellers to select where they will sell goods.

  1. When complete, your Square account is ready to use and you have access to the Seller Dashboard.

  1. Sign in to the Developer Dashboard.

  2. Create a new application and name it something descriptive like "Business Central Terminal Integration".

    A graphic showing the creation of a Square developer application with the name "Business Central Terminal Integration".

  3. Choose Save. Your new application appears in the Developer Dashboard.

  4. Open the application.

  5. In the left pane, choose OAuth.

  6. 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.

    A graphic showing the OAuth page on the Square Developer Dashboard.

  7. Set the Redirect URL value to the URL saved in step 3.12.

  8. 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.

  9. Return to the Developer Dashboard.

  10. In the left pane, choose Webhooks, and then choose Subscriptions.

    A graphic showing the Webhook subscriptions page on the Square Developer Dashboard.

  11. Choose Add subscription, and then enter a descriptive name in Webhook name.

  12. 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.

  13. Scroll down the list of events and select the boxes for the following events:

    • invoice.canceled

    • invoice.payment_made

    • invoice.refunded

    • invoice.updated

    • order.updated

    • payment.updated

    • refund.created

    • refund.updated

    • terminal.checkout.created

    • Terminal.checkout.updated

    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.

  14. Choose Save. The new webhook subscriptions appear on the Webhook subscriptions page in the Developer Dashboard.

  15. You can test your webhooks by choosing the webhook subscription name, and then choosing More and Send test event. If you receive a 200 response, the Azure function is working as expected.

A graphic showing the Business Central API webhook endpoint subscriptions on the Square Webhook subscriptions page.

  1. Navigate to the Square Settings page in Business Central by searching for "Square" in the Business Central Search.

  2. Choose the Authorize button, which takes you to the Square OAuth flow. Sign in to your Square account and review the relevant permissions.

A graphic showing the Business Central Terminal Integration application being granted access to a Square account through the Square OAuth flow.

  1. 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.

We've made improvements to our docs.
Prefer the old format?