Using query parameters

When promoting a page on social media or in email campaigns, you can use query parameters in the website link to provide users with quick access to Web Shop functionality. Using query parameters, you can configure the following actions to be performed when a user follows the link:

You can use multiple parameters in a single link, thus combining multiple functions.

Setting up authorization

Authorization via user ID

Use a link with a query parameter for automatic user authorization when navigating to the site. This option is suitable if your site is set up for authorization via User ID.

To automatically authenticate a user via User ID:

  1. Copy the link to the site.
  2. At the end of the link, add ?user-id=<user_ID>, where <user_ID> is the user ID to whom you are sending the link.

  • Example: https://webshop-external-demo.xsolla.site/?user-id=12345
  1. Send individual links to users.

After the user clicks on the link, they will be directed to the site and automatically authenticated.

Use a link with a query parameter for automatic user authorization when navigating to the site. This option is suitable if your site is set up for authentication via a deep link.

To automatically authenticate a user via a deep link:

  1. Copy the link to the site.
  2. At the end of the link, add ?deeplink=true.

  • Example: https://webshop-external-demo.xsolla.site/?deeplink=true

  1. Share the link in public materials or send individual links to users.

After the user clicks on the link, they will be directed to the site and automatically authenticated.

Setting up transition to item card

Use a link with a query parameter to redirect the user directly to the desired item when opening the site. For an unauthorized user, a card with information about the item specified in the query parameter will be opened. If the user is already logged in to the site, after clicking on the link, the payment interface for purchasing the item will open for them.

To direct a user to a specified item:

  1. Copy the link to the site.
  2. At the end of the link, add ?purchase-sku=<item_SKU>, where <item_SKU> is the SKU of the desired item.

  • To find the item SKU (using a virtual item as an example):
    1. Open your project in Publisher Account and go to the Items catalog > All items > Virtual item section.
    2. Navigate to the group of items where the item is located.
    3. Copy the SKU from the line of the specific item below its name.
    Example: https://webshop-external-demo.xsolla.site/?purchase-sku=my-awesome-crystal

  1. Share the link in public materials or send individual links to users.

After the user clicks on the link, they will be directed to the website where the item card with detailed information about the item is displayed, or to the payment interface for purchasing the item. This depends on whether the user is authenticated on the site.

Setting up transition to purchasing item

Use a link with query parameters to redirect the user to the payment UI for purchasing the specific item when opening the site. The link to purchase the item also includes one of the authorization parameters, allowing the user to log in automatically.

To set up:

  1. Copy the link to the website.
  2. Add one of the authentication parameters to the end of the link: ?user-id=<user_ID> or ?deeplink=true.
  3. After the authentication parameter, add ?purchase-sku=<item_SKU>, where <item_SKU> is the SKU of the item.

  • To find the item SKU (using a virtual item as an example):
    1. Open your project in Publisher Account and go to the Items catalog > All items > Virtual item section.
    2. Navigate to the group of items where the item is located.
    3. Copy the SKU from the line of the specific item below its name.

  • Example: https://webshop-external-demo.xsolla.site/?user-id=12345&purchase-sku=my-awesome-crystal

  1. Share the link in public materials or send individual links to users.

Setting up transition to purchasing subscription

Use a link with query parameters to redirect the user to the payment UI for purchasing the specific subscription plan when opening the site. The link to purchase the subscription also includes one of the authorization parameters, allowing the user to log in automatically.

To set up:

  1. Copy the link to the website.
  2. Add one of the authentication parameters to the end of the link: ?user-id=<user_ID> or ?deeplink=true.
  3. After the authentication parameter, add &purchase-subscription=<plan_ID>, where <plan_ID> is the subscription plan ID.
  1. To find the subscription plan ID:
    1. In your project in Publisher Account and go to the Items catalog > Subscriptions section.
    2. Copy the ID from the line of the specific subscription plan above its name.
  1. Example: https://webshop-external-demo.xsolla.site/?user-id=12345&purchase-subscription=8Mp0MT9R
  1. Share the link in public materials or send individual links to users.

Setting up purchase country

Use a link with the purchase-country query parameter to explicitly specify the user’s country when accessing Web Shop. This parameter sets the country during checkout, regardless of the country automatically detected by IP address.

To set it up:

  1. Copy the link to the website.
  2. Add one of the authentication parameters to the end of the link: ?user-id=<user_ID> or ?deeplink=true.
  3. After the authentication parameter, add &purchase-sku=<ITEM_SKU>&purchase-country=<COUNTRY_CODE>, where:
    • <ITEM_SKU> is the SKU of the item.
    • <COUNTRY_CODE> is a two-letter country code in ISO 3166-1 alpha-2 format. The parameter affects the displayed currency, taxes, and available payment methods in Web Shop.

Example: https://webshop-external-demo.xsolla.site/?user-id=12345&amp;purchase-sku=8Mp0MT9R&amp;purchase-country=MY

Note
This parameter ensures correct display of currency and payment methods in the Buy Button scenario, when a player is redirected from the game to the Web Shop payment form in an external browser.

Setting up application of promo code or coupon

Use a link with a query parameter to apply a promo code or coupon by the user. The code can be applied automatically after navigating to the website or by clicking the Redeem code button. You can also add parameters to the link for one of the authentication methods. To use a link with a code parameter, set up promo codes and coupons in the project.

Note
Only an authenticated user can apply the code. If the user is not logged in to the site, a modal window for authentication opens after clicking the link.
To apply the code:
  1. Copy the link to the site.
  2. At the end of the link, add one of the following query parameters:
    • ?redeem-code=<promo_code> — for automatic code redemption.
    • ?insert-code=<promo_code> — for redemption upon button click.

  • Instead of <promo_code>, specify the promo code or coupon that was generated in the Publisher Account or that you have set yourself.

  • Example: https://xsolla.webshop.com/?redeem-code=promo777

  • If you want the user to be automatically authenticated on the site, add one of the authentication parameters before the code parameter in the link: ?user-id=<user_ID> or ?deeplink=true.

  • Example: https://webshop-external-demo.xsolla.site/?user-id=12345&redeem-code=TESTCOUPON

  1. Share the link in public materials or send individual links to users.

After the authenticated user clicks on the link, they will be directed to the site, where the code will be activated automatically or the user will have the option to manually redeem the code.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: March 6, 2026

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!
We couldn't send your feedback
Try again later or contact us at doc_feedback@xsolla.com.