Xsolla-logo

Get current user's cart

get/v2/project/{project_id}/cart

Returns the current user's cart.

Request
Security:
path Parameters
project_id
required
integer

Project ID.

Example: 44056
query Parameters
currency
string
Default: "USD"

The currency which prices are displayed in (USD by default). Three-letter currency code per ISO 4217.

locale
string
Default: "en"

Response language. Two-letter lowercase language code per ISO 639-1.

Responses
200

The cart with items was successfully returned.

Request samples
curl -i -X GET \
  'https://store.xsolla.com/api/v2/project/:project_id/cart?currency=USD&locale=en' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "cart_id": "cart_id",
  • "is_free": false,
  • "items": [
    ],
  • "price": {
    }
}