Regional sales restrictions
How it works
Regional sale restrictions let you control which countries your virtual items or currency packages can be sold. Xsolla detects the user’s country and displays only the items available in that region.
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. The catalog is then generated based on the user’s country.
Who can use it
Partners who want to limit item availability of items in certain countries or regions.
Integration flow
To set up regional restrictions:
- Create regions where your items are available by calling the Create region API. The API returns the region ID, which you will need at the next step.
Copy
- json
1{
2 "name": {
3 "en-US": "North America",
4 },
5 "countries": ["US", "CA"]
6}
Note
The country code is specified in ISO 3166-1 alpha-2 format. Check the list of countries supported by Xsolla before creating a region.
- Pass 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.
regions
array with IDs of regions where items can be sold:Copy
- json
1"regions": [
2 {
3 "id": 123
4 },
5 {
6 "id": 456
7 }
8]
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.