> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Order

> Returns one order

```
GET /openapi/memorylake/admin/v1/billing/orders/{order_id}
```

Returns one order. Orders of other teams are reported as not found.

<Note>
  **Permission required:** `order:read`
</Note>

### Path Parameters

<ParamField path="order_id" type="string" required>
  Order number (`order_id`)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/billing/orders/2ea2c7c1d2145b58dc6229dde0cca855' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Billing Order object">
    <ResponseField name="amount" type="object">
      Amount paid (or due)

      <Expandable title="Money object">
        <ResponseField name="amount" type="integer">Amount in the currency's smallest unit (cents for usd)</ResponseField>
        <ResponseField name="currency" type="string">Lowercase ISO 4217 currency code</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="created_at" type="integer">Unix seconds</ResponseField>
    <ResponseField name="invoice_id" type="string">The invoice (GET /billing/invoices/\{invoice\_id}); null when none was issued</ResponseField>
    <ResponseField name="order_id" type="string">Order number (the trade number shown on receipts)</ResponseField>
    <ResponseField name="receipt_url" type="string">The payment provider's receipt page; null when none</ResponseField>
    <ResponseField name="status" type="string">Payment state; closed = abandoned before payment. One of: `pending`, `succeeded`, `failed`, `closed`, `refunded`, `disputed`.</ResponseField>
    <ResponseField name="tokens_granted" type="integer">Tokens the order adds to the balance once paid (0 for subscription payments — their tokens arrive as a subscription grant)</ResponseField>
    <ResponseField name="type" type="string">onetime = a credit purchase; auto\_topup = an automatic top-up charge; subscription = a subscription payment</ResponseField>

    <ResponseField name="refunded_amount" type="object">
      Amount refunded, when any

      <Expandable title="Money object">
        <ResponseField name="amount" type="integer">Amount in the currency's smallest unit (cents for usd)</ResponseField>
        <ResponseField name="currency" type="string">Lowercase ISO 4217 currency code</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="refunded_at" type="integer">Unix seconds</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "amount": {
        "amount": 1999,
        "currency": "usd"
      },
      "created_at": 1760000000,
      "invoice_id": "8ed8f98873f8216d20a57a529c68b80f",
      "order_id": "15180b2f335b821ab2d276984445fd81",
      "receipt_url": "https://example.com/receipt",
      "status": "pending",
      "tokens_granted": 1200000,
      "type": "onetime",
      "refunded_amount": {
        "amount": 1999,
        "currency": "usd"
      },
      "refunded_at": 1760000000
    }
  }
  ```
</ResponseExample>

### Errors

Errors answer with `success: false`, a `message` and an `error_code`. See [Error Codes](/features/memorylake/api-reference/errors) for every code.

| Status | Meaning |
| - | - |
| `401` | The API key is missing, invalid, disabled or expired |
| `403` | The key is not allowed to do this |
| `404` | The resource does not exist |
| `422` | The body or a parameter failed validation |
| `429` | Too many requests. Wait for the time in `Retry-After` |
| `500` | Server-side error |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.