Pay
Connect Payout Methods
Back-End API

Enrolling Payout Recipients via Back-End API

Learn how to create payment methods directly through the Payment Methods API


The Payment Methods API allows you to create bank account payment methods directly from your backend for payout recipients. This gives you full programmatic control over the enrollment flow and enables you to build custom workflows integrated with your application logic. Use the Payment Methods API when you need server-side enrollment processing, batch operations, or automated recipient onboarding.

Prerequisites

Before creating payment methods through the API, it's helpful to learn about the following topics.


When to Use Back-End API


Use the Payment Methods API when you need direct, programmatic control over payouts enrollment from your backend. The API enables server-side enrollment flows where you manage the entire process through API calls.

By using the Back-End API, you handle enrollment data securely on your backend while Payload manages bank verification, compliance checks, and payout processing. You have complete control over enrollment timing, error handling, and integration with your business logic.

Common use cases

  • Batch Enrollment Operations: Enroll multiple recipients programmatically
  • Automated Onboarding: Create payment methods triggered by scheduled jobs or automated processes
  • Custom Enrollment Flows: Build enrollment experiences tailored to your business needs
  • Data Migration: Import existing bank accounts from other systems

Creating a Payment Method

Create a bank account payment method for receiving payouts with an account.

Link to Existing Account

Create a payment method and link it to an existing account using account_id.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a bank account payment method for an existing payout recipient account
 
payment_method = pl.PaymentMethod.create(
    type='bank_account',
    transfer_type='receive_only',
    account_id='acct_recipient123',
    bank_account={
        'account_number': '000123456789',
        'routing_number': '110000000',
        'account_type': 'checking'
    },
    account_holder='Jane Smith',
    account_defaults={
        'paying': 'payouts'
    }
)
 
print('Payment Method ID:', payment_method.id)
print('Linked to Account:', payment_method.account_id)

This example:

  1. Sets account_id to link the payment method to an existing account
  2. type='bank_account' specifies this is a bank account payment method
  3. transfer_type='receive_only' restricts this payment method to receiving payouts only
  4. bank_account contains the account number, routing number, and account type
  5. account_holder identifies the name on the bank account
  6. Sets account_defaults.paying='payouts' to make this the default payment method for receiving payouts

Link payment methods to existing accounts to organize recipient data, track payment history, and manage multiple payment methods per account.

Create Account Inline

Create a payment method with an inline account in a single API call.

import payload
 
pl = payload.Session("secret_key_3bW9...", api_version="v2")
 
# Create a bank account payment method with inline account creation
 
payment_method = pl.PaymentMethod.create(
    type="bank_account",
    transfer_type="receive_only",
    account={
        "name": "Jane Smith",
        "type": "customer",
        "entity": {
            "type": "individual",
            "legal_name": "John Smith",
            "country": "US",
            "phone_number": "1231231234",
            "tax_id": {"value": "123121234"},
            "address": {
                "address_line_1": "123 Example St",
                "city": "New York",
                "state_province": "NY",
                "postal_code": "11111",
            },
        },
    },
    bank_account={
        "account_number": "000123456789",
        "routing_number": "110000000",
        "account_type": "checking",
    },
    account_holder="Jane Smith",
    account_defaults={"paying": "payouts"},
)
 
print("Payment Method ID:", payment_method.id)
print("Account ID:", payment_method.account_id)
print("Account Number (last 4):", payment_method.bank_account["account_number"][-4:])

This example creates both the account and payment method together:

  1. account object creates a new account inline
  2. type='bank_account' specifies this is a bank account payment method
  3. transfer_type='receive_only' restricts this payment method to receiving payouts only
  4. bank_account contains the account number, routing number, and account type
  5. account_holder identifies the name on the bank account
  6. Sets account_defaults.paying='payouts' to make this the default payment method

Use inline account creation when you don't have an existing account and want to create both the account and payment method in one step.


Retrieving Payment Method Details

Retrieve complete payment method details using the payment method ID.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Retrieve payment method details
 
payment_method_id = 'pm_abc123def456'
 
payment_method = pl.PaymentMethod.get(payment_method_id)
 
print('Payment Method ID:', payment_method.id)
print('Type:', payment_method.type)
print('Transfer Type:', payment_method.transfer_type)
print('Account Holder:', payment_method.account_holder)
if payment_method.bank_account:
    print('Bank:', payment_method.bank_name)
    print('Account (last 4):', payment_method.bank_account['account_number'][-4:])

This allows you to:

  • Check the payment method type and transfer type
  • View account holder information
  • Access masked bank account details
  • Retrieve associated account ID
  • View verification status

Listing Payment Methods

Query payment methods by account, type, transfer type, or other filters.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# List payment methods for a payout recipient account
 
payment_methods = pl.PaymentMethod.filter_by(
    account_id='acct_recipient123',
    type='bank_account',
    transfer_type='receive_only'
).all()
for pm in payment_methods:
    print(f"Payment Method ID: {pm.id}")
    print(f"Account Holder: {pm.account_holder}")
    if pm.bank_account:
        print(f"Account (last 4): {pm.bank_account['account_number'][-4:]}")
    print("---")

This example:

  • Filters payment methods by account ID
  • Limits results to bank account type
  • Only returns receive-only payment methods
  • Supports pagination for large result sets

Use payment method listing to build recipient dashboards, manage enrollment records, and audit payment method data.


Transfer Types

Payment methods support different transfer types that control how they can be used:

  • receive_only - Can only receive funds (ideal for payout recipients)
  • send_only - Can only send funds (ideal for payment sources)
  • two_way - Can both send and receive funds

For payouts enrollment, either receive_only or two_way will work depending on your use case. If you only intend to send payouts and not collect funds from the recipient, it's recommended to specify transfer_type='receive_only'. This prevents the payment method from being used to collect payments from the account holder. Use transfer_type='two_way' only if you need the flexibility to both send payouts and collect payments from the same payment method.


Account Defaults

The account_defaults configuration determines when this payment method is automatically used:

  • paying='payouts' - Use for receiving payouts
  • paying='payments' - Use for sending payments
  • paying='all' - Use for both payouts and payments

For payouts enrollment, setting account_defaults.paying='payouts' or account_defaults.paying='all' will work. Use 'payouts' if this payment method should only be the default for receiving payouts, or use 'all' if it should also be the default for sending payments.

Schema Reference


The following fields are available when creating and configuring payment methods for payouts. For complete API reference, see Payment Methods API Reference.

Payment Method Configuration

Core fields used when creating bank account payment methods:

type
enum[string]
The type of payment method being created or referenced. This determines which additional fields are required and how the payment method can be used.
Values: card, bank_account, synthetic
transfer_type
enum[string]Immutable
Specifies the allowed transfer directions for this payment method. This controls whether the payment method can be used to send funds, receive funds, or both.
Values: two_way, send_only, receive_only
account_id ID of Account
string
The unique identifier of the account that owns this payment method. This determines which account has access to use this payment method for transactions and defines the ownership and permissions associated with it. (ID prefix: acct)
Pattern: ^acct_[A-Za-z0-9]+$
account_holder
stringImmutable
The name of the business or individual who owns this payment method. For cards, this is the cardholder name. For bank accounts, this is the account holder name.
Max length: 128
bank_account
object
Bank account details for this payment method. This object contains the account number, routing number, account type (checking or savings), and other bank-specific information. This field is required when type is "bank_account".
Required if:
type=bank_account
account_class
enum[string]Immutable
The classification of the bank account ownership, indicating whether this is a personal account owned by an individual or a business account owned by a company.
Values: personal, business
account_number
stringImmutable
The bank account number associated with this payment method. When retrieved, only the last 4 digits will be visible, with the preceding digits masked for security.
Pattern: ^[0-9]+$
Max length: 32
account_type
enum[string]Immutable
The type of bank account, either a checking account used for everyday transactions or a savings account used for storing funds.
Values: checking, savings
currency
enum[string]Immutable
The currency in which the bank account is denominated. This determines the currency used for transactions with this payment method.
Values: USD, CAD
routing_number
stringImmutable
The 9-digit ABA routing number that identifies the financial institution. When retrieved, only the last 4 digits will be visible for security purposes.
Pattern: ^[0-9]+$
Max length: 9
account_defaults
object
Configuration for setting this payment method as the default for various transaction types on the associated account. This allows you to specify which payment and funding operations should automatically use this payment method.
funding
enum[string]
Specifies which types of funding transactions this payment method should be used for by default. Set to "deposits" to use for receiving funds into the account, "withdraws" to use for pulling funds from the account, or "all" to use for both funding types.
Values: all, deposits, withdraws
paying
enum[string]
Specifies which types of paying transactions this payment method should be used for by default. Set to "payments" to use for collecting payments from the account holder, "payouts" to use for sending credits or refunds to the account holder, or "all" to use for both payment types. Will be used for any automatic invoice payments if selected as the default for payments.
Values: all, payments, payouts

Next Steps

Enhance your payout recipient enrollment implementation


Send Payouts to Recipients

Start sending payouts to enrolled recipients using their stored bank account payment methods for seamless fund disbursement.

Monitor Enrollment Events

Subscribe to webhook notifications to receive real-time updates when payout recipients are enrolled, payment methods are created, or verification status changes.

Manage Payment Methods

Use the Payment Methods API to retrieve, update, and manage enrolled payout recipient bank accounts and set default payment methods.


Related articles