Create the subscription
First, you have to create a subscription using thecreateSubscription mutation. Include the customer’s address and contact details, and maybe even Ordered Products. If needed, you can edit these details later with the updateAddressDetails mutation.
Make sure that you get the subscription’s token from the mutation’s response.
Build the checkout URL
Now that the subscription is ready and you have the token, you can then redirect the customer to the checkout page. In the checkout URL, include the subscription’stoken as a cart_token attribute.
For example, if the token for the subscription is abcde12345, the checkout URL could look like this:
The above example includes optional product slug, see Build advanced checkout URLs for more information about how this works.When the customer clicks on this link, they will be directed to the checkout page with all their data already loaded. So next time you redirect a customer to our checkout, consider using this feature to make their experience even smoother. Happy selling!