# Payment methods tools

> MCP tools for Payment methods: payment_methods_delete, payment_methods_get, payment_methods_list, payment_methods_set_default.

- `payment_methods_delete`: Detach a payment method
- `payment_methods_get`: Get a payment method
- `payment_methods_list`: List a customer's payment methods
- `payment_methods_set_default`: Make a payment method the default

## `payment_methods_delete`

**Detach a payment method.** Operation [`payment_methods.delete`](https://ownrecord.io/docs/reference/payment-methods-delete.md) · Brand level · permission `customers:write` · risk tier `write` · since M5

Detaches a saved payment method: it is never charged again and stops being the default (subscriptions then
charge the customer's new default, if any). It stays readable with `detachedAt`; the processor detaches it
too, right after. Detaching a detached method changes nothing. Emits `payment_method.detached`.

Annotations: `readOnlyHint: false` · `destructiveHint: true` · `idempotentHint: true` · `openWorldHint: true`

### Arguments

| Argument          | Type         | Required | Description                                                                                                                                                                                              |
| ----------------- | ------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`              | ID (`pm_…`)  | yes      | –                                                                                                                                                                                                        |
| `entity_id`       | ID (`ent_…`) | no       | Optional: the brand's legal entity (ent\_…); `brand_id` alone is enough.                                                                                                                                 |
| `brand_id`        | ID (`brd_…`) | no       | The brand to act on (brd\_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand.                                                                 |
| `idempotency_key` | string       | no       | A unique string for this change. Retrying with the same key and arguments never acts twice. When left out, the server generates one and returns it in the result's `idempotency_key`. (1–255 characters) |
| `dry_run`         | boolean      | no       | true: check permissions and rules and compute the result, then roll everything back. Nothing is saved. (default `false`)                                                                                 |

- **Brand:** pass `brand_id` with an organization or entity key; a brand key acts on its own brand.
- **Idempotency:** the result returns the `idempotency_key` used, yours or one the server generated. Retry with it: a call with the same key and arguments never acts twice (keys are kept for 24 hours).
- **Dry run:** supported. `dry_run: true` checks permissions and rules and computes the result, then rolls everything back.

### Errors

- [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found): No payment method with this ID is visible to the request.
- [`version_conflict`](https://ownrecord.io/docs/reference/errors.md#version_conflict): The customer's methods changed at the same time; retry.
- [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied): You can't change this brand's customers (`customers:write`).

### Example

**Remove an old card**

Arguments:

```json
{
  "id": "pm_01m4tx5nj8emwbyf7y9vcf47zd",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz",
  "idempotency_key": "8d0c5f8e-4b7a-4e43-9b0f-2f6a0c1d9e21"
}
```

Result `output`:

```json
{
  "id": "pm_01m4tx5nj8emwbyf7y9vcf47zd",
  "object": "payment_method",
  "livemode": false,
  "brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4",
  "customerId": "cus_01m4tx5nj8emwbyf7y9vcf47z4",
  "processor": "stripe",
  "processorConnectionId": "pcon_01m4tx5nj8emwbyf7y9vcf47zf",
  "processorRef": {
    "paymentMethodId": "pm_1QExampleCard"
  },
  "type": "card",
  "card": {
    "brand": "visa",
    "last4": "4242",
    "expMonth": 12,
    "expYear": 2029,
    "country": "DE"
  },
  "isDefault": false,
  "source": "checkout",
  "createdAt": "2026-10-13T12:00:00.000Z",
  "detachedAt": "2026-10-20T09:00:00.000Z"
}
```

## `payment_methods_get`

**Get a payment method.** Operation [`payment_methods.get`](https://ownrecord.io/docs/reference/payment-methods-get.md) · Brand level · permission `customers:read` · risk tier `read` · since M5

Reads a saved payment method: its type, card details (no number), customer and whether it is the default.

Annotations: `readOnlyHint: true` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Arguments

| Argument    | Type         | Required | Description                                                                                                                              |
| ----------- | ------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `id`        | ID (`pm_…`)  | yes      | –                                                                                                                                        |
| `entity_id` | ID (`ent_…`) | no       | Optional: the brand's legal entity (ent\_…); `brand_id` alone is enough.                                                                 |
| `brand_id`  | ID (`brd_…`) | no       | The brand to act on (brd\_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand. |

- **Brand:** pass `brand_id` with an organization or entity key; a brand key acts on its own brand.
- **Read-only:** changes nothing; `idempotency_key` is ignored.

### Errors

- [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found): No payment method (or customer) with this ID is visible to the request.
- [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied): You can't see this brand's customers (`customers:read`).

### Example

**A saved card**

Arguments:

```json
{
  "id": "pm_01m4tx5nj8emwbyf7y9vcf47zd",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz"
}
```

Result `output`:

```json
{
  "id": "pm_01m4tx5nj8emwbyf7y9vcf47zd",
  "object": "payment_method",
  "livemode": false,
  "brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4",
  "customerId": "cus_01m4tx5nj8emwbyf7y9vcf47z4",
  "processor": "stripe",
  "processorConnectionId": "pcon_01m4tx5nj8emwbyf7y9vcf47zf",
  "processorRef": {
    "paymentMethodId": "pm_1QExampleCard"
  },
  "type": "card",
  "card": {
    "brand": "visa",
    "last4": "4242",
    "expMonth": 12,
    "expYear": 2029,
    "country": "DE"
  },
  "isDefault": true,
  "source": "checkout",
  "createdAt": "2026-10-13T12:00:00.000Z",
  "detachedAt": null
}
```

## `payment_methods_list`

**List a customer's payment methods.** Operation [`payment_methods.list`](https://ownrecord.io/docs/reference/payment-methods-list.md) · Brand level · permission `customers:read` · risk tier `read` · since M5

Lists the payment methods a customer saved (from a subscription checkout or a setup checkout), newest first:
the card's brand, last four digits, expiry and country, and which one is the default that subscriptions charge.
Card numbers never reach Ownrecord. Detached methods are listed only with `includeDetached`.

Paginate with `limit` (1–100, default 10) and `starting_after` (the `next_cursor` of the previous page).

Annotations: `readOnlyHint: true` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Arguments

| Argument          | Type                              | Required | Description                                                                                                                              |
| ----------------- | --------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `customerId`      | ID (`cus_…`)                      | yes      | –                                                                                                                                        |
| `includeDetached` | boolean or one of `true`, `false` | no       | Also list detached methods.                                                                                                              |
| `limit`           | integer                           | no       | (1–100)                                                                                                                                  |
| `starting_after`  | ID (`pm_…`)                       | no       | –                                                                                                                                        |
| `entity_id`       | ID (`ent_…`)                      | no       | Optional: the brand's legal entity (ent\_…); `brand_id` alone is enough.                                                                 |
| `brand_id`        | ID (`brd_…`)                      | no       | The brand to act on (brd\_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand. |

- **Brand:** pass `brand_id` with an organization or entity key; a brand key acts on its own brand.
- **Read-only:** changes nothing; `idempotency_key` is ignored.

### Errors

- [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found): No payment method (or customer) with this ID is visible to the request.
- [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied): You can't see this brand's customers (`customers:read`).

### Example

**A customer's cards**

Arguments:

```json
{
  "customerId": "cus_01m4tx5nj8emwbyf7y9vcf47z4",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz"
}
```

Result `output`:

```json
{
  "object": "list",
  "data": [
    {
      "id": "pm_01m4tx5nj8emwbyf7y9vcf47zd",
      "object": "payment_method",
      "livemode": false,
      "brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4",
      "customerId": "cus_01m4tx5nj8emwbyf7y9vcf47z4",
      "processor": "stripe",
      "processorConnectionId": "pcon_01m4tx5nj8emwbyf7y9vcf47zf",
      "processorRef": {
        "paymentMethodId": "pm_1QExampleCard"
      },
      "type": "card",
      "card": {
        "brand": "visa",
        "last4": "4242",
        "expMonth": 12,
        "expYear": 2029,
        "country": "DE"
      },
      "isDefault": true,
      "source": "checkout",
      "createdAt": "2026-10-13T12:00:00.000Z",
      "detachedAt": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## `payment_methods_set_default`

**Make a payment method the default.** Operation [`payment_methods.set_default`](https://ownrecord.io/docs/reference/payment-methods-set-default.md) · Brand level · permission `customers:write` · risk tier `write` · since M5

Makes a saved payment method its customer's default: subscriptions that don't name their own method charge it
from now on. The previous default stays saved. Detached methods can't be the default. Emits
`payment_method.updated` for both.

Annotations: `readOnlyHint: false` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Arguments

| Argument          | Type         | Required | Description                                                                                                                                                                                              |
| ----------------- | ------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`              | ID (`pm_…`)  | yes      | –                                                                                                                                                                                                        |
| `entity_id`       | ID (`ent_…`) | no       | Optional: the brand's legal entity (ent\_…); `brand_id` alone is enough.                                                                                                                                 |
| `brand_id`        | ID (`brd_…`) | no       | The brand to act on (brd\_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand.                                                                 |
| `idempotency_key` | string       | no       | A unique string for this change. Retrying with the same key and arguments never acts twice. When left out, the server generates one and returns it in the result's `idempotency_key`. (1–255 characters) |
| `dry_run`         | boolean      | no       | true: check permissions and rules and compute the result, then roll everything back. Nothing is saved. (default `false`)                                                                                 |

- **Brand:** pass `brand_id` with an organization or entity key; a brand key acts on its own brand.
- **Idempotency:** the result returns the `idempotency_key` used, yours or one the server generated. Retry with it: a call with the same key and arguments never acts twice (keys are kept for 24 hours).
- **Dry run:** supported. `dry_run: true` checks permissions and rules and computes the result, then rolls everything back.

### Errors

- [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found): No payment method with this ID is visible to the request.
- [`version_conflict`](https://ownrecord.io/docs/reference/errors.md#version_conflict): The customer's methods changed at the same time; retry.
- [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied): You can't change this brand's customers (`customers:write`).
- [`payment_method_detached`](https://ownrecord.io/docs/reference/errors.md#payment_method_detached): The payment method was detached.

### Example

**Use the new card**

Arguments:

```json
{
  "id": "pm_01m4tx5nj8emwbyf7y9vcf47ze",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz",
  "idempotency_key": "8d0c5f8e-4b7a-4e43-9b0f-2f6a0c1d9e21"
}
```

Result `output`:

```json
{
  "id": "pm_01m4tx5nj8emwbyf7y9vcf47ze",
  "object": "payment_method",
  "livemode": false,
  "brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4",
  "customerId": "cus_01m4tx5nj8emwbyf7y9vcf47z4",
  "processor": "stripe",
  "processorConnectionId": "pcon_01m4tx5nj8emwbyf7y9vcf47zf",
  "processorRef": {
    "paymentMethodId": "pm_1QExampleCard"
  },
  "type": "card",
  "card": {
    "brand": "visa",
    "last4": "4242",
    "expMonth": 12,
    "expYear": 2029,
    "country": "DE"
  },
  "isDefault": true,
  "source": "checkout",
  "createdAt": "2026-10-13T12:00:00.000Z",
  "detachedAt": null
}
```
