Pay
Payment Pages

Accepting Payments via Payment Pages

Learn when and how to accept multiple payments using reusable payment page links


Payment pages provide a reusable way to collect payments through secure, hosted payment pages. Unlike one-time payment requests, payment pages can be used indefinitely to accept multiple payments from multiple customers. Create a payment page once and share it on your website, in emails, or via any communication channel—customers can use the same link repeatedly to make payments.

Prerequisites

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


When to Use Payment Pages


Use payment pages when you need a permanent, reusable payment link that can accept multiple payments over time. Payment pages remain active indefinitely until you deactivate them, making them ideal for ongoing payment collection scenarios.

By using payment pages, 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

  • Product Sales: Create a payment page for each product or service
  • Donation Pages: Accept ongoing donations with a single reusable link
  • Membership Fees: Collect recurring membership or subscription payments
  • Service Payments: Create permanent payment links for specific services
  • Website Integration: Embed payment links directly on your website
  • QR Codes: Generate QR codes that link to your payment page

Creating a Payment Page

Creating a payment page is a two-step process: create a payment link with the reusable type, then share or embed the returned URL.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a reusable payment page
payment_link = pl.PaymentLink.create(
    type='reusable',
    description='Product Payment',
    amount=100.00,
    biller={'account_id': 'acct_receiver123'}
)
 
# Share the URL on your website or in communications
print(f"Payment page: {payment_link.url}")

This example creates a payment link with:

  1. type='reusable' tells Payload to generate a multi-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 payments

The response includes a url field that contains the secure payment page URL. Share this URL on your website, in communications, or embed it in your application.


Configuring Payment Options

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

Payment Methods

Control which payment types are available on your payment page:

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

This configuration:

  • Enables card payments (Visa, Mastercard, American Express, Discover)
  • Enables bank account payments (bank transfer)
  • 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 page with editable amount
payment_link = pl.PaymentLink.create(
    type="reusable",
    description="Donation",
    amount=25.00,
    biller={"account_id": "acct_receiver123"},
    field_options={"amount_field": "editable"},
)
 
print(f"Payment page: {payment_link.url}")

This configuration:

  • Displays the initial amount as $25
  • Allows customers to change the amount to any value they choose
  • Perfect for donation pages, tips, or pay-what-you-want scenarios

Custom Fields

Collect additional information from customers during checkout:

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment page with custom fields
payment_link = pl.PaymentLink.create(
    type='reusable',
    description='Product Order',
    amount=100.00,
    biller={'account_id': 'acct_receiver123'},
    field_options={
        'custom_fields': [{
            'section': 'Order Details',
            'fields': [
                {
                    'title': 'Product SKU',
                    'name': 'product_sku',
                    'type': 'text',
                    'optional': False
                },
                {
                    'title': 'Quantity',
                    'name': 'quantity',
                    'type': 'text',
                    'value': '1',
                    'optional': True
                }
            ]
        }]
    }
)
 
print(f"Payment page: {payment_link.url}")

This configuration:

  • Adds custom form fields grouped by section
  • Collects product SKU and quantity information
  • Field values are stored in the transaction attrs object
  • Supports text, email, phone, date, and other field types

Embedding Payment Pages

Payment pages can be shared as links or embedded directly in your website using iframes or buttons.

Link or Embed Options

Share your payment page URL directly or embed it in your website:

<!DOCTYPE html>
<html>
<head>
  <title>Payment Page</title>
</head>
<body>
  <h1>Make a Payment</h1>
 
  <!-- Link to payment page -->
  <!-- <a href="https://pay.payload.com/abc123" class="payment-button">
    Pay Now
  </a> -->
 
  <!-- Or embed in iframe -->
  <!-- <iframe
    src="https://pay.payload.com/abc123"
    width="100%"
    height="600"
    frameborder="0">
  </iframe> -->
  <script src="embed.js"></script>
</body>
</html>
// This example is static markup-only. Keep a same-basename JS file
// so frontend example traversal can enforce consistent html/js pairing.

Direct Link: Share the payment page URL anywhere - emails, SMS, social media, QR codes

Iframe Embed: Embed the payment page directly in your website for a seamless experience

Button Link: Add payment buttons throughout your website that link to the payment page


Tracking Payment Activity

Payment pages can accept multiple payments over time. Monitor activity through webhooks and API queries.

Webhook Events

Subscribe to the processed webhook trigger to track all successful payments through your payment page. 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"]
        payment_link_id = transaction["payment_link_id"]
 
        print(f"Payment received via page: {payment_link_id}")
        print(f"Transaction: {transaction['id']}")
        print(f"Amount: {transaction['amount']}")
        # Update your database
        # Send confirmation email
 
    return "OK", 200

Query Payment Activity

List all payments made through a payment page:

import payload
 
pl = payload.Session("secret_key_3bW9...", api_version="v2")
 
# List all payments made through this payment page
payment_link_id = "pay_abc123def456"
 
transactions = pl.Transaction.filter_by(payment_link_id=payment_link_id).all()
 
print(f"Total payments: {len(transactions)}")
 
# Calculate total revenue
total_amount = sum(txn.amount for txn in transactions)
print(f"Total revenue: ${total_amount}")
 
# List recent payments
for txn in transactions:
    print(f"{txn.created_at}: ${txn.amount} - {txn.status}")

This allows you to:

  • List all transactions made through the page
  • Monitor total payment volume
  • Track customer activity
  • Filter payments by date, amount, or status

Managing Payment Pages

Deactivating a Payment Page

When you no longer want to accept payments through a payment page, deactivate it:

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Deactivate a payment page
payment_link_id = 'pay_abc123def456'
 
payment_link = pl.PaymentLink.get(payment_link_id)
payment_link.update(status='inactive')
 
print(f"Payment page deactivated: {payment_link.status}")

Deactivating a payment page:

  • Immediately stops accepting new payments
  • Returns an error if customers try to use the link
  • Does not affect past transactions
  • Can be reactivated later if needed

Schema Reference


The following fields are available when configuring payment pages:

Payment Link Configuration

Configuration options passed when creating the payment page. 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]+$
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
status
enum[string]
The current status of the payment link. Possible values: "active" (link is ready to use but not yet sent), "sent" (email notification has been delivered to the customer), "received" (customer received the email), "opened" (customer clicked the link), "bounced" (email delivery failed), "completed" (payment was successfully processed), "inactive" (link has been manually deactivated), "expired" (link has passed its expiration date). Status automatically updates based on link activity and usage. Read-only field that tracks the payment link lifecycle.
Values: active, sent, received, opened, bounced, completed, inactive, expired
Read-only permissions: "Undocumented"

Next Steps

Enhance your payment page implementation


Send Payment Receipts

Configure receipts to automatically send confirmation emails with custom fields and transaction details.

Handle Refunds

Process refunds and voids for cancellations and returns after payments complete.

Monitor Payment Events

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


Related articles