I am using createCheckout() api for checkout from my website. I noticed that whenever same customer makes a checkout, duplicate customer profile is created. Is there a way to prevent duplicate customer profile creation if the customer is already there? will square check mail-id and create customer only if that cutomer is new
Yes, with the Payments API you can pass the customer_id in the payment request to have the correct customer profile associated to the payment. Square’s Payments API and Refunds API is a great option to streamline and manage all your online or in-app payments. The Payments API is a payment solution which allows you to accept credit cards, debit cards, and Square gift cards from your own website or in your mobile app.
Without ever leaving your website or app, customers can securely make online purchases. Payment processing is completed entirely through Square, so you’ll never need to handle sensitive payment card data.
You also have the option to add customer information and fully-itemized payment data with our Orders API and Customers API.
Square check out page is very cool. My client wanted that. That’s why i used checkout api. If I use payment api, can i use square check out page? If not, how can I get square payment form?
We don’t have any examples of the Square Checkout API UI but we recommend using the Web Payments SDK.
With Square Web Payments SDK it provides a secure buyer payment card entry method along with other secure payment methods. The SDK produces a secure one-time use payment token that your application web client sends to your backend, where it is processed as a payment with the Payments API. The Web Payments SDK was created to make integration with your web application simpler and provide better performance. The SDK provides the following advantages:
Granular configuration. You only need to write configuration code for the payment methods that your application accepts. Each payment method has its own objects with configuration options appropriate for the method.
Promise-based pattern. The async/await pattern is used in place of the callback pattern of earlier payment libraries. This pattern lets your application react to events in a more reasonable way with less code.
Automatic localization. The SDK determines the locale of the buyer’s browser automatically. However, your application can override localization by setting a configuration option.
The Web Payments SDK produces payment tokens from any of the following payment methods: