Pay
Payment Requests

Accepting Payments via Payment Requests

Learn when and how to accept one-time payments using payment request links


Payment requests provide a simple way to collect one-time payments through secure, hosted payment pages. By generating a payment request link, you can accept payments without building custom checkout UI. Share links via email, SMS, or any communication channel—customers complete payment on a Payload-hosted page and you're notified when payment is received.

Prerequisites

Before creating payment requests, it's helpful to learn about the following topics.


When to Use Payment Requests


Use payment requests when you need a simple way to collect one-time payments from existing customers without building custom checkout UI. Payment requests are single-use links that expire after 60 days or upon successful payment completion.

Payment requests require a customer account to link the payment to a specific customer. This enables saved payment methods and pre-populates customer information for faster checkout.

By using payment requests, PCI compliance and sensitive payment data handling are managed automatically. The hosted page ensures secure collection of card and bank account details in a compliant environment—removing that responsibility from your application.

Common use cases

  • Invoice Payments: Generate payment links for invoices and billing statements
  • Email Payment Requests: Send payment links via email for one-time purchases
  • SMS Payment Collection: Share payment links via text message for mobile payments
  • Ad-hoc Payments: Create instant payment links for services or products
  • Payment Reminders: Send payment request links for overdue balances

Creating a Payment Request

Creating a payment request requires linking it to a customer account. Create a payment link with the one_time type, then share the returned URL with your customer.

Generate a payment request

Create a payment request linked to a customer account.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a one-time payment request link
payment_link = pl.PaymentLink.create(
    type='one_time',
    description='Payment Request',
    amount=100.00,
    biller={'account_id': 'acct_receiver123'},
    payer={'account_id': 'acct_customer456'}
)
 
# Share the URL with your customer
print(f"Payment link: {payment_link.url}")

This example creates a payment link with:

  1. type='one_time' tells Payload to generate a single-use payment link
  2. description provides context about what the customer is paying for
  3. amount sets the payment amount
  4. biller.account_id specifies the account that will receive the payment
  5. payer.account_id links the payment request to a customer account (required)

The customer account pre-populates customer information and enables saved payment methods for faster checkout.

Generate a request for an invoice

Create a payment request linked to an existing invoice.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment request for an invoice
payment_link = pl.PaymentLink.create(
    invoice_id='inv_abc123def456'
)
 
# Amount and biller are automatically taken from the invoice
print(f"Payment link: {payment_link.url}")

This example:

  1. Links the payment request to an existing invoice
  2. Automatically uses the invoice amount and description
  3. Associates the payment with the invoice biller
  4. Updates the invoice status when payment is received

When associated with an invoice, the payment amount and biller are automatically inherited from the invoice and cannot be overridden.


Configuring Payment Options

Payment requests support checkout configuration options, allowing you to control payment methods, fees, custom fields, and UI behavior.

Payment Methods

Control which payment types are available during checkout:

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment request with specific payment methods
payment_link = pl.PaymentLink.create(
    type='one_time',
    description='Payment Request',
    amount=100.00,
    biller={'account_id': 'acct_receiver123'},
    checkout_options={
        'card_payments': True,
        'bank_account_payments': False,
        'enable_mobile_wallets': True
    }
)
 
print(f"Payment link: {payment_link.url}")

This configuration:

  • Enables card payments (Visa, Mastercard, American Express, Discover)
  • Disables bank account payments
  • Enables Apple Pay and Google Pay for customers on compatible devices

Editable Amount

Allow customers to change the payment amount, useful for donations or variable payments:

import payload
 
pl = payload.Session("secret_key_3bW9...", api_version="v2")
 
# Create a payment request with editable amount
payment_link = pl.PaymentLink.create(
    type="one_time",
    description="Donation",
    amount=50.00,
    biller={"account_id": "acct_receiver123"},
    field_options={"amount_field": "editable"},
)
 
print(f"Payment link: {payment_link.url}")

This configuration:

  • Displays the initial amount as $50
  • Allows customers to change the amount to any value they choose
  • Useful for donation forms, tips, or customer-determined payments

Custom Fields

Collect additional information from customers during checkout:

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment request with custom fields
payment_link = pl.PaymentLink.create(
    type='one_time',
    description='Service Payment',
    amount=200.00,
    biller={'account_id': 'acct_receiver123'},
    field_options={
        'custom_fields': [{
            'section': 'Service Details',
            'fields': [
                {
                    'title': 'Service Type',
                    'name': 'service_type',
                    'type': 'text',
                    'optional': False
                },
                {
                    'title': 'Additional Notes',
                    'name': 'notes',
                    'type': 'text',
                    'optional': True
                }
            ]
        }]
    }
)
 
print(f"Payment link: {payment_link.url}")

This configuration:

  • Adds custom form fields grouped by section
  • Collects service type and additional notes
  • Field values are stored in the transaction attrs object
  • Supports text, email, phone, date, and other field types

Sending Payment Requests

You can automatically send payment requests to customers via email or SMS by including payer information when creating the link.

Send payment request via email

Create a payment link and automatically send it to the customer's email address.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create and send payment request via email
payment_link = pl.PaymentLink.create(
    type='one_time',
    description='Payment Request',
    amount=100.00,
    biller={'account_id': 'acct_receiver123'},
    payer={
        'account': {
            'name': 'John Doe',
            'email': '[email protected]'
        }
    },
    notifications=[{
        'email': '[email protected]'
    }]
)
 
# Payment link is automatically sent to the customer's email
print("Payment link sent to: [email protected]")

This example creates a payment link with:

  1. payer.name and payer.email to identify the customer
  2. Payload automatically sends an email with the payment link
  3. The customer receives a professional email with instructions

The customer will receive an email with a secure link to complete their payment.

Send payment request via SMS

Create a payment link and automatically send it to the customer's phone via SMS.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create and send payment request via SMS
payment_link = pl.PaymentLink.create(
    type='one_time',
    description='Payment Request',
    amount=100.00,
    biller={'account_id': 'acct_receiver123'},
    payer={
        'account': {
            'name': 'John Doe',
            'phone': '+15555551234'
        }
    },
    notifications=[{
        'phone': '+15555551234'
    }]
)
 
# Payment link is automatically sent to the customer's phone
print("Payment link sent to: +15555551234")

This example creates a payment link with:

  1. payer.name and payer.phone to identify the customer
  2. Payload automatically sends an SMS with the payment link
  3. The customer receives a text message with the short URL

The customer will receive a text message with a secure link to complete their payment.


Tracking Payment Status

After creating a payment request, you can monitor its status and completion through webhooks and API queries.

Webhook Events

Subscribe to the processed webhook trigger to track successful payments. Configure a webhook with:

  • trigger: processed - Monitors successful payment completion
  • reference_object: transaction - Specifies the object type being monitored
  • url: Your endpoint URL to receive webhook notifications

Example webhook handler:

from flask import Flask, request
 
app = Flask(__name__)
 
@app.route("/webhooks/payload", methods=["POST"])
def handle_webhook():
    webhook = request.json
 
    if webhook["trigger"] == "processed" and webhook["triggered_on"]["type"] == "payment":
        transaction = webhook["triggered_on"]
 
        print("Payment successful:", transaction["id"])
        # Update order status in your database
        # Send confirmation email
 
    return "OK", 200

Query Link Status

You can also retrieve the payment link to check its status:

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Retrieve payment link status
payment_link_id = 'pay_abc123def456'
 
payment_link = pl.PaymentLink.get(payment_link_id)
 
print(f"Status: {payment_link.status}")
print(f"Amount: {payment_link.amount}")
 
if payment_link.status == 'completed':
    print("Payment completed!")
    print(f"Transaction ID: {payment_link.transaction_id}")

When the payment is completed, the transaction_id field will be populated with the ID of the completed transaction, allowing you to retrieve full transaction details.

Payment link statuses:

  • active - Link is ready to use
  • sent - Link has been sent to customer
  • delivered - Link delivery confirmed
  • completed - Payment has been received
  • expired - Link has expired (60 days)

Schema Reference


The following fields are available when configuring payment request links:

Payment Link Configuration

Configuration options passed when creating the payment link. For complete API reference, see Payment Links API Reference.

type
enum[string]
The intended usage pattern for this payment link. Set to "one_time" for links that should be used once and expire after 60 days, or "reusable" for links that can be used multiple times and remain valid for a much longer period.
Values: one_time, reusable
description
string
A human-readable description of what this payment is for. This text is displayed to the customer on the payment page and helps them understand what they are paying for. Use clear, descriptive text like "Invoice #1234 Payment" or "Monthly Subscription Fee". If this payment link is associated with an invoice, the invoice description is used by default if not specified.
Max length: 128
amount
number (double)
The payment amount to collect through this link. If this payment link is associated with an invoice, the amount is automatically set to the invoice balance due and cannot be specified separately. The amount can be made editable by the customer using the field_options.amount_field setting.
biller
object
Information about the merchant or service provider who will receive payment through this link. Contains the biller account identifier and payment destination details. The biller receives funds when the payer completes payment.
accountAccount
object
The expanded biller account object. When included, this provides full account details for the merchant or service provider who will receive payment through this link.
Visibility: explicit
account_id ID of Account
string
The unique identifier of the processing account that will receive funds from this payment link. This is the merchant or service provider being paid. Required when no invoice_id is provided. If associated with an invoice, this is automatically set to match the invoice biller and cannot be changed. (ID prefix: acct)
Pattern: ^acct_[A-Za-z0-9]+$
Required if:
invoice_id=null
payer
object
Information about the customer who will use this payment link. Contains the payer account identifier and related customer information. The payer is the party who will submit payment through the link.
accountAccount
object
The expanded payer account object. When included, this provides full account details for the customer who will use this payment link.
Visibility: explicit
account_id ID of Account
string
The unique identifier of the customer account that will use this payment link. This is the account that will make the payment when the link is accessed. If this payment link is associated with an invoice, this must match the invoice payer. (ID prefix: acct)
Pattern: ^acct_[A-Za-z0-9]+$
invoice_id ID of Invoice
string
The unique identifier of the invoice that this payment link is for. When an invoice_id is provided, the payment link amount, payer, and biller are automatically synchronized with the invoice and cannot be changed independently. The link will collect payment for the outstanding invoice balance. If not provided, this is a standalone payment link not tied to any invoice. (ID prefix: inv)
Pattern: ^inv_[A-Za-z0-9]+$
checkout_options
object
Configuration options that control the payment checkout experience and available payment methods. Use this to customize which payment options are enabled (cards, bank accounts, digital wallets), whether to collect billing addresses, show payment method previews, enable autopay enrollment, and other checkout behavior. These settings are constrained by the biller account's processing capabilities - you cannot enable payment methods that the account is not provisioned to accept.
auto_billing_toggle
boolean
Display a toggle that allows customers to opt into automatic recurring payments. When true, shows a checkbox or toggle on the payment form where customers can choose to save their payment method as the default for future automatic billing. Useful for subscription or recurring payment scenarios.
bank_account_payments
boolean
Enable or disable bank account payments for this payment link. When true, customers can pay using their bank account and routing number. When false, bank account payment options are hidden. This setting is constrained by the biller account processing capabilities - bank accounts can only be enabled if the account is provisioned for bank account processing. Defaults to the account's bank account processing enabled setting.
billing_address
boolean
Require the customer to provide a billing address during checkout. When true, address fields (street, city, state, postal code) are displayed and required before payment can be submitted. Useful for validation, fraud prevention, and compliance. When false, address collection is skipped. Zip or postal code may still be required based on AVS settings.
card_payments
boolean
Enable or disable credit/debit card payments for this payment link. When true, customers can pay using card details. When false, card payment options are hidden. This setting is constrained by the biller account processing capabilities - cards can only be enabled if the account is provisioned for card processing. Defaults to the account's card processing enabled setting.
default_payment_option
enum[string]
The payment method type that should be selected by default when the checkout page loads. Set to "card" to pre-select card payment option, or "bank_account" to pre-select bank account payment. This provides a suggested payment method but customers can still switch to other enabled options. If not set, the first enabled payment method is shown.
Values: card, bank_account
enable_mobile_wallets
boolean
Enable digital wallet payment options including Google Pay and Apple Pay. When true, customers can use their saved payment methods from Google or Apple wallets for faster checkout. Requires compatible devices and browsers. Improves conversion rates for mobile users.
enable_plaid
boolean
Enable Plaid integration for instant bank account verification and linking. When true, customers can securely connect their bank accounts through Plaid instead of manually entering routing and account numbers. Can help with user experience and reduces errors for bank account payments for certain use-cases.
keep_active_toggle
boolean
Display a toggle that allows customers to save their payment method for future use. When true, shows a checkbox where customers can opt to keep their payment method active in the system after the current payment. When false or unchecked, payment methods are treated as single-use. Helps reduce friction for returning customers.
payment_method_preview
boolean
Display a preview or summary of the entered payment method before final submission. When true, shows customers their entered payment details (masked) for review before confirming the payment. This helps prevent errors and builds customer confidence.
show_disclosure
boolean
Include the standard payment processing disclosure text on the checkout page. When true, displays legal and informational text about the payment processing, terms of service, and related disclosures. Required in some jurisdictions or use cases for compliance.
field_options
object
Configuration for field collection and display behavior on the payment form. Controls what information is collected from customers, whether amounts can be edited, and which custom fields to show. Use these options to customize the payment experience for your specific use case.
amount_field
enum[string]
Controls whether the payment amount can be modified by the customer when accessing the payment link. Set to "editable" to allow the customer to change the amount (useful for donations or variable payments), or "static" to lock the amount to the value specified in the payment link.
Values: editable, static
custom_fields
array
Additional custom form fields to collect from the customer during checkout. Use this to gather extra information beyond standard payment details, such as order notes, service preferences, or custom business data. Each field can be configured with validation, placeholders, and required/optional status.
payer_fields
enum[string]
Controls whether customer information fields (name, email, phone) are displayed on the payment form. Set to "required" to make customer information mandatory, "optional" to allow but not require it, or "disabled" to hide customer fields entirely.
Values: required, optional, disabled

Next Steps

Enhance your payment request implementation


Create Customer Accounts

Create customer accounts to enable saved payment methods and faster checkout for payment requests.

Link to Invoices

Create invoices and generate payment requests automatically linked to invoice details.

Monitor Payment Events

Subscribe to webhook notifications to track payment status and automate order fulfillment.


Related articles