Getting started with Shop Pay Wallet
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.
Authorize your app with Shop Pay Wallet
Anchor link to section titled "Authorize 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.
Request authorization from the user using the request authorization endpoint with the combination of scopes matching your needs.
Exchange the
authorization_code
returned in step #1 for anaccess_token
by sending a request to the request access token endpoint. Provide theauthorization_code
in the request body.Securely store the
access_token
returned from the request.Use the
access_token
to make a request to the Shop Pay Wallet API.
Get a user's wallet
Anchor link to section titled "Get a user's wallet"Complete the following to request a User's Wallet information:
If the User hasn't authorized your application yet, then first request authorization.
Make a request to the fetch wallet, passing the
access_token
in the request header.
Confirm an order and retrieve payment information
Anchor link to section titled "Confirm an order and retrieve payment information"Complete the following to confirm an Order:
If the User hasn't authorized your application yet, then first request authorization.
Make a
POST
request to the confirm Order endpoint, passing theaccess_token
in the request header and theorder_id
andtokenization_type
in the request body.If you set
tokenization_type
toPAYMENT_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 settokenization_type
toSESSION
, then create a payment using the payment session ID from the response payload.
Update an order
Anchor link to section titled "Update an order"Complete the following to update an Order:
Make sure you have first confirmed an Order and retrieved payment information
Make a
PUT
request to the update Order endpoint, passing the updated data for the Order.Repeat step #2 as the Order requires updates.
Related resources
Anchor link to section titled "Related resources"- Authorization - an introduction to Shop Pay's OAuth 2.0 authorization flow for the Shop Pay Wallet
- Payment method encryption - a detailed guide about how to work with encrypted payment information returned by the Shop Pay Wallet
- Authorization scopes - a guide about what scopes to request in the Authorization flow
- Shop Pay Wallet ecosystem - an overview of how the Shop Pay Wallet API fits into Shopify's
Checkout
andPayment
resources - Testing the integration - the basics of testing your integration in production
- Shop Pay Wallet API reference - a list of the various endpoints and how to use them