{"templateId":"openapi_docs","sharedDataIds":{"openAPIDocsStore":"oas-api/catalog/index.yaml","sidebar":"sidebar-catalog-en.sidebars.yaml"},"props":{"definitionId":"api/catalog/index.yaml","dynamicMarkdocComponents":[],"baseSlug":"/api/catalog","seo":{"title":"Order life cycle","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]},"description":"Understanding of the order life cycle helps you to [track orders](https://developers.xsolla.com/virtual-goods/own-ui/client-side-token-generation/set-up-order-tracking/?tabs=100-trackOrderOnClient_200-api&_xm=4170963201673921623) and correctly implement post-purchase logic, e.g., item delivery.\n\nThe order moves through the following statuses:\n\n<table>\n  <thead>\n  <tr>\n     <td>Status</td>\n     <td>Description</td>\n     <td>Notes</td>\n  </tr>\n  </thead>\n  <tbody>\n    <tr>\n     <td> <code>new</code> </td>\n     <td>Order is created. The system is waiting for payment confirmation.</td>\n     <td>Transaction status descriptions can be found in <a href=\"https://developers.xsolla.com/api/pay-station/reports/find-transactions#reports/find-transactions/t=request&in=query&path=status\">Pay Station API documentation</a>.</td>\n    </tr>\n    <tr>\n     <td> <code>paid</code> </td>\n     <td>Order is paid (the transaction moved to the <code>done</code> status), and the item can be granted to the user. </td>\n     <td>The order remains in the <code>new</code> status until the payment is confirmed. </td>\n    </tr>\n    <tr>\n     <td> <code>done</code> </td>\n     <td>Item is granted to the user. </td>\n     <td> — </td>\n    </tr>\n    <tr>\n     <td> <code>canceled</code> </td>\n     <td>The payment was refunded. </td>\n     <td>The order moves to this status when the <a href=\"https://developers.xsolla.com/api/pay-station/reports/find-transactions#reports/find-transactions/t=request&in=query&path=status\">transaction status</a> changes to <code>refunded</code>. </td>\n    </tr>\n    <tr>\n     <td> <code>expired</code> </td>\n     <td> Creating a new order for a <a href=\"https://developers.xsolla.com/api/catalog/limits-overview\">limited</a> item, promo code, or promotion moves any previous unpaid order containing that item to the <code>expired</code> status. Only the most recent order can be paid for. </td>\n     <td>If a user attempts to pay for an expired order, the payment UI will display a <code>2002</code> error, and the payment will fail. </td>\n    </tr>\n  </tbody>\n</table>\n\n![Order life cycle](https://cdn.xsolla.net/developers/current/images/api_docs/order-life-cycle.svg)\n\n<div class=\"note\">\n  <p><b>Note</b></p>\n  <p>When the order moves to the <code>expired</code> status while the user is completing a payment, but the payment is successful, the order moves from <code>expired</code> to <code>paid</code> status. This applies only if the purchase limit for the order’s item won’t be exceeded upon payment.</p>\n</div>\n"},"itemId":"order-life-cycle","disableAutoScroll":true,"metadata":{},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"remoteAddr":{"hostname":"xsolla.redocly.app","port":4000,"ipAddress":"185.30.21.18"},"lang":"en","env":{"PUBLIC_REDOCLY_BRANCH_NAME":"realm"}}},"pagePropGetterError":{"message":"","name":""}},"slug":"/api/catalog/order-life-cycle","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}