# com.atiproto.payment.cart.put

> 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.payment.cart.put)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4x5dcv6u4wlkjcssto7f22nu/com.atiproto.payment.cart.put/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4x5dcv6u4wlkjcssto7f22nu/com.atiproto.payment.cart.put/examples)

## Definitions

### `com.atiproto.payment.cart.put`

**Type**: `procedure`

Update a cart. Only open carts can be updated.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the cart to update |
| `record` | `ref` → `com.atiproto.cart` | Yes |  |
| `workflow` | `ref` → `com.atiproto.actions#inboundWorkflow` | No | Workflow callback envelope. Present on agent-driven callbacks; absent on initial calls. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | New CID of the updated record |
| `uri` | `string` (at-uri) | No | Updated cart record URI |
| `workflow` | `ref` → `com.atiproto.actions#outboundWorkflow` | No | Workflow envelope. When present, the agent runs the actions and calls back. When absent, this is the final native result. |

## Raw Schema

```json
{
  "id": "com.atiproto.payment.cart.put",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "record"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the cart to update"
            },
            "record": {
              "ref": "com.atiproto.cart",
              "type": "ref"
            },
            "workflow": {
              "ref": "com.atiproto.actions#inboundWorkflow",
              "type": "ref",
              "description": "Workflow callback envelope. Present on agent-driven callbacks; absent on initial calls."
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "New CID of the updated record"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "Updated cart record URI"
            },
            "workflow": {
              "ref": "com.atiproto.actions#outboundWorkflow",
              "type": "ref",
              "description": "Workflow envelope. When present, the agent runs the actions and calls back. When absent, this is the final native result."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Update a cart. Only open carts can be updated."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
