Integrate with Digital Wallets
Take payments with digital wallets like Apple Pay, Google Pay, and Masterpass - Secure Remote Commerce (SRC) with Square APIs and SDKs.
On this page
Square payment APIs and SDKs support in-person, online, and in-app payments with nonces (encrypted payment tokens) generated from digital wallets like Apple Pay, Google Pay, and SRC.
Apple Pay is only available for Square accounts based in Canada, the United Kingdom, and the United States.
Digital wallet support is built in to Reader SDK, which supports contactless payments including Apple Pay and Google Pay when paired with tap-enabled Square Readers.
Digital wallet support is also built in to the Checkout API, which automatically displays digital wallet buttons when the client browser supports them.
In-App Payments SDK for mobile clients supports digital wallet payments by providing methods to create wallet-specific payment authorization requests and callbacks to get authorization results. The authorization flow for all digital wallets is asynchronous and involves multiple actors.
To handle payments with Google Pay, mobile applications implement the Google digital wallet using the Google Android Wallet library and then use In-App Payments SDK to request a wallet token and convert it to a nonce that Square can use to process a payment:
The mobile application gets a Google Pay client instance to check the Google Pay configuration for supported card networks and a payment method.
The mobile application enables the Google Pay button if Google Pay is available and ends the process flow otherwise.
The mobile application creates a payment request with Square request parameters, sends it to the digital wallet library, and waits for the results of the Google Pay activity.
The mobile application sends the Google Pay payment token to In-App Payments SDK to exchange the Google Pay token for a valid Square nonce and completes the payment flow normally with the returned nonce.
To handle payments with Apple Pay, mobile applications implement the PassKit framework from Apple and then use In-App Payments SDK to authorize payment and generate a nonce that Square can use to process a payment:
If Apple Pay is available on the device, the mobile application shows a button that allows the customer to check out using Apple Pay.
The mobile application creates a PassKit payment request with the payment details and prompts the customer to authorize the payment.
If payment is authorized, the mobile application uses In-App Payments SDK to create a Square nonce request from the PassKit payment object.
In-App Payments SDK exchanges the PassKit payment information for a valid Square nonce and completes the payment flow normally with the returned nonce.