Search code examples
phpsquare-connect

How to get Nonce for Card using Square API from Backend


In my application i need to process Cards from backend, I am already doing this with other payment gateways but for Square Connect I can't find anything.

My Question is how to generate Square Card Nonce from the backend? What API I should call ?

Gone through their entire documentation.


Solution

  • We have the same problem. Square seems to be tailored for simple ecom sites. Sites that are not PCI compliant.

    We are PCi Level 1. And we have a custom payment form.

    Square requires that you have to use their Payment Form to get their nonce (token equivalent ). This obviously means you can’t reuse your existing payment fields.

    Moreover their api documentation is poor.

    1 they say you can use Checkout api and use their form. In this case you do not need to be pci compliant.

    No complaints here

    1. They also say that if you want to control your UIUX, you can use their Transactions API.
      BUT IN THIS CASE THEY FAIL TO MENTION HOW TO GET THE NONCE.
      Hunt around and you’ll see that the only way to get a nonce is with payment form.

    Obviously, this implies you have to use their payment form fields as an iframe

    This is not custom ui/ux.

    Payment developer want ApI based card number tokenization. Obviously this requires pCI compliance. Square does not support this.

    I suggest you use another payment processing layer for advanced sites.