post_payout_accounts_by_orgid_clawbacks_by_clawbackid_payment

Changes data · you confirm first

Calls POST /api/payout-accounts/{orgId}/clawbacks/{clawbackId}/payment as the signed-in person · REST reference

Start repaying one of the organization's clawbacks, by bank account or card

Opens Stripe's embedded Checkout for a repayment of what the clawback still owes — a charge on Pawsitive Future's Stripe account, paid in the portal with no Stripe sign-in. The clawback must be this organization's (404 otherwise) and repayable now (409 CLAWBACK_NOT_REPAYABLE): being collected, its payout transfer reversed or needing none. The amount is at most what may still be taken (409 CLAWBACK_OVER_RECOVERY, see ClawbackRepaymentOffer). When Pawsitive Future decided the clinic pays processing, and the Terms allowing it are in effect, the processor's fee is added as its own line. Nothing is recorded here: Stripe's payment_intent.succeeded records the repayment, moves it into the clinic's negative Stripe balance so Stripe does not also debit its bank, and refunds whatever arrived beyond what could still be taken. Needs execute:UpdateOrgCommand in this organization, or platform staff.

Arguments

ArgumentTypeDescription
orgIdpathstring (uuid)required
clawbackIdpathstring (uuid)required
bodyJSONobjectrequiredThe request body, as a JSON object. Its fields are listed below.

Fields of body

FieldTypeDescription
amountintegerrequiredCENTS repaid, fee excluded.
method"us_bank_account" | "card"required

Example call

A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "post_payout_accounts_by_orgid_clawbacks_by_clawbackid_payment",
    "arguments": {
      "orgId": "11111111-1111-4111-8111-111111111111",
      "clawbackId": "11111111-1111-4111-8111-111111111111",
      "body": {
        "amount": 1,
        "method": "us_bank_account"
      }
    }
  }
}
Confirmation
The client shows the person the exact request and waits. Nothing runs until they tick Make this change. See Reading and changing.

Result

On success (HTTP 201) the tool returns one text item holding the API's JSON, pretty-printed.

The payment form to mount, and what the clinic is charged

json
{
  "amountCents": 1,
  "clientSecret": "string",
  "currency": "string",
  "feeCents": 1,
  "publishableKey": "string"
}

Fields

FieldTypeDescription
amountCentsintegerCENTS charged, fee included.
clientSecretstringThe embedded Checkout Session's client secret.
currencystring
feeCentsintegerCENTS of processing fee in it; 0 when the clinic pays none.
publishableKeystringThe Stripe publishable key (pk_…) the form loads with.

When it fails

A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.

400

The request was malformed or failed a guard.

403

Not platform staff and not holding execute:UpdateOrgCommand in the organization.

404

No clawback of this organization has the id.

409

The clawback is not repayable now (CLAWBACK_NOT_REPAYABLE), or the amount is more than may still be taken (CLAWBACK_OVER_RECOVERY).

What the model is shown

This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.

json
{
  "name": "post_payout_accounts_by_orgid_clawbacks_by_clawbackid_payment",
  "description": "POST /api/payout-accounts/{orgId}/clawbacks/{clawbackId}/payment — Opens Stripe's embedded Checkout for a repayment of what the clawback still owes — a charge on Pawsitive Future's Stripe account, paid in the portal with no Stripe sign-in. The clawback must be this organization's (404 otherwise) and repayable now (409 `CLAWBACK_NOT_REPAYABLE`): being collected, its payout transfer reversed or needing none. The amount is at most what may still be taken (409 `CLAWBACK_OVER_RECOVERY`, see `ClawbackRepaymentOffer`). When Pawsitive Future decided the clinic pays processing, and the Terms allowing it are in effect, the processor's fee is added as its own line. Nothing is recorded here: Stripe's `payment_intent.succeeded` records the repayment, moves it into the clinic's negative Stripe balance so Stripe does not also debit its bank, and refunds whatever arrived beyond what could still be taken. Needs `execute:UpdateOrgCommand` in this organization, or platform staff.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "orgId": {
        "type": "string"
      },
      "clawbackId": {
        "type": "string"
      },
      "body": {
        "type": "string",
        "description": "The JSON request body: { amount*: integer (CENTS repaid, fee excluded.); method*: one of \"us_bank_account\" | \"card\" }"
      }
    },
    "required": [
      "orgId",
      "clawbackId",
      "body"
    ]
  },
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": false
  }
}