> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesbricks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage My Subscription

With the **Manage My Subscription** feature, you can embed a link within your app where your customers can manage their subscriptions (for example, increase license counts or change plans) and manage their payments.

<Steps>
  <Step title="Gather the customer's subscription ID.">
    This is referenced as `subscription_id` within the Webhooks and APIs.

    This data can be captured through our Webhooks (for example, the **order.complete** webhook), or queried using our GraphQL API.
  </Step>

  <Step title="Build a link within your app where the customer can navigate to manage their subscription." />

  <Step title="When the link is clicked, your system will need to make a call to Salesbricks' GraphQL API.">
    <Tip>
      Insert the **subscriptionId** as the variable within the call below.

      For more guidance with using the GraphQL API, refer to our [API Reference](/api-reference/getting-started/overview).
    </Tip>

    `https://api.salesbricks.com/api/v1/graphql`

    ```graphql GraphQL theme={null}
    mutation($subscriptionId: String!){
      createSubscriptionToken(subscriptionId: $subscriptionId){
        token {
          id
          expiresAt
          buyer {
            id
          }
        }
      }
    }
    ```

    The response to this call includes a temporary access token:

    ```json JSON theme={null}
    {
      "data": {
        "createSubscriptionToken": {
          "token": {
            "id": "546c21827-8009-4f13-933d-22c8c8a9fb9a",
            "expiresAt": "2024-01-05T23:38:16.667405+00:00",
            "buyer": {
              "id": "997c5c51-17a5-4759-956e-bb87f7afd289"
            }
          }
        }
      }
    }
    ```
  </Step>

  <Step title="Append the token ID from the response to the following base URL to create the customer-specific subscription link:">
    `https://app.salesbricks.com/subscription-management/` + `<TOKEN_ID>`

    **Example:** `https://app.salesbricks.com/subscription-management/546c21827-8009-4f13-933d-22c8c8a9fb9a`
  </Step>

  <Step title="Launch this URL in a separate tab for the best experience." />
</Steps>
