Shell Python Node PHP C# Ruby

Using Processing Accounts


Select all active processing accounts

curl "https://api.payload.co/processing_accounts/?status=active" \
    -u secret_key_3bW9JMZtPVDOfFNzwRdfE:
processing_account = pl.ProcessingAccount.filter_by(
    status='active'
).all()
processing_account = Payload::ProcessingAccount.filter_by(
    status: 'active'
)
<?php
$processing_account = new Payload\ProcessingAccount::filter_by(array(
    'status' => 'active'
));
?>
processing_accounts = pl.ProcessingAccount.filter_by({
    status: 'active'
}).all()
var processing_account = pl.ProcessingAccount.filter_by(new {
    status="active"
});

Paying a processing account

curl "https://api.payload.co/transactions" \
    -u secret_key_3bW9JMZtPVDOfFNzwRdfE: \
    -d "amount=100" \
    -d "type=payment" \
    -d "processing_id=acct_3brhxEXpz2qEJ8vnIXbvW" \
    -d "payment_method[type]=card" \
    -d "payment_method[card][card_number]=4242 4242 4242 4242" \
    -d "payment_method[card][expiry]=12/25"
payment = pl.Payment.create(
    amount=100.0,
    processing_id='acct_3brhxEXpz2qEJ8vnIXbvW',
    payment_method=pl.Card(
        card_number='4242 4242 4242 4242',
        expiry='12/25'
    )
)
<?php
$payment = Payload\Transaction::create([
    'amount'=> 100.0,
    'type'=> 'payment',
    'processing_id'=>'acct_3brhxEXpz2qEJ8vnIXbvW',
    'payment_method' =>new Payload\PaymentMethod([
        'type'=> 'card',
        'card'=> ['card_number'=>'4242 4242 4242 4242', 'expiry'=>'12/25']
    ]),
]);
?>
pl.Payment.create({
    amount: 100.0,
    processing_id: 'acct_3brhxEXpz2qEJ8vnIXbvW',
    payment_method: new pl.Card({
        card_number: '4242 4242 4242 4242',
        expiry: '12/25'
    })
}).then(function(payment) {
})
var payment = pl.Payment.create(new {
    amount=100.0,
    processing_id="acct_3brhxEXpz2qEJ8vnIXbvW",
    payment_method=new pl.Card(new{
        card_number="4242 4242 4242 4242",
        expiry="12/25"
    })
});
payment = Payload::Payment.create(
    amount: 100.0,
    processing_id: 'acct_3brhxEXpz2qEJ8vnIXbvW',
    payment_method: Payload::Card(
        card_number: '4242 4242 4242 4242',
        expiry: '12/25'
    )
)

Accepting payments and making transfers with a processing account is simple. Once your account is activated, use the resulting account id with transactions, invoices, customers, and more. Many of the Payload APIs accept a processing_id field to specify the intended processing account association. See below for some of the common use cases:

Making a Payment

To make a payment to a specific processing account, set the processing_id parameter to the id of the desired processing account.

Segmenting Customers

If you are using Customers to manage your customer accounts, you can specify a primary processing account for each customer by setting the primary_processing_id.

Any payment made for this customer without a processing_id specified will default to the primary_processing_id.

Associating Invoices & Billing Schedules

If you are using invoicing or billing schedules to invoice and bill your customers, use the processing_id field to associate the intended processing account with your invoices and schedules.

Sending Payment Requests

If you're using payment links to send payment requests to your clients, use the processing_id field to associate the intended processing account for the resulting payment.

Building Your Own Checkout

If you're using secure inputs or checkout to integrate a custom checkout flow, both ui elements accept a processing_id option to specify the intended processing account for the resulting payments.