Take Payments

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.

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.

Important

Apple Pay is only available for Square accounts based in Canada, the United Kingdom, and the United States.

Take in-person payments with digital wallets Permalink Get a link to this section

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.

Take online payments with digital wallets Permalink Get a link to this section

Digital wallets are supported in the Square payment form and implemented with a few lines of JavaScript. Instead of collecting credit card information, the payment form makes an asynchronous call to the digital wallet and automatically generates a nonce from the response.

Digital wallet support is also built in to the Checkout API, which automatically displays digital wallet buttons when the client browser supports them.

Take in-app payments with digital wallets Permalink Get a link to this section

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.

Nonce generation with Google Pay Permalink Get a link to this section

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:

  1. The mobile application gets a Google Pay client instance to check the Google Pay configuration for supported card networks and a payment method.

  2. The mobile application enables the Google Pay button if Google Pay is available and ends the process flow otherwise.

  3. 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.

  4. 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.

    in-app-payments-google-pay

Nonce generation with Apple Pay Permalink Get a link to this section

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:

  1. If Apple Pay is available on the device, the mobile application shows a button that allows the customer to check out using Apple Pay.

  2. The mobile application creates a PassKit payment request with the payment details and prompts the customer to authorize the payment.

  3. If payment is authorized, the mobile application uses In-App Payments SDK to create a Square nonce request from the PassKit payment object.

  4. In-App Payments SDK exchanges the PassKit payment information for a valid Square nonce and completes the payment flow normally with the returned nonce.

    in-app-payments-apple-pay

Related topics Permalink Get a link to this section