- Product 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
- Hide Product from Shop Page
- Template Customization
- Product Collections
- First-Time Payment Discounts
- Manage Product Access
- Payment Types
- Free Trials & Setup Fees
- 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
- Adding Products
- 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
- Fix View Order Button
- Fix Express Payment Buttons
- Fix PayPal Test Connection
- 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Â
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>
3. This will display the values entered by the customer at checkout on their invoice.
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.