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"

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

Stripe API Key

Secret key for authenticating with Stripe. Starts with 'sk_' for live/test keys.

The customer ID to attach the PaymentMethod to

The PaymentMethod ID to attach

The customer ID the PaymentMethod is attached to

The full PaymentMethod object as a map

The PaymentMethod ID attached