# com.atiproto.recipient.payment.cart.get

> Published by [atiproto.com](https://lexicon.garden/identity/did:plc:4x5dcv6u4wlkjcssto7f22nu)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:4x5dcv6u4wlkjcssto7f22nu/com.atiproto.recipient.payment.cart.get)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4x5dcv6u4wlkjcssto7f22nu/com.atiproto.recipient.payment.cart.get/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4x5dcv6u4wlkjcssto7f22nu/com.atiproto.recipient.payment.cart.get/examples)

## Definitions

### `com.atiproto.recipient.payment.cart.get`

**Type**: `query`

Get a cart that pays the authenticated user — a cart whose items target this user. Look up by cart URI, by a contained item record URI, or by a contained subscription record URI. One of `uri`, `itemUri`, or `subscriptionUri` is required.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | No | AT-URI of the cart record. Takes precedence over itemUri and subscriptionUri. |
| `itemUri` | `string` (at-uri) | No | AT-URI of an item record received by the authed user. Returns the cart that contains this item. Ignored if uri is provided. |
| `subscriptionUri` | `string` (at-uri) | No | AT-URI of a subscription record received by the authed user. Returns the cart that contains this subscription. Ignored if uri or itemUri is provided. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | Cart record CID |
| `uri` | `string` (at-uri) | Yes | Cart record URI |
| `cart` | `ref` → `com.atiproto.cart#view` | Yes | The cart record data |
| `items` | `array` | Yes | Resolved item records in this cart that target the authed user |
| `subscriptions` | `array` | Yes | Resolved subscription records in this cart that target the authed user |

## Raw Schema

```json
{
  "id": "com.atiproto.recipient.payment.cart.get",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cart",
            "items",
            "subscriptions"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "Cart record CID"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "Cart record URI"
            },
            "cart": {
              "ref": "com.atiproto.cart#view",
              "type": "ref",
              "description": "The cart record data"
            },
            "items": {
              "type": "array",
              "items": {
                "ref": "com.atiproto.item#view",
                "type": "ref"
              },
              "description": "Resolved item records in this cart that target the authed user"
            },
            "subscriptions": {
              "type": "array",
              "items": {
                "ref": "com.atiproto.subscription#view",
                "type": "ref"
              },
              "description": "Resolved subscription records in this cart that target the authed user"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "uri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the cart record. Takes precedence over itemUri and subscriptionUri."
          },
          "itemUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of an item record received by the authed user. Returns the cart that contains this item. Ignored if uri is provided."
          },
          "subscriptionUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of a subscription record received by the authed user. Returns the cart that contains this subscription. Ignored if uri or itemUri is provided."
          }
        }
      },
      "description": "Get a cart that pays the authenticated user — a cart whose items target this user. Look up by cart URI, by a contained item record URI, or by a contained subscription record URI. One of `uri`, `itemUri`, or `subscriptionUri` is required."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
