# Square

The integration with **Square Marketplace** is a one-way connection where all transaction data flows from Square to Boomerang. This integration works only with the following Boomerang card types: **stamp, cashback, discount, and reward**. Based on the purchase data received from Square, the system automatically applies the earning logic defined for these card types.\
Please note that reward redemption or benefits cannot be processed inside Square — all redemptions must be completed through the **our** [**Scanner App**](https://docs.boomerangme.cards/scanner-app).

To get the necessary credentials first connect the INTEGRATION sql in your Boomerang account, under integrations Save the INTEGRATION ID. You can then delete the integration

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FCrCpFV55eljQRF1X7Tdd%2FScreenshot%20at%20Nov%2014%2021-23-53.png?alt=media&#x26;token=c67724e5-2de2-4432-b09d-7af3b4c9f4e4" alt=""><figcaption></figcaption></figure>

To set up the Square app, log in to your Square account, go to <https://developer.squareup.com/console/en/apps>.

Press “+”

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F4KXlwMXX5wyJnJjpbyG6%2FScreenshot%20at%20Nov%2014%2021-08-07.png?alt=media&#x26;token=08a25861-1fbb-4ac3-aa22-b853397f2e2a" alt=""><figcaption></figcaption></figure>

Enter the name of the application

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FQ7YjZmap9qiuj1iN30bZ%2FScreenshot%20at%20Nov%2014%2021-09-21.png?alt=media&#x26;token=7f0d441c-8efe-4bcf-82de-9e0b64c13627" alt=""><figcaption></figcaption></figure>

Customize as you wish or skip the next 2 windows.

<div><figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2Fw7hsOnqrMblhVCR8WObg%2FScreenshot%20at%20Nov%2015%2010-12-13.png?alt=media&#x26;token=d27aaa6e-c38e-4b6b-8e96-e5e8d94b3b56" alt=""><figcaption></figcaption></figure> <figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FsZIAzVMiFAOmvPqLiuJu%2FScreenshot%20at%20Nov%2014%2021-10-20.png?alt=media&#x26;token=0fffa73f-9d39-44d0-b589-96c954caaf30" alt=""><figcaption></figcaption></figure></div>

Under credentials you can switch to a sandbox and production account.

Go to the production account.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FUeSJfwAoVpirzKxfNZjg%2FScreenshot%20at%20Nov%2006%2016-26-22.png?alt=media&#x26;token=cda661b6-fe02-4da4-ab2f-37fcb47ba1b2" alt=""><figcaption></figcaption></figure>

Go to webhooks -> subscriptions - > add subscription.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FKTbhaT4C4Bua2esI5yMc%2FScreenshot%20at%20Nov%2006%2015-00-27.png?alt=media&#x26;token=3231126d-279e-4a5e-a9c6-74dbf3a4e278" alt=""><figcaption></figcaption></figure>

Enter the name of the webhook, in the URL enter <https://square.apps.digitalwallet.cards/square/webhook>

In Events select only:\
payment.created

payment.updated

refund.created

refund.updated

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2Fyey0KlQ8RxQLwdEH02EL%2FScreenshot%20at%20Nov%2006%2015-00-35.png?alt=media&#x26;token=d88739b1-5913-4ae2-bb14-4d387916758b" alt=""><figcaption></figcaption></figure>

Click save.&#x20;

Now in the Boomerang account, go to integrations and connect the square app.&#x20;

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FBhkix2bqS5pCl1Zidqk4%2FScreenshot%20at%20Nov%2014%2021-14-57.png?alt=media&#x26;token=8c50e368-ceca-421f-8a8f-dab12a806452" alt=""><figcaption></figcaption></figure>

Select a card template (stamp, cashback, discount or reward). Note with stamp and points mechanics (in stamp and reward cards) accrual should be done through the scanner, automatic accrual will not be done through the marketplace.&#x20;

Enter the merchant ID(your saved integration ID in step one) and Square APP Access Token

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FEtELOlqMPy7KtJOD0PmL%2FScreenshot%20at%20Nov%2014%2021-15-45.png?alt=media&#x26;token=8c1e9317-433c-4bfa-a8b3-6e6bab51d827" alt=""><figcaption></figcaption></figure>

Select an accrual rule (for the whole cheque; for a cheque over a certain amount; for certain items)

<div><figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FlT5Wn2IwTmwICJ4SjI4n%2FScreenshot%20at%20May%2023%2017-16-18.png?alt=media&#x26;token=e6fef5b8-9cdf-4caf-ae5e-bfd4a461f50a" alt=""><figcaption></figcaption></figure> <figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FPSOVYDg6SPnkvVYEn589%2FScreenshot%20at%20May%2023%2017-16-31.png?alt=media&#x26;token=c5d1b8de-ce3a-4b1b-954c-271e81f19548" alt=""><figcaption></figcaption></figure> <figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F9GVDZFDEiJQhZmaWJVSm%2FScreenshot%20at%20May%2023%2017-16-43.png?alt=media&#x26;token=594680cd-906a-4e72-8497-5ba532ef50be" alt=""><figcaption></figcaption></figure></div>

Select delivery channels for card installation links.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FKX7l5crgV4mCx6TrNoEb%2FScreenshot%20at%20Nov%2014%2021-17-56.png?alt=media&#x26;token=f5ccedb8-2911-4aa4-a33c-2355a8e3fb32" alt=""><figcaption></figcaption></figure>

Create an invoice or accept payment through a virtual terminal. After its payment order details will be transferred to Boomerang.  If the order is canceled, the points will be deducted from the card.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FLGCtMdv0zcEztLuZg5MZ%2FScreenshot%20at%20Nov%2014%2021-19-33.png?alt=media&#x26;token=c11b8dc1-e4f5-4643-8ae2-3fbb29263d68" alt=""><figcaption></figcaption></figure>

If a customer with this phone number and email has a loyalty card, they will be awarded points. If the customer is not in the system, it will be created, the card will be issued and the link to install the card will be sent to the selected delivery channels (connected mailers in your account are required)\
Attention ! The currency in the Boomerang account and in the app must be the same.

<br>
