Regional sales restrictions

How it works

When you set up regional items restrictions, Xsolla detects the user’s country and displays items available in that country.

The user’s country is passed in the country parameter when requesting a catalog (Get virtual items list API call). If the country is not explicitly specified, it is determined based on the user’s IP address. Prices are then selected for the item catalog based on the user’s country.

Who can use it

Partners who want to limit item availability in certain regions.

Integration flow

To set up regional restrictions:

  1. Create regions where items’ SKUs are available by calling the Create region API.
  2. Add the region ID to the regions array by calling the API from the Admin category of the Virtual items & currency group when creating or updating an item’s SKU.

Note
The country code is specified in ISO 3166-1 alpha-2 format.
Example of the request:
Copy
Full screen
Small screen
"regions": [{
     “id”: “123”
  }, {
     “id”: “456”
  }
]

Example

  1. Create the North America region that includes the USA and Canada.
Copy
Full screen
Small screen
{
  "name": {
     "en-US": "North America",
   },
  "countries": ["US", "CA"]
}
  1. Add the region ID to the regions array when updating the SKU of an existing item by calling the Update virtual currency API.
The item is now available to customers in North America and Europe only.
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.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!
Last updated: January 22, 2024

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!