AttachMethod
Attach a PaymentMethod to a customer.
This task attaches an existing PaymentMethod to a Stripe customer and returns the attached PaymentMethod object.
yaml
type: "io.kestra.plugin.stripe.payment.AttachMethod"Examples
Attach a card to a customer
yaml
id: attach_pm
namespace: company.team
tasks:
  - id: attach_pm
    type: io.kestra.plugin.stripe.payment.AttachMethod
    apiKey: "{{ secret('STRIPE_API_KEY') }}"
    paymentMethodId: pm_123
    customerId: cus_456
Properties
apiKey *Requiredstring
Stripe API Key
Secret key for authenticating with Stripe. Starts with 'sk_' for live/test keys.
customerId *Requiredstring
The customer ID to attach the PaymentMethod to
paymentMethodId *Requiredstring
The PaymentMethod ID to attach
Outputs
customerId string
The customer ID the PaymentMethod is attached to
paymentMethodData object
The full PaymentMethod object as a map
paymentMethodId string
The PaymentMethod ID attached