Actualizaciones de sistema

Estamos experimentando problemas que pueden afectar a tus servicios Square. Continuaremos actualizando nuestra página de estado con más información.

Volver a Inicio

Accept Payments with Microsoft Dynamics Business Central

Step 1: Install the Square Extension

  1. Begin on the Microsoft Dynamics Business Central dashboard.

  2. Navigate to the Extensions dashboard by selecting the Setup & Extensions button in the top nav bar.

  3. Add the Square extension by Square Inc. via the Extension Marketplace

    Microsoft Dynamics Extension Marketplace

Step 2: Register an Application in Azure Active Directory

This Azure Function will be used to initialize your Square Application in Step 3. Before completing this step, you need to have the Application administrator or Application developer role in Azure AD tenant to be able to create Azure Application. You also need to have Contributor role in Azure Subscription to be able to deploy Azure Function.

  1. Login to the Azure portal.

  2. Navigate to the Azure Active Directory service.

  3. Open App Registration in the left pane.

  4. Click the + New registration button.

    Azure App registrations

  5. Enter Application Name.

  6. Enter Redirect URI value – https://api.businesscentral.dynamics.com

  7. Click on Register.

    Azure Register an application

  8. Go to Certificates & secrets in the left pane.

  9. Click on + New client secret button.

  10. Enter a Description.

  11. Select value for “Expires” option - “24 months”.


    Azure Certificates and Secrets

  12. Copy the generated secret value and save it in a safe place. You won’t be able to get this value when the page is closed. We will use this secret value in Step 3.5 and Step 3.6.

    Azure  API Secret Value

  13. Go to API permissions in the left pane.

  14. Click on +Add a permission button.

  15. Select the Delegated permission tile.

  16. Check the user_impersonation

    and Financials.ReadWrite.All permissions.

  17. Select on Add permissions button.

    Azure Request API Permissions

  18. Click the Grant admin consent for [your tenant name] button.

    Azure Grant Consent

  19. Go to Overview in the left pane

  20. Select Redirect URI’s link.

Azure - Application ID - US

21. Click on Add URI.

22. Enter additional Redirect URI.

23. Click Save.

24. Navigate to Overview page.

25. Copy the Application (client) ID value and click Save.

26. Go to Home page and select Subscriptions 

27. Select needed Subscription. 

28. Select Access Control (IAM).

29. Click on + Add button.

30. Select Add role assignment.

31. Select role - Contributor

32. Type Business in the Select​​ text field.

33. Select Business Central API application.

34. Click Save.

Step 3: Deploy Azure Function in Business Central

  1. Navigate to the Microsoft Business Central Dashboard.

  2. Open Setups & Extensions >  Assisted Setup page.

  3. Select Square Function Deployment Wizard.

    MSFT Business Central Deploy Wizard

  4. Fill in your Business Central User Name and Business Central Password

  5. Fill Client ID field. The value was saved on Step 2.20 of “Creating Application in Azure Active Directory”

  6. Fill Client secret field. The value was saved on the Step 2.12 of “Creating Application in Azure Active Directory”

  7. Click on the Next button

  8. Select a Subscription from the provided dropdown

  9. Select a Location from the provided dropdown

  10. Select a Resource Group or name your own. 

  11. The Azure function name will be generated automatically, but you can change it if you’d like.

  12. Click the Next button to continue.

    Azure - Deployment Wizard - US

  13. Wait for the deployment task to complete before proceeding

  14. Once you arrive at the following page, copy the link to the Azure Function to use in Step 5 as a callback URL and webhook URL.

    Azure - Deployment Wizard Step 2 - US

Note: this link will also be available in the Square Settings page in Business Central under the property Webhook URL. You can navigate to the Square Settings page by searching for it in the Business Central search bar.

Step 4: Create a Square Account

If you already have a Square Account, skip ahead to the next section, Create a Developer Application.

  1. In your browser, crear una cuenta de Square.

  2.  Enter and confirm your email address, create a password > click Continue.

  3. Select your business type from the drop-down. Enter your business and personal information. Click Continue.

  4. You’ll be asked to input your personal and business information and to answer a few questions to verify your identity. When complete, click Continue.

Step 5: Create a Developer Application

  1. Navigate to developer.squareup.com/apps.

  2. Create an application using the Create your first application button. Pick a descriptive name like Business Central Terminal Application.

    Developer Dash - Create An App - US

  3. Click Save. The following page should show up:

    Developer Dash - App Overview - US

  4. Open the application you have just created.

  5. On the left side of the webpage, navigate to the section titled OAuth.

  6. Switch your environment from Sandbox to Production. The resulting screen should look like this:

    Developer Dash - OAuth - US
  7. Set the Production Redirect URL to the URL saved in Step 3.14

  8. Copy your Production Application ID and your Production Application Secret to the Square Settings in Business Central mentioned in Step 3.15. You can navigate to the Square Settings by searching for “Square Settings” in the Business Central search bar.

    Developer Dash - Square Settings in Business Central - US

  9. Navigate back to the Square Application Dashboard. This time, select the Webhooks section. 

  10. Enable Webhooks from Square and fill the Notification URL with the URL saved in Step 3.14. This should match your Production Redirect URL saved in Step 5.6. You can also find this URL listed as Webhook URL in the Square Settings page. The Square Webhooks Page should now look like the following:

    Azure - Webhooks - US

  11. Click Save and then test the webhook by selecting the button that says Send Test Webhooks Notification. If you receive a 200, the Azure function is working as expected.

  12. Scroll down to the section titled Connect v2 Endpoints and select Add Endpoint.

  13. Title your Webhook name something descriptive like “Terminal API Webhook”

  14. Fill the URL with the same URL as the Notification URL, i.e the URL saved in step 3.14. You can also find this URL listed as “Webhook URL” in the Square Settings page.

  15. Scroll down the list of events until you see next events:

    • terminal.checkout.created;

    • terminal.checkout.updated;

    • order.updated;

    • invoice.updated;

    • Invoice.canceled;

    • invoice.payment_made;

    • invoice.refunded;

    • payment.updated;

    • refund.created;

    • refund.updated;

  16. When you see these events, Check their respective boxes and click Save. It should look like the following:

  17. Once the Application ID, Application Secret, and Webhooks are set, you are ready to Authorize a Square Account and set up a Terminal Device.

Step 6: Authorize your Square Application on Business Central

  1. Navigate to the Square Settings in Business Central. This can be done by searching for “Square” in the Business Central Search.

  2. Selecting the Authorize button should take you to the Square OAuth Flow. Sign in to your Square Account and approve the relevant permissions:

    Business Central - Square Settings Authorize - US

  3. Sign in to your Square Account and approve the relevant permissions:

    Business Central - OAuth Permissions - US

  4. Click Allow. Once completing, you should be redirected to the Callback URL that was saved in Step 5.6. The resulting page should appear as the following:

    Business Central - Callback URL - US

  5. Navigate back to the Square Settings. The Square Settings on the Business Central Dashboard should now be updated:

    Business Central - Authorization Status - US

Collect Payments

In-Person Payments - Onboard a Square Terminal Device

Prerequisite: You will need a Square Terminal.

  1. Navigate to the Square Terminal management section. Search for Square Terminal in the Business Central Search.

    Business Central - Terminal Search - US

  2. In the dialog box, select Register New Terminal.

  3. Choose a Terminal Name that will help you identify the Square Terminal device you are using. This is useful if you have multiple Square Terminals. Then press Next.

  4. Associate the Terminal to a particular Square Location. If there is only one Square location at this time, simply choose that one. You can learn more about how to Administrar más de una ubicación. Once done, press Next.

  5. Business Central will generate a Device Code. Sign in to your Terminal Device using this device code. Once complete, your terminal device should now state Ready to take Payment. Once done, press Finish in the Business Central dialog box. You should receive an alert that says The Terminal Device has successfully paired!

  6. A new terminal should now be listed on the Square Terminal list in Business Central. The Device ID corresponds to the Serial Number of your Terminal Device, which can be found on the back of the Square Terminal. You can now begin to send charges to this Terminal via Posted Invoices.

Collect an In Person Payment via Square Terminal

To collect payment through a terminal, you must have a Posted Invoice available for payment. You must also have a Square Terminal onboarded already in Business Central.

  1. Navigate to an existing Posted Invoice. In the Terminal Checkouts section, select the Terminal Device you intend to use, as well as the amount you intend to pay through the Terminal.

    Business central - Terminal Invoice Transaction - US

  2. In the top right corner, under the PS-XXXX Invoice number, select Process > Pay with Square Terminal. This will begin the checkout process for the relevant terminal. Your Square Terminal should present a Checkout Screen, with the specified Amount to Charge.

Collect a Payment via Square Invoice

In order to collect payment through a Square Invoice, you must have a Posted Invoice available for payment. Your BC customer must be mapped to a Square Customer to successfully create an invoice. If a BC customer has not yet been mapped to a Square Customer, you will be given the option to create a new Square Customer with the BC Customer information, or create a new customer profile in Square.

Note: If you need to re-map your Business Central Customer, you can navigate to the relevant Customer Card in the Customers List in BC and relink the customer to Square there via Process > Link with Square Customer.

All payments must flow to a Square location. If you need to re-link a location, you can navigate to the Locations list in BC and select Link with Square Location.

  1. Navigate to an existing Posted Invoice. In the Square Invoice section, select the Square location you intend to use.

  2. In the top right corner, under the Invoice number, select Process > Pay with Square Invoice

  3. In the page Create Square Invoice you can switch the Use Deposit toggle if you want to add a deposit to the invoice. You can enter the straight amount or just type percentage. In case you enter the percentage deposit amount will be calculated automatically. Deposit Due Date can be selected on this page as well. After all the requested fields are filled click the OK button.

    Note: To activate ACH payments, you may not use a deposit - the whole amount must be paid via ACH.

  4. Create Square Invoice will be closed and Square Order will be created with an associated Square Invoice.

  5. To charge a payment via the Square Invoice you can open the link from the Invoice URL Link.

Add to Card on File to the Customer

  1. Navigate to Customers and open the relevant Customer Card.

  2. In the top right corner, under the Customer number, select Process > Add card on file

  3. Enter the Credit Card information and click the Store Card  button. The page will be automatically closed.

  4. List of the stored cards could be locked via Cards action next to the Add card on file.

Collect an ad-hoc Payment via existing Card on File

You must have a Posted Invoice in BC available for payment. Your BC customer must also be mapped to a Square Customer to successfully create an invoice. If a BC customer has not yet been mapped to a Square Customer, you will be given the option to create a new Square Customer with the BC Customer information, or create a new customer profile in Square.

Note: If you need to re-map your Business Central Customer, you can navigate to the relevant Customer Card in the Customers List in BC and relink the customer to Square there via Process > Link with Square Customer.

All payments must flow to a Square location. If you need to re-link a location, you can navigate to the Locations list in BC and select Link with Square Location.

  1. Navigate to an existing Posted Invoice. In the Square Invoice section, select the Square location you intend to use.

  2. In the top right corner, under the Invoice number, select Process > Pay with Existing Card.

  3. In the page Pay with New Card you can change the amount to charge. By default, it will be the full invoice amount. Ensure that your Customer has agreed to payment. 

  4. Select the card you want to use from the list and click the Pay button. The page will be closed automatically.

Collect an ad-hoc Payment via a New Card

You must have a Posted Invoice in BC available for payment. Your BC customer must also be mapped to a Square Customer to successfully create an invoice. If a BC customer has not yet been mapped to a Square Customer, you will be given the option to create a new Square Customer with the BC Customer information, or create a new customer profile in Square.

Note: If you need to re-map your Business Central Customer, you can navigate to the relevant Customer Card in the Customers List in BC and relink the customer to Square there via Process > Link with Square Customer.

All payments must flow to a Square location. If you need to re-link a location, you can navigate to the Locations list in BC and select Link with Square Location.

  1. Navigate to an existing Posted Invoice. In the Square Invoice section, select the Square location you intend to use.

  2. In the top right corner, under the Invoice number, select Process > Pay with New Card

  3. In the Pay with New Card page, you can adjust the amount to charge. By default it will be the full invoice amount. Add Card to Customer will create a card on file for the Customer that was used for this Invoice. 

  4. Ensure that the customer agreed to the payment, and set Customer agreed to payment to True. After all the requested fields are filled click the Pay button. The page will be closed automatically.

Collect an ad-hoc Payment via ACH

You must have a Posted Invoice in BC available for payment. Your BC customer must also be mapped to a Square Customer to successfully create an invoice. If a BC customer has not yet been mapped to a Square Customer, you will be given the option to create a new Square Customer with the BC Customer information, or create a new customer profile in Square.

Note: If you need to re-map your Business Central Customer, you can navigate to the relevant Customer Card in the Customers List in BC and relink the customer to Square there via Process > Link with Square Customer.

All payments must flow to a Square location. If you need to re-link a location, you can navigate to the Locations list in BC and select Link with Square Location.

  1. Navigate to an existing Posted Invoice. In the Square Invoice section, select the Square location you intend to use.

  2. In the top left corner, under the Invoice number, select Process > Pay with ACH

  3. In the page Pay with ACH, you can change the amount to charge. By default, it will be the full invoice amount. 

  4. Ensure that the customer agreed to the payment, and set Customer agreed to payment to True. After all the requested fields are filled click the Pay button. The page will be closed automatically.

  5. After all the requested fields are filled click the Continue button and set login and password. Select a bank to pay within the Square ACH form. In the next step please select a payment amount to charge

  6. Click the Continue button and the Page will be closed automatically.


FAQ

How do I set up a Square Terminal to work with Business Central?

To set up a new Square terminal in Business Central please go to the Square Terminals page. Locate action “Register New Terminal” on the ribbon. Follow the instructions and the terminal will be registered.

Can I set up multiple terminals?

Yes. You can set up as many terminals as you want. On the Posted Sales Invoice you are able to select the terminal from the list of the paired devices.

How can I turn on/off receipts on the Square Terminal?

To change the receipts option please open the Terminal Card page for the device you want to change this option. By moving the toggle “Skip Receipt Screen” you could turn on/off this option.

How can I relink a Square location to a BC location?

To relink the BC location with the Square location you should open the Location Card page. Locate the action “Link with Square Location” on the ribbon. 

Using this action you will be able to create a new location or select from the list of the existing locations from your Square account.

How can I  relink a Square customer to a BC Customer?

To relink the BC Customer with the Square location you should open the Customer Card page. On the ribbon you could find the action “Link with Square Customer”. Using this action you will be able to create a new customer or match with the existing customer from your Square account. “Email” and “Phone No.” fields will be used to search for existing Square customers. If there will be more than one customer in your Square account that matches with BC data, the latest created one will be used.

How can I re-authorize a Square Account?

To re-authorize you should go to the “Square Setting” page. First step should be to revoke the existing token. Locate action “Disconnect” on the ribbon. “Authorization Status” should be changed to “Revoked”. Next step is to authorize again. Locate action “Authorize”. Authorize in Square and return to the BC page. After refresh Square Settings page “Authorization Status” should be changed to “Authorized”.

I’m unable to take payments with my Square account.

If you are unable to take payments, first ensure your BC tennant is authorized with your Square Account. Open the “Square Settings” page and check field “Authorization Status”. It should be “Authorized”. If payments still don’t work, ensure that the payments are flowing to the correct Square Location. If it *still* does not work, make sure your Square account is active and capable of handling credit card processing. You can activate your Square account by navigating to Pagos Square

How do I set the Square Location for a particular Business Central Posted Sales Invoice?

To apply a particular location to the Posted Sales Invoice you should select the location from the drop down list in the field “Square Location Name”. This field could be found under the “Square Invoices” fast tab. Note: Only linked locations are available here.

I received an error saying I have “Insufficient permissions.” How do I fix this?

Typically this error appears if you authorize in different Square applications or switch between sandbox and production environments. To solve this issue you should re-authorize in BC using the application credentials you want to use. Also check if the customer and location is properly linked to the correct application. Try to relink the respective Customer and Location Cards if you are unsure or switched your Square application recently.

How do I authorize a payment?

To capture a payment you should open the Posted Sales Invoice you want to pay for. Locate the action Process > Pay with new Card”/“Pay with existing Card. In the window appears the set “Auto Complete” toggle to FALSE.

How do I capture/void a payment?

To capture/void the captured payment you should go to the Process > Square Payment History page. Select the payment you want to capture/void.  Locate action Manage > Cancel Authorized.

How do I refund a payment?

To Refund a payment you should open the Posted Sales Invoice that was paid. Open the “Square Payment History” page. It could be found in the “Process” tab on the ribbon. Select the payment you want to refund.  Locate action “Create payment Refund” under the “Manage” tab on the ribbon.

Why is Create Square Invoice grayed out?

This means that the invoice has either already been created or the Posted Sales Invoice already has a payment associated with it. If the invoice has been created, you still can pay for it by using the associated link.

Why can’t I cancel the Square Invoice?

If a payment were made for this Posted Sales Invoice that wasn’t through Square Invoices, the outstanding Square invoice is automatically canceled. The option to cancel has been grayed out.

I’m receiving an error that says the Customer ID “XXXXX” cannot be found. How do I fix this?

This means that for some reason your customer was not found in your Square account. Try to relink this customer by going to the Customer Card and selecting Link with Square Customer from the ribbon.

How do I activate ACH payments with Square Invoices?

ACH payments are available only for the balance only invoice(without deposit amount).

What versions of Business Central is this integration compatible with?

The current integration is compatible with BC SAAS latest available version. BC SAAS updating the tennant automatically.

What features and Payment methods does this support?

  • Card on file

  • Balance and Deposit+Balance payments via Square Invoices

  • ACH via Square Invoices

  • Ad-hoc credit card payments

  • In Person credit cards via Square Terminal hardware

Will I be PCI compliant when taking payments via the Square Business Central Integration?

Yes, Square handles all PCI compliance for any card payment.

Invoices are not automatically updating when a payment is made. Why is that?

Ensure that Webhooks are properly set up - follow the instructions fully at Step 5 of our Onboarding Instructions.

Refunds taken in Square are not showing up in Business Central. Why is that?

Ensure that webhooks are properly set up - follow the instructions fully at Step 5 of our Onboarding Instructions. Do note that refunds will only show up if the initial payment was associated with a BC Sales Invoice.

Does the integration work with Cash Payments?

We do not have the ability to translate cash payments from Business Central to Square or vice versa at this time. If using a Square Invoice, you can log into Square, open up the relevant invoice, and record a cash payment - just know that this information does not yet translate back into Business Central and has to be manually reconciled.