Accepting Payments via Checkout Link
Learn when and how to accept payments using hosted checkout links
Payload checkout links provide a secure, hosted payment experience for your customers. By generating a link, you can redirect customers to complete payment without embedding checkout UI in your application. Customers complete payment on a Payload-hosted page and are redirected back to your application upon completion with payment status.
Checkout links are ideal for one-time payments and checkout flows where you need customers redirected back to your application after payment. For payment requests sent via email or SMS, see Payment Links. For embedded checkout experiences, see Checkout Plugin. For recurring billing, see Billing Schedules.
Prerequisites
Before integrating checkout links, it's helpful to learn about the following topics.
When to Use Checkout Links
Use checkout links when you need a simple way to accept payments without embedding checkout UI directly in your application. Checkout links are ideal for programmatic flows where you redirect customers to complete payment on a secure, Payload-hosted page, then receive them back in your application with payment status.
By using checkout links, 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
- Multi-Step Workflows: Send users to payment page as part of onboarding or purchase flows
- No-Code Payment Collection: Accept payments without building custom checkout UI
- Programmatic Payment Initiation: Generate payment links dynamically based on business logic
- Third-Party Integrations: Enable payment collection from systems with limited extensibility that support redirects
Generating a Checkout Link
Creating a checkout link is a two-step process: create an intent with the checkout_link type,
then redirect your customer to the returned URL to complete payment.
Generate a basic checkout link
Create a simple checkout link with an amount and description.
This example creates an intent with:
-
type='checkout_link'tells Payload to generate a hosted checkout page -
checkout_link.payment_templateconfigures the payment details (amount, description, receiver) -
checkout_link.redirectsdefines where customers go after payment or if they return
The response includes a url field that contains the secure checkout link. Redirect your
customer to this URL to complete payment on the hosted page.
Link Expiration: Checkout links remain active for 1 hour. After expiration, you'll need to generate a new link. Each link can only be used once successfully.
Generate a link for an existing customer
If you have an existing customer account, pass the account_id to pre-populate customer
information.
This example:
- Passes
sender.account_idto link the payment to an existing customer - Allows the customer to use saved payment methods
- Automatically associates the payment with the customer record
Use this pattern when you have customer accounts and want to provide a faster checkout experience with saved payment methods.
Configuring Checkout Options
Checkout links support the same configuration options as the Checkout Plugin, allowing you to control payment methods, fees, billing fields, and UI behavior.
Payment Methods
Control which payment types are available during checkout:
This configuration:
- Enables card payments (Visa, Mastercard, American Express, Discover)
- Disables bank account payments
- Enables Apple Pay for customers on Apple devices
- Enables Google Pay for customers on Android devices
Convenience Fees
Add a convenience fee to offset payment processing costs:
This adds a convenience fee based on your processing account's fee configuration. The fee is calculated and displayed to the customer before they complete the payment.
Editable Amount
Allow customers to change the payment amount, useful for donations or tips:
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
Autopay Enrollment
Enable the Autopay toggle to let customers enroll in automatic billing:
This configuration:
- Shows an Autopay enrollment checkbox in the checkout form
- Automatically saves the payment method and links it to the customer account
- Sets the payment method as the default for future automatic payments
Account Required: Autopay enrollment requires an existing account_id in the sender
object.
Handling Payment Completion
After a customer completes payment via a checkout link, they are redirected to the
completed_url you specified when creating the intent. The URL includes a pl_transaction_id
query parameter containing the transaction ID.
Redirect URL Structure
When a customer completes payment, they are redirected to:
https://yourapp.com/payment-complete?pl_transaction_id=txn_abc123def456Processing the Transaction ID
Handle the redirect and retrieve transaction details:
This example:
- Extracts the
pl_transaction_idfrom the query parameters - Fetches the transaction details from the Payload API
- Verifies the payment status
- Updates your database and fulfills the order
Tracking Payment Status
After sharing a checkout link, if needed 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", 200Webhook Configuration: Create a webhook with trigger='processed' to receive
notifications when payments complete successfully. See Webhook Notifications
for details on setting up webhooks.
Query Intent Status
You can also retrieve the intent to check its status:
Security Note: Checkout links are single-use and expire after completion or 1 hour. Generate a unique link for each customer and payment transaction.
Schema Reference
The following fields are available when configuring the Checkout Link intent. For complete API reference documentation, see Intent API Reference.
Intent Configuration
Configuration options passed when creating the checkout link intent on your backend:
checkout_linkcheckout_optionsallow_editable_amountallowed_methodsapple_payenabled, disabledbank_accountdefault, enabled, disabledcarddefault, enabled, disabled, credit, debitgoogle_payenabled, disabledplaidenabled, disabledenable_sender_feedefault, enabled, disabled, card, bank_accountrequire_full_billing_addressshow_autopay_toggleshow_disclosureshow_keep_active_toggleshow_payment_method_previewpayment_templateamountattrsclearing_timinginstant, same_day, next_daydescriptionfunding_timingstandard, instant, rapidinvoice_allocationsorder_numberreceiveraccount_idmethod_idsenderaccount_idmethodaccount_defaultsfundingall, deposits, withdrawspayingall, payments, payoutsaccount_holderaccount_idbank_accountcurrencyUSD, CADbilling_addressaddress_line_1address_line_2citycountry_codepostal_codestate_provinceidtransfer_typesend_only, receive_only, two_waysourcekeyed, googlepay, applepay, checkstatusvalueauthorized, processedtransfersredirectscompleted_urlreturn_urlNext Steps
Enhance your checkout implementation
Create Customer Accounts
Create customer accounts to enable saved payment methods and faster checkout.
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
- Checkout Plugin - Embedded checkout form alternative
- Intents API Reference
- Transactions API Reference
- Payment Methods API Reference