Shell Python Node PHP C# Ruby

Associate a Customer

Specify a Customer

<input type="hidden" pl-input="customer_id" value="acct_3bW9JMapnT7sw7neax7ui">
new Payload.Form({
    form: document.getElementById('billing-details-form'),
    payment_method: { customer_id: 'acct_3bW9JMapnT7sw7neax7ui' }

Payment details can be associated with a customer account by adding a customer_id data input to the payment method form or setting the customer_id via the javascript interface.

Once card details have been stored, you can access the stored payment methods from the Customer Object.

cust = pl.Customer.get('acct_3bW9JMapnT7sw7neax7ui')
    .then(function(cust) {
cust = Payload::Customer.get('acct_3bW9JMapnT7sw7neax7ui')
$cust = Payload\Customer::get('acct_3bW9JMapnT7sw7neax7ui');
var cust = pl.Customer.get('acct_3bW9JMapnT7sw7neax7ui')

Set Payment Method as Default

<input type="hidden" pl-input="default_payment_method" value="true">

A default payment method of a customer account can be set by passing a default_payment_method data input with a value of true.

If a default payment method was specified, any payment charged for that customer will be triggered with their default payment method unless otherwise specified.