Learn about the online payment processing options on the Square Developer Platform.
The option you chose depends on whether you've already built a buyer checkout experience in your application. Whether you're building a new custom checkout experience or adding Square payments to an existing one, you can use the Web Payments SDK. If you want to use a Square-rendered and hosted checkout experience, use the Checkout API.
If you've already built a checkout experience in your application and want to add Square for payment acceptance at checkout, you can use the Web Payments SDK. For more information, see Take Payments.
The following image shows that the SDK renders a simple payment form with a help text string below it. The payment form can be rendered any place on your checkout page.
If you're planning to build your own checkout page or use a configurable checkout page built and hosted by Square, you can use the following options:
New custom checkout page - The client Web Payments SDK provides a customizable UI for a secure PCI-compliant way of accepting the buyer's chosen supported payment source. To use this SDK, you need to create and complete the actual payment on your backend with the Payments API. For more information, see Take Payments.
Square-hosted checkout page - The Checkout API allows you to populate a Square-hosted checkout page with order details and accept a payment with minimal coding. Use the URL provided by the Checkout API to redirect the buyer to the Square checkout page. Payment creation and capture are handled by Square servers.
The following image shows the Square-hosted checkout page configured with the Google Pay method and showing a total amount, but with no order details: