### What is this link? Track with Shop is a universal link available to you to provide the user with a direct path to see their order details in the Shop App. It is constructable for all orders you place with the Shop Pay Wallet API. This link should be provided to the user at the end of the flow, after any purchase is completed. ### Generating the Link The link is constructable with tokens you already have: your Shop Pay API `client_id` (same one used for [authorization](/docs/api/shop-pay-wallet/reference/index#authorizations)) and the `order_id` (same one used to [retrieve payment details for the order](/docs/api/shop-pay-wallet/reference/index#confirm-an-order-and-retrieve-payment-information)). Those two tokens are concatenated with a `::` delimiter and encoded in URL-safe Base64 encoding. Specifically, our library implementation of URL-safe Base64 returns the Base64-encoded version of the string. This method complies with _Base 64 Encoding with URL and Filename Safe Alphabet_ in [RFC 4648](https://www.rfc-editor.org/rfc/rfc4648#section-5). The alphabet uses `-` instead of `+` and `_` instead of `/`. Padding characters, `=`, are removed. #### Example Take, for example, `client_id` as `client1234` and `order_id` as `order1234`, the link you would provide to the buyer would be constructed as follows (ruby): ```ruby client_id = 'client1234' order_id = 'order1234' identifier = client_id + '::' + order_id # => client1234::order1234 encoded_identifier = Base64.urlsafe_encode64(identifier, padding: false) # => Y2xpZW50MTIzNDo6b3JkZXIxMjM0 link = 'https://shop.app/po/' + encoded_identifier # => https://shop.app/po/Y2xpZW50MTIzNDo6b3JkZXIxMjM0 ``` So in this example the link you would send the buyer is `https://shop.app/po/Y2xpZW50MTIzNDo6b3JkZXIxMjM0` ## Related resources - [Getting Started with the Shop Pay Wallet API](/docs/api/shop-pay-wallet/getting-started) - [Authorization](/docs/api/shop-pay-wallet/authorization) - [Shop Pay Wallet API reference](/docs/api/shop-pay-wallet/reference/index) - [Testing the integration](/docs/api/shop-pay-wallet/testing) - REST Admin API's [`Checkout`](/docs/api/admin-rest/latest/resources/checkout) resource. - REST Admin API's [`Payment`](/docs/api/admin-rest/latest/resources/payment) resource. - REST Admin API's [`Order`](/docs/api/admin-rest/latest/resources/order) resource.