Skip to content

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 · 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

ArgumentTypeRequiredDescription
idID (pm_…)yes–
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe 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_keystringnoA 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_runbooleannotrue: 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

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 · 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

ArgumentTypeRequiredDescription
idID (pm_…)yes–
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe 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

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 · 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

ArgumentTypeRequiredDescription
customerIdID (cus_…)yes–
includeDetachedboolean or one of true, falsenoAlso list detached methods.
limitintegerno(1–100)
starting_afterID (pm_…)no–
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe 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

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 · 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

ArgumentTypeRequiredDescription
idID (pm_…)yes–
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe 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_keystringnoA 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_runbooleannotrue: 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

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
}