Integrate With Digital Wallets
Take payments with digital wallets like Apple Pay and Google Pay 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 and Google Pay.
Apple Pay is only available for Square accounts based in the United States.
Digital wallet support is built into 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 into the Checkout API, which automatically displays digital wallet buttons when the client browser supports them.
The 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 apps implement the Google digital wallet using the Google Android Wallet library then use the In-App Payments SDK to request a wallet token and convert it to a nonce that Square can use to process payment:
The mobile app gets a Google Pay client instance to check the Google Pay configuration for supported card networks and payment method.
The mobile app enables the Google Pay button if Google Pay is available and ends the process flow otherwise.
The mobile app 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 app 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 apps implement the PassKit framework from Apple then use the In-App Payments SDK to authorize payment and generate a nonce that Square can use to process payment:
If Apple Pay is available on the device, the mobile app shows a button that allows the customer to checkout using Apple Pay.
The mobile app creates a PassKit payment request with the payment details and prompts the customer to authorize the payment.
If payment is authorized, the mobile app uses the In-App Payments SDK to create a Square nonce request from the PassKit payment object.
The In-App Payments SDK exchanges the PassKit payment information for a valid Square nonce and completes the payment flow normally with the returned nonce.