attachPaymentMethod

fun attachPaymentMethod(paymentMethodId: String, listener: CustomerSession.PaymentMethodRetrievalListener)

Attaches a PaymentMethod to a customer.

Parameters

paymentMethodId

the ID of the payment method to be attached

listener

a PaymentMethodRetrievalListener called when the API call completes with the attached PaymentMethod.