delete_payment_method

Remove a payment method from a project. Destructive — buyers lose that way to pay at once; the row is soft-deleted so history survives.

Purpose

Take a gateway off a project. The row is soft-deleted rather than destroyed: subscriptions sold through it keep their gateway for refunds and history, and configuring the same provider in the same mode again later revives the row instead of creating a duplicate. What changes immediately is the checkout — buyers lose that way to pay.

Emits project.payment_method.deleted with a credential-free snapshot. Idempotent: an already-deleted id surfaces as RESOURCE_NOT_FOUND, exactly as an unknown or out-of-scope id does.

Destructive — confirm with a human first

Confirm the exact payment_method_id with the creator before calling. If the intent is "stop offering it for now", deactivate_payment_method does that reversibly.

Required ability

project-payment-method:delete

Input schema

{
  "type": "object",
  "required": ["project_id", "payment_method_id"],
  "properties": {
    "project_id": {
      "type": "string",
      "description": "UUID of the project the method belongs to."
    },
    "payment_method_id": {
      "type": "string",
      "description": "UUID of the payment method to remove."
    }
  }
}

Output shape

{
  "data": {
    "payment_method_id": "a15d70c8-3e46-4b92-b70f-58c9d2140e63",
    "deleted": true
  }
}

Example prompts

"Remove the PayPal gateway from project 7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13 — we've closed the account." (confirm the id first)

"Delete payment method a15d70c8-3e46-4b92-b70f-58c9d2140e63."

"We're dropping crypto payments entirely; take the gateway off the project."

Failure modes

  • VALIDATION_FAILED — the removal was refused for the method's current state.
  • RESOURCE_NOT_FOUND — unknown or already-deleted payment_method_id, a method of another project, or a project outside the token's scope.
  • AUTHENTICATION_REQUIRED — no authenticated user on the request.
  • TOKEN_MISSING_ABILITY — token lacks project-payment-method:delete.

How is this guide?

On this page

Subscriby is a product designed by you — for you.

No boardroom full of executives deciding what we ships next. Our roadmap always shaped by you with your feedback.

Share feedback or a request