attachPaymentMethod
attachPaymentMethodAttach a payment method to a customer, enabling automated billing and payment processing.
Instructions
Attach a payment method to a customer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | Yes | The unique identifier of the customer. | |
| payment_method_id | Yes | The payment method ID (from payment gateway) to attach. | |
| 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. | |
| set_as_default | No | Whether to set as the default payment method. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow |