Reputation: 663
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.
Upvotes: 3
Views: 5852
Reputation: 19
You don’t get a nonce, you create a nonce. It can be any character string but must be unique from all other nonce strings used. I use my customer ID concatenated with the date because in my case I know a customer only gets an invoice once a month.
Upvotes: -1
Reputation: 670
It should be possible to emulate with the virtual terminal over phantom.js
Upvotes: 0
Reputation: 186
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
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.
Upvotes: 17
Reputation: 663
Response from Square's SLACK:
Square is specifically designed so you don’t need to handle client’s credit card details yourself (e.g. don’t need to securely pass it back from the client to your server) and so SqPaymentForm is designed to work client side only, and to then return a card nonce which you can safely pass from client to server. Unfortunately what you want to do is not possible by design.
Upvotes: 4
Reputation: 1348
In order to generate a card nonce through Square, you must use the SqPaymentForm. https://docs.connect.squareup.com/payments/sqpaymentform/sqpaymentform-overview
You would then pass the card nonce to the Charge endpoint in the Transactions API: https://docs.connect.squareup.com/payments/transactions/overview
However, you can also take payments using the Checkout API (less customizable, but easier to set up): https://docs.connect.squareup.com/payments/checkout/overview
Upvotes: 5