Take Online Payments with Square APIs and SDKs
Build a custom payment experience
Square payment form + Transactions API: Add our PCI-compliant payment form to your own checkout page and customize the layout and appearance of the form by using stylesheet classes and HTML. You can add a digital wallet that includes Apple Pay, Masterpass, and Google Pay buttons.
The payment form encodes the buyer's payment card information in a secure token that you send to your own server-side resource for payment processing. The payment is processed by the Transaction API charge endpoint. The secure token from the payment form is added to the charge request so that the Square payments processing server charges the correct payment card.
To start taking payments, get a Square access token and then add a few blocks of code to your checkout page and a backend module that makes a call on the Square Transaction API.
See the Payment Form Setup Guide to learn about building a custom online payment solution. The guide includes code templates that start you off with a production quality payment form. No need to design your form from scratch.
Use a pre-built Square solution
Take payments with the Checkout API: We host the pre-built payment flow in our servers securely and handle any required certificates. We provide the checkout and payment confirmation pages but you have the option to create your own payment confirmation page in place of ours.
Just create an order item with our Checkout API , and post it to our servers in a Checkout API request that returns a unique checkout URL.
Use the checkout URL to navigate to the checkout page. We present the buyer with our checkout flow pre-populated with your order details and then handle the payment for you.
After the buyer clicks the Place Order button, Square directs them to an order confirmation page.
See the Checkout API Setup guide to learn about integrating with a pre-build payment solution.
Add a payments plug-in
Choose an online payments plug-in from the Square App Marketplace: If you do not want to write a lot of code, take payments with a plug-in solution built for the eCommerce application you use.
Get started building a payment solution
Take payments securely on your website with full control of the checkout process using the Transactions API and Square payment form.