- Product Types
- Prices Types
- Adding Products
- One Time Pricing
- Subscription Pricing
- Subscription Trials Setup
- Installment Pricing
- Donation / Pay What You Want
- Inventory Management
- Product Variants
- Variant Images
- Digital Downloads
- Change Product Availability
- Template Customization
- Product Collections
- First-Time Payment Discounts
- Manage Product Access
- Create Product With Free Trials
- Charge Set Up Fee on Trials
- Product List
- Product Pages
- Create Product Page in Elementor
- Custom Buy Links
- Product SEO
- Change Permalinks
- Custom Fields
- Test Mode
- Make Test Payments
- Edit & Customize Form
- Change Form Template
- Delete SureCart Forms
- Custom Checkout Form
- Add New Checkout Form
- Checkout Form With Gutenberg
- Checkout Form in Elementor
- Custom Thank You Page
- Create Donation Form
- Customize Confirmation Popup
- Include Coupons in URLs
- Pre-Fill Checkout Fields
- Change Checkout Texts
- Password Field in Checkout
- Default Country Code
- Add Terms to Checkout
- Conditional Block Checkouts
- Remove Coupon Field
- Hide Quantity Option
- Disable Quantity Editing
- Disable Item Removal
- Country Specific Purchases
- Update Store Details
- Dark Mode
- Orders & Receipts
- Menu & Slide-out Cart
- Manage Slide-out Cart
- Customers Section Overview
- Create Customer
- Delete Customer
- Update Customer Details
- Edit Invoice Details
- Create Shipping Profiles
- Manage Shipping
- Disable Payment Processor
- Manage Store Notifications
- Manage PayPal Branding
- How to transfer a store to a new organization and assign a license.
- How to Download SureCart Purchase Invoice
- Fix View Order Button
- Fix Express Payment Buttons
- How To Stop Sending WooCommerce Notifications via SureCart?
- Fix PayPal Test Connection
- Fix Sign-In Loop
- Fix Order Confirmation Redirect
- Fix Divi Bullet Point Issue
- Fix Customer Dashboard
- Fix JSON Response Error
- Failed Payment Behavior
- Fix Stripe Zip Code Error
- Fix "Product Can’t Be Blank"
- Troubleshooting Guide
- PayPal IPN Warning Emails
- Caching Configuration for SureCart
- Why iDEAL Might Not Appear in Your CheckoutÂ
- Compatibility Guide
How to Add Custom Fields to Customer Invoices
This guide will help you add custom fields, such as a company registration number or tax number, to your customer invoices in SureCart. Follow these steps to capture the data at checkout and display it on future invoices.
How Can You Add Custom Fields at Checkout?
To add custom fields, follow these steps:
- Edit the Checkout Form:
- Go to your checkout form in SureCart and add a Conditional block.
- Insert a TextField or other suitable fields for the additional information you need to capture from customers.
- These will be displayed during checkout for customers to fill in.
2. Store Data as Metadata:
- The custom fields will be stored as metadata on the checkout object. For example:
metadata: {
"invoice_column_1": "Customer-provided value",
"invoice_column_2": "Another customer-provided value"
}
How Can You Display Custom Fields on Invoices?
- Access the Invoice Template:
- Navigate to the invoice template editor at SureCart Invoice Template.
- Use Metadata in the Template:
- To display the metadata, include the following code where you’d like the custom fields to appear:
<p>{{ checkout.metadata.invoice_column_1 }}</p>
<p>{{ checkout.metadata.invoice_column_2 }}</p>
- This will display the values entered by the customer at checkout on their invoice.
Important Notes:
• Placeholder Keys: The provided keys (invoice_column_1, invoice_column_2) are placeholders used for demonstration purposes. You must replace these with the actual keys corresponding to the custom fields you’ve configured in your setup.
• Custom Field Setup: Ensure that the custom fields you want to display are properly set up and added to the invoice metadata.
• Validation: Test the output on your invoices to confirm that the correct data appears in the desired format.
What About Existing Subscriptions?
For customers who already have active subscriptions and did not fill in these custom fields, here are your options:
- Manual Update: You can manually update the customer information using SureCart’s API. Head to SureCart API Reference to update the metadata for existing customers.
- Customer Dashboard: You could also allow customers to update their information directly through their dashboard. This feature may require custom development, as there’s no UI for metadata updates at this time.
How Can You Manually Add Data via API?
If you need to update customer metadata manually, follow these steps:
- Get Authorization: Include your secret token in the Authorization field.
- Provide Checkout ID: Add the appropriate checkout ID for the customer.
- Add Metadata: In the request body, include the metadata fields that need updating.
- Submit: Hit “Try it” in the API console to save your changes.
For more details, check the SureCart API documentation here.
We hope this guide helps you add custom fields to your invoices and manage customer data seamlessly. If you run into any issues, feel free to leave a comment below, and we’ll be happy to assist you further!
We don't respond to the article feedback, we use it to improve our support content.