Web Payments SDK

The Web Payments SDK lets you easily create PCI-compliant inputs to accept online payments with the Square Payments API. The SDK supports various payment methods for a given payment scenario with a seller. After initializing the SDK, learn how to build and integrate a payment method for your web client application.

Quick Setup

Code playground

index.html

Payments

Returned by Square.payments(appId, locationId).

Use this object to instantiate Payment methods.

Methods

payments.js
JS
JavaScript

const payments = Square.payments(appId, locationId);