0

The documentation link: https://developer.squareup.com/docs/pos-api/build-mobile-web#step-5-test-your-code suggest straight forward code like this:

<a href="intent:#Intent;
action=com.squareup.pos.action.CHARGE;
package=com.squareup;
S.browser_fallback_url=https://my.website.com/index.html;
S.com.squareup.pos.WEB_CALLBACK_URI=https://my.website.com/index.html;
S.com.squareup.pos.CLIENT_ID=sq0ids-yourClientId;
S.com.squareup.pos.API_VERSION=v2.0;
i.com.squareup.pos.TOTAL_AMOUNT=100;
S.com.squareup.pos.CURRENCY_CODE=USD;
S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CASH;
end">Start Transaction</a>

I tested it and it does not open any link, my devide already have app installed.

When I try this code:

<a href="intent://scan/#Intent;scheme=squareup.pos;action=com.squareup.pos.action.CHARGE;package=com.squareup;end"> Take a QR code 2 </a>

It open play store app with squareup pos app information, I need to directly open the app and not play store screen of the app, is there any way?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Den Pat
  • 1,118
  • 10
  • 17
  • You forgot to add `scheme=...`? – Simon Marquis Sep 10 '19 at 08:04
  • @SimonMarquis I also thought that, and hence as you can see in my original question that I have used the scheme but the issue is I am not sure what to use there, Squareup doc does not define that anywhere. I tried with scheme=squareup.pos; which did not work. – Den Pat Sep 10 '19 at 11:19
  • Unfortunately, if there is no such `scheme` in the public doc, you should definitely not rely on it. – Simon Marquis Sep 10 '19 at 12:22

1 Answers1

1

*UPDATE:

I got transactions to work after adding S.com.squareup.pos.LOCATION_ID={{ my_location_id }}. The location ID can be found in Square Developer Portal > Locations. Also if the POS app is passcode protected, you have to open and login with passcode before sending transaction.

*END UPDATE

I've been working through this same issue. I still haven't gotten a transaction to work, but have at least gotten the app to open.

Make sure the CLIENT ID is your production application ID. NOT sandbox.

The WEB_CALLBACK_URI needs to match the Web Callback URL defined in your Square Developer Portal > Point Of Sale API.

I hope this helps. If you do figure this out and get transactions to work, please post your solution for me and others who are sure to run into this issue since the documentation is lacking.

empire
  • 41
  • 1
  • 2