I am trying to integrate Salesforce with Square. My use case is, the customer information and payment information(card/bank) will be passed from Salesforce.
When I am trying to use a Create Payment Api, it asks for the source_id. How to generate this source id/payment id for the one-time charge with the payment info provided.?
I did not find API documentation to pass the Card information anywhere. Any help will be greatly appreciated. Thank you.
With Square the ability to pass raw card data to the API to process a payment isn’t available. You’ll need to use the Web Payments SDK to generate the source_id to pass to CreatePayment.
Thank you for the response @Bryan-Square. But we have our own UI screen to get the payment and customer information, which is already integrated with the other payment providers. We wanted to hook the Square as well. Is there any other way to achieve this?
Because with the Web Payments SDK, it seems we need to use the standard UI/structure provided by Square. We want to keep the look and feel consistent with the existing.
Currently there isn’t any other alternative. You have to use the Web Payments SDK to generate the source_id. Also you can definitely keep your custom UI and still use the Web Payments SDK. All you need to do is to put our form field on your existing page. It doesn’t need to be a stand alone page.
Hello Brian,
Using c# .NET I programmed the square payment process, it is working fine on my destop (localhost) running the program with Visual Studio 2022, I can see in square sandbox that the transaction went through but when I try to process in my website (VPS Godaddy) the same aplication I can see that the transaction arrives to square sandbox (get) but does not return the response (post) to the server, what could it be? any ideas?
No, I just updated ApplicationId and LocationId with the ones I got from sanbox, and remember it is working fine in my desktop, Sandbox Get and Post are fine when is from my desktop.