# com.atiproto.payment.subscription.cancel

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

## Definitions

### `com.atiproto.payment.subscription.cancel`

**Type**: `procedure`

Cancel an active subscription

#### Input

**Encoding**: `application/json`

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

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `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. |
| `accessUntil` | `string` (datetime) | No | Timestamp when access expires |
| `subscription` | `ref` → `com.atiproto.subscription#view` | No | Updated subscription record |
| `subscriptionUri` | `string` (at-uri) | No | URI of the updated subscription record |

## Raw Schema

```json
{
  "id": "com.atiproto.payment.subscription.cancel",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "subscriptionUri"
          ],
          "properties": {
            "workflow": {
              "ref": "com.atiproto.actions#inboundWorkflow",
              "type": "ref",
              "description": "Workflow callback envelope. Present on agent-driven callbacks; absent on initial calls."
            },
            "subscriptionUri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the subscription to cancel"
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "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."
            },
            "accessUntil": {
              "type": "string",
              "format": "datetime",
              "description": "Timestamp when access expires"
            },
            "subscription": {
              "ref": "com.atiproto.subscription#view",
              "type": "ref",
              "description": "Updated subscription record"
            },
            "subscriptionUri": {
              "type": "string",
              "format": "at-uri",
              "description": "URI of the updated subscription record"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Cancel an active subscription"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
