Square provides the Payments API for developers to create and manage payments. Applications can call the CreatePayment endpoint to charge any payment method supported by the Web Payments SDK or In-App Payment SDK. The Payments API can also record a cash or external payment a seller received outside of Square. A
CreatePayment call creates a Payment object.
CreatePayment endpoint requires a payment token from the Web Payments SDK or In-App Payments SDK. These SDKs provide the buyer-facing UI that collects payment source information and returns a secure payment token. All supported payment methods return payment tokens through the client SDKs.
In addition to the Payments API, a seller might use Square products (such as the Square Point of Sale application or the virtual terminal in the Seller Dashboard) to process payments. All these transactions create
Payment objects, which can be retrieved by the Payments API.
Together with the Orders API, the Payments API and Refunds API replace the Transactions API. Developers should use these APIs for new applications. Applications that still use the Transactions API should be migrated to the Payments API and Refunds API. For more information, see Migrate from the Transactions API.