Transaction Receipts
Generate and download professional receipts for payments and payouts
Transaction receipts provide customers with detailed records of their payments and payouts. Payload automatically generates professional receipts for every transaction, including all relevant transaction details, custom attributes, and branding. Receipts can be downloaded as PDFs programmatically or accessed through the Payload dashboard.
Receipts are available for all completed transactions and include transaction details, payment method information, and any custom attributes you've added. You can download receipts programmatically via API or enable automatic email delivery to customers if desired.
Prerequisites
Before working with receipts, it's helpful to learn about the following topics.
Learn about transactions
Understand how transactions are processed and how transaction data is captured for receipts.
Learn about custom attributes
Understand how to add custom attributes to transactions that will appear on receipts.
When to Use Receipts
Use receipts to provide customers with proof of payment and detailed transaction records. Receipts help with:
- Customer Record-Keeping: Provide customers with downloadable payment records
- Expense Tracking: Enable customers to track spending and categorize expenses
- Accounting & Reconciliation: Support bookkeeping with detailed transaction breakdowns
- Compliance & Auditing: Maintain transaction records for regulatory requirements
- Customer Support: Resolve payment inquiries with detailed receipt information
- Transparency: Build trust by providing clear transaction documentation
Receipts include transaction amounts, dates, payment methods, descriptions, reference numbers, and any custom attributes you've added to the transaction.
Downloading Receipt PDFs
Retrieve a PDF receipt for any transaction by making a request to the receipts endpoint.
This example demonstrates downloading a receipt:
- Make a GET request to the receipts endpoint with the transaction ID
- Include your API key for authentication
- Save the response data as a PDF file
- The PDF includes complete transaction details, branding, and custom attributes
Receipt PDFs are generated on-demand and include:
- Transaction amount and date
- Payment method details (last 4 digits of card/account)
- Transaction description and reference number
- Sender and receiver account information
- Custom transaction attributes
- Your account branding (if configured)
Receipt Availability: Receipts are available for all completed transactions with status
processed. For transactions that are still processing or have been declined, receipts
may not be available until the transaction reaches a final state.
Retrieving Receipt Data
Access receipt information by retrieving the transaction object with receipt details.
This allows you to:
- Build custom receipt views in your application
- Extract specific receipt data for reporting
- Display receipt information to customers
- Generate custom receipt formats
The transaction object includes all data that appears on the receipt, including descriptions, amounts, reference numbers, and custom attributes.
Adding Custom Receipt Attributes
Include custom information on receipts by adding attributes to transactions.
This example demonstrates custom attributes:
- Add custom attributes using the
attrsfield when creating transactions - Public attributes (not starting with underscore) appear on receipts
- Private attributes (starting with underscore) are hidden from receipts
- Use custom attributes for order numbers, account numbers, or other reference data
Custom attributes help customers identify transactions and provide additional context on receipts. Only public attributes appear on receipts - private attributes remain accessible via API but hidden from customer-facing receipts.
Private Attributes: Any attribute key starting with an underscore (_) is considered
private and will NOT appear on receipts. Use this for internal reference data that should not
be customer-facing, such as internal IDs, system flags, or sensitive reference information.
Sending Receipts Programmatically
Automatically email receipts to customers when creating transactions by including receipt recipient details in the transaction payload.
This example demonstrates programmatic receipt delivery:
- Include a
receiptsarray when creating the transaction - Specify recipient
nameandemailfor each receipt recipient - Receipts are automatically emailed when the transaction is processed
When you include receipt details in the transaction creation, Payload automatically sends a branded PDF receipt to each specified email address once the transaction is completed. This bypasses the need to configure automatic receipt emails in the dashboard and gives you fine-grained control over receipt delivery on a per-transaction basis.
This example sends receipts to multiple recipients:
- Include multiple objects in the
receiptsarray - Each recipient receives an identical copy of the receipt
- Useful for corporate payments, accounting departments, or shared records
- Each recipient entry should include both
nameandemail
Programmatic vs Dashboard Email: Receipt delivery via the receipts array works
independently of dashboard email settings. You can send receipts programmatically even if
automatic email receipts are disabled in your dashboard settings. This is useful for
selectively sending receipts or sending them to specific recipients beyond the customer.
Email Validation: Ensure all email addresses in the receipts array are valid and
properly formatted. Invalid email addresses will cause delivery failures, though the
transaction itself will still be processed successfully.
Receipt Fields and Transaction Data
Receipts automatically include key transaction fields that provide complete transaction context.
Automatic Receipt Fields
ref_numberdescriptionamountorder_numbercreated_atThese fields are automatically populated on receipts:
- ref_number: Human-readable transaction reference for customer inquiries
- description: Payment purpose shown prominently on receipt
- amount: Transaction amount in processing account currency
- order_number: Your custom order/transaction identifier
- created_at: Transaction timestamp in customer timezone
Email Receipt Delivery
Configure automatic email delivery of receipts to customers for every transaction.
Enabling Email Receipts
Enable automatic receipt emails from the Payload dashboard:
- Navigate to Settings > Emails and Notifications
- Enable Automatic Customer Receipts
- Customize receipt email branding at the account and profile levels
When enabled, Payload automatically emails professional, branded receipts to customers after successful transactions.
Email Requirements: Automatic receipt emails require a valid email address associated with the customer's account. For API transactions, include customer account information with a verified email address to enable receipt delivery.
Testing Receipts
Test receipt generation and formatting in test mode before production deployment.
Testing Receipt PDFs
Create test transactions with custom attributes and download receipts to verify all functionality:
This example creates a transaction with both public and private attributes, downloads the receipt PDF, and verifies:
- Receipt PDF downloads successfully
- All transaction details appear correctly
- Public custom attributes are displayed on the receipt
- Private attributes (starting with underscore) are hidden from the receipt
- Branding and logo display correctly
- Attribute formatting is customer-friendly
Test Mode Receipts: Receipts generated in test mode are identical to production receipts except for a "TEST MODE" watermark. Use test mode to validate receipt formatting, branding, and custom attributes before processing live transactions.
Schema Reference
The following fields are relevant for receipt generation and customization:
Transaction Receipt Fields
id^txn_[A-Za-z0-9]+$ref_numberdescriptionamountorder_numberattrscreated_atFor complete transaction field documentation, see the Transaction API Reference.
Next Steps
Enhance receipt functionality and transaction management
Process Transactions
Use Payment API to process payments with complete transaction data, send Payouts with receipt generation, and monitor Transaction Status to track completion and receipt availability.
Customize Customer Experience
Configure Custom Attributes to add custom data to transactions and receipts, set up Branding to customize receipt appearance with your logo and colors, and enable Email Notifications to configure automatic receipt delivery.
Build Reporting and Reconciliation
Use Reporting Overview to track receipt generation metrics, create Transaction Reports for transaction summaries, and set up Accounting Integration to sync receipts to accounting systems.
Related articles
- Payment API - Process payments
- Transactions API Reference - Transaction object reference
- Custom Attributes - Add data to receipts
- Webhooks - Monitor receipt events