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:
- Create regions where items’ SKUs are available by calling the Create region API.
- 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. Check the list of countries supported by Xsolla before uploading the CSV file.
Copy
- http
"regions": [{
“id”: “123”
}, {
“id”: “456”
}
]
Example
- Create the North America region that includes the USA and Canada.
Copy
- http
{
"name": {
"en-US": "North America",
},
"countries": ["US", "CA"]
}
- Add the region ID to the
regions
array when updating the SKU of an existing item by calling the Update virtual currency API.
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.