Skip to main content

Getting started with Shop Pay Wallet

Note

To use this API, you must have Shopify Payments enabled on the store. Only eligible merchants can use Shopify Payments.

This section describes how to authorize a client app with and make calls to the Shop Pay Wallet API. Refer to Shop Pay Wallet in the context of Shopify's Checkout and Payment if you'd like to see how the Shop Pay Wallet works together with Shopify's Checkout and Payment APIs.


Anchor to Authorize your app with Shop Pay WalletAuthorize your app with Shop Pay Wallet

Complete the following to request authorization from a User and obtain an access_token that you can use to make requests to the Shop Pay Wallet API. For more information on the authorization flow, see the Authorization guide.

  1. Request authorization from the user using the request authorization endpoint with the combination of scopes matching your needs.

  2. Exchange the authorization_code returned in step #1 for an access_token by sending a request to the request access token endpoint. Provide the authorization_code in the request body.

  3. Securely store the access_token returned from the request.

  4. Use the access_token to make a request to the Shop Pay Wallet API.


Complete the following to request a User's Wallet information:

  1. If the User hasn't authorized your application yet, then first request authorization.

  2. Make a request to the fetch wallet, passing the access_token in the request header.


Anchor to Confirm an order and retrieve payment informationConfirm an order and retrieve payment information

Complete the following to confirm an Order:

  1. If the User hasn't authorized your application yet, then first request authorization.

  2. Make a POST request to the confirm Order endpoint, passing the access_token in the request header and the order_id and tokenization_type in the request body.

  3. If you set tokenization_type to PAYMENT_CREDENTIAL, then decrypt the PAN from the response payload and process payment on your own platform (this option is only available for non-Shopify merchants). If you set tokenization_type to SESSION, then create a payment using the payment session ID from the response payload.


Complete the following to update an Order:

  1. Make sure you have first confirmed an Order and retrieved payment information

  2. Make a PUT request to the update Order endpoint, passing the updated data for the Order.

  3. Repeat step #2 as the Order requires updates.



Was this page helpful?