> Note:
> To use this API, you must have [Shopify Payments](https://help.shopify.com/manual/payments/shopify-payments) enabled on the store. Only [eligible merchants](https://help.shopify.com/manual/payments/shopify-payments/eligibility) 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](/docs/api/shop-pay-wallet/ecosystem) if you'd like to see how the Shop Pay Wallet works together with Shopify's [Checkout](/docs/api/admin-rest/latest/resources/checkout.html) and [Payment](/docs/api/admin-rest/latest/resources/payment.html) APIs.

## 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](/docs/api/shop-pay-wallet/reference/index). For more information on the authorization flow, see the [Authorization guide](/docs/api/shop-pay-wallet/authorization).

1. Request authorization from the user using the [request authorization](/docs/api/shop-pay-wallet/reference#request-authorization) endpoint with the combination of [scopes](/docs/api/shop-pay-wallet/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](/docs/api/shop-pay-wallet/reference#request-an-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](/docs/api/shop-pay-wallet/reference#wallet-and-orders).

## Get a user's wallet

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

1. If the User hasn't authorized your application yet, then first [request authorization](#authorize-your-app-with-shop-pay-wallet).

2. Make a request to the [fetch wallet](/docs/api/shop-pay-wallet/reference#get-a-users-wallet-information), passing the `access_token` in the request header.

## Confirm 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](/docs/api/shop-pay-wallet/reference#request-authorization).

2. Make a `POST` request to the [confirm Order](/docs/api/shop-pay-wallet/reference#confirm-an-order-and-retrieve-payment-information) 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](/docs/api/shop-pay-wallet/encryption#decrypting) 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](/docs/api/admin/rest/reference/sales-channels/payment.html) using the payment session ID from the response payload.

## Update an order

Complete the following to update an Order:

1. Make sure you have first [confirmed an Order and retrieved payment information](/docs/api/shop-pay-wallet/reference#confirm-an-order-and-retrieve-payment-information)

2. Make a `PUT` request to the [update Order](/docs/api/shop-pay-wallet/reference#update-an-order) endpoint, passing the updated data for the Order.

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

## Related resources

- [Authorization](/docs/api/shop-pay-wallet/authorization) - an introduction to Shop Pay's OAuth 2.0 authorization flow for the Shop Pay Wallet
- [Payment method encryption](/docs/api/shop-pay-wallet/encryption) - a detailed guide about how to work with encrypted payment information returned by the Shop Pay Wallet
- [Authorization scopes](/docs/api/shop-pay-wallet/scopes) - a guide about what scopes to request in the [Authorization flow](/docs/api/shop-pay-wallet/authorization)
- [Shop Pay Wallet ecosystem](/docs/api/shop-pay-wallet/ecosystem) - an overview of how the Shop Pay Wallet API fits into Shopify's [`Checkout`](/docs/api/admin-rest/latest/resources/checkout.html) and [`Payment`](/docs/api/admin-rest/latest/resources/payment.html) resources
- [Testing the integration](/docs/api/shop-pay-wallet/testing) - the basics of testing your integration in production
- [Shop Pay Wallet API reference](/docs/api/shop-pay-wallet/reference/index) - a list of the various endpoints and how to use them