attachPaymentMethod
attachPaymentMethodAttach a payment method to a customer, enabling automated billing and payment processing.
Instructions
Attach a payment method to a customer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customerId": "<customerId>",
"payment_method_id": "<payment_method_id>"
},
"name": "attachPaymentMethod"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connector | No | Payment provider connector config object (e.g., {"name": "stripe", "reference_id": "cus_xxx"}). Either field is optional. If omitted, backend auto-detects from resource mappings. | |
| customerId | Yes | The unique identifier of the customer. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow | |
| set_as_default | No | Whether to set as the default payment method. | |
| payment_method_id | Yes | The payment method ID (from payment gateway) to attach. |