How it works
Every Veryfi user account has its own @veryfi.cc email address. When an email reaches that address, Veryfi processes the attachments and the email body, extracts the data, adds the document to your Veryfi Inbox and returns the result as JSON.
Email Collector processes documents asynchronously: you send the email and Veryfi notifies you when the document is ready, through a webhook or a confirmation email.
Email Collector supports the Receipts and Invoices endpoint:
https://api.veryfi.com/api/v8/partner/documents
✏️ Learn more about other processing methods and different endpoints in Veryfi API Docs
Where to find your veryfi.cc address
Go to Veryfi Dashboard
Or go to Settings > Email Collector
Each user, team member or profile has one unique veryfi.cc address. A company with several users therefore has several addresses.
Supported email formats
HTML
Plain text
PDF attachments
Image attachments
📚 Learn more about file formats supported and file requirements, and what impact they have on the data extraction accuracy.
How Veryfi Email Collector Service handles the email body and attachments
Emails with multiple attachments
By default, all attachments in one email are combined into one PDF and processed as one document. This is useful when several files belong to the same transaction.
To process each attachment as a separate document, use any of these:
Method | How | Applies to |
Subject hashtag | Add | That email only |
Custom header | Add the header | That email only |
Account setting | Ask support@veryfi.com to process attachments separately for your account | Every email to that account |
When attachments are processed separately:
You receive one webhook per document
Each attachment becomes its own document
Each document can have up to 10 pages.
Attachments over/below the size limit are skipped.
The email body is not processed.
Email with a body and an attachment
Veryfi uses both. The attachment and the email body are combined into one multi-page document, so the receipt is captured whether it’s in the attachment or in the body.
Signature logos are ignored. If the email has a single image attachment that contains almost no text, such as a company logo in a signature, Veryfi skips the image and processes only the email body.
PDF links are preserved. When a digital (non-scanned) PDF is combined with an HTML body, the PDF pages are kept as they are, so any links inside them still work.
Veryfi also reads the subject line and the email text for extra clues, such as the date, total, vendor and invoice number, to improve extraction.
Email with a body only
HTML body: if the email has an HTML version, Veryfi always uses it and converts it to a PDF for extraction (Uber-like receipts)
Plain-text body: used only when there is no HTML version.
Links to hosted receipts: if a short email body links to a receipt hosted by Square, Xero, Clover, Walmart or RockSolid, Veryfi opens the link and processes the receipt page instead of the email.
If you don’t want the email body processed at all, contact support@veryfi.com to turn off body processing for your account.
Email with several attachments and a body
By default, everything is merged into one document.
Up to 5 attachments are included, largest first.
The email body is included with them.
DOCX files are converted to PDF, ZIP files are unpacked, and GIF files are ignored.
The merged document can have up to 15 pages.
How Veryfi notifies you
1. Webhook
If a webhook URL is configured on your account, Veryfi calls it once the emailed document is processed. Use the document ID in the notification to fetch the full result: GET https://api.veryfi.com/api/v8/partner/documents/DOCUMENT_ID/
Example of a successful webhook request
{
"event": "document.created",
"data": {
"id": 123456789,
"created": "2021-10-20 15:27:26"
}
}
If processing fails, you receive:
{
"event": "document.failed",
"data": {
"id": 123456789,
"created": "2021-10-20 15:27:26"
}
}Read more about webhooks and asynchronous processing.
2. Confirmation email
Veryfi can email you a confirmation each time an emailed document is processed. To turn this on or off, go to Settings > Profile > Auto-forward emailed receipts & bills back to me?
3. Rejected emails
If an email cannot be processed, Veryfi sends it back with the reason in the subject line.
How to customize the veryfi.cc email address
Currently, assigned veryfi.cc addresses can not be customized on user side. Please contact support@veryfi.com
📍 If you need to customize the veryfi.cc email address for a primary/main user, it will require an API key reset, so make sure you plan the maintenance window.
Implementation Guide: Collecting receipts from your own end users
Many Veryfi customers let their own users email in expenses. You usually do this with one address on your own domain (for example, receipts@yourcompany.com) rather than asking users to email a veryfi.cc address. To show each user only their own receipts, every document needs to carry that user's identifier in the external_id field.
There are two ways to set this up.
| Option 1: Veryfi Email Collector + custom headers | Option 2: Your own collector + Veryfi API |
How email reaches Veryfi | Your inbox forwards each email to your account-associated Veryfi.cc address | Your service sends each file to the Documents API |
How the user is identified |
|
|
Processing | Asynchronous; results by webhook | Synchronous; results in the API response |
Spam and sender filtering | Done by Veryfi Email Collector | Done by you |
Multiple attachments | Merged into one document unless you send | You decide: one API call per file |
Error Handling / Retries | No retry logic needed. You monitor rejected emails and failure webhooks, and ask the user to resend | You build automatic retries for timeouts and server errors, plus handling for rejected files |
Build effort | Lower: forward the email and add headers | Higher: parse the email and call the API, but you have full control |
Option 1: Veryfi Email Collector Service with custom headers
Your inbox receives the email, your system programmatically adds custom headers that identify the end user/document, and forwards the email to your account-associated Veryfi.cc address.
Veryfi API is already configured to read the email headers and propagate the values into the JSON.
Header | Value | Result |
| Your end user's ID, the sender's email address, or an expense ID you want to reconcile later | Copied to the |
|
|
|
Use a stable internal ID in X-External-ID where you can, rather than an email address that may change.
Python example. This re-sends the original email, with its body and attachments unchanged, from your own address to your veryfi.cc address with the headers added.
import smtplib
from email import policy
from email.parser import BytesParser
VERYFI_CC = "yourname@veryfi.cc" # from Settings > Email Collector
FORWARDER = "receipts@yourcompany.com" # your shared inbox
def forward_to_veryfi(raw_email: bytes, end_user_id: str, split_attachments: bool = False):
msg = BytesParser(policy=policy.default).parsebytes(raw_email)
# Send from your own domain so SPF and DKIM pass
for header in ("From", "To", "Cc", "Bcc", "DKIM-Signature", "Return-Path"):
del msg[header]
msg["From"] = FORWARDER
msg["To"] = VERYFI_CC
# Identify the end user and choose how attachments are handled
msg["X-External-ID"] = end_user_id
msg["X-Bulk"] = "true" if split_attachments else "false"
with smtplib.SMTP("smtp.yourcompany.com", 587) as server:
server.starttls()
server.login(SMTP_USER, SMTP_PASSWORD)
server.send_message(msg)
Custom headers are not visible to readers of the email, but they need access to your mail server or a script like this one.
No-code alternative.
If you only set up a plain auto-forward rule to your veryfi.cc address, the original sender cannot be captured, because every email arrives from your forwarding inbox. If your users email your veryfi.cc address directly, you can capture their address with a Data Transformation rule (see Adding email details to the JSON below).
Option 2: Your Own Email Collector + Veryfi API
Your service receives the email, works out which user sent it, and sends each receipt straight to the Documents API with the user's ID in external_id. Email Collector Service is not involved.
POST https://api.veryfi.com/api/v8/partner/documents
{
"file_name": "receipt.pdf",
"file_data": "<base64>",
"external_id": "user-48213"
}
What to send for each email:
Attachments: send each PDF or image as its own API call, all with the same
external_id.E-receipt in the body (no attachment): send the HTML body as a
.htmlfile.Whole email: you can also upload the raw
.emlfile. Veryfi turns it into one PDF and one document, with the attachments first (up to 5 PDFs or images) and the email body last. Use separate API calls instead if one email holds several receipts.
With this option, the API returns the extracted JSON in the same response, so no webhook is needed. You are responsible for spam and sender filtering, retries and duplicate checks. Links to receipts hosted by a point-of-sale provider are not followed: fetch the receipt yourself and upload it as a file.
See Process a Document in the API docs for every request option.
Error Handling and Retries
Both options need error handling, but only Option 2 needs retry logic.
| Option 1: Veryfi Email Collector + custom headers | Option 2: Your own collector + Veryfi API |
Temporary failures | Veryfi retries automatically | You retry, with an |
Problems with the file | Email is sent back with the reason in the subject line | API returns an error response |
Duplicate protection | The same email never creates two documents | Use the same |
What you build | Monitoring, user notifications, manual resend | Retry logic, monitoring, user notifications |
Option 1: Veryfi Email Collector
Veryfi retries for you. If processing fails for a temporary reason, Veryfi tries again automatically. The same email is never processed twice, so you don’t need retry logic
Some emails are sent back. If Veryfi can’t process an email, it returns it to the address it came from, with the reason in the subject line. With Option 1, that is your forwarding inbox (for example, receipts@yourcompany.com), not your end user.
Common reasons:
Reason | What to do |
No file or receipt found in the email | Ask the user to resend with the receipt attached, or as an e-receipt in the email body |
Unsupported, too large or password-protected file | Ask the user for a PDF or image within the limits, or an unlocked copy |
Veryfi does not reprocess a returned email. Once the cause is fixed, send it again with the same X-External-ID. Each resend creates a new document, so resend only what failed.
What to set up:
Keep a record of every email you forward: the end user, the
X-External-IDyou sent, the time and yourMessage-ID.Monitor your forwarding inbox for returned emails, and match each one to your record.
Handle webhooks. On success, fetch the document with
GET /api/v8/partner/documents/DOCUMENT_ID/and save it to the user. On adocument.failedevent, mark the submission as failed.Alert on silence. If a submission gets neither a result nor a returned email within 30 minutes, check spam and junk folders, then contact support with the send time and the forwarding address.
Option 2: Your own collector + Veryfi API
You retry temporary failures. Retry only errors that can succeed on a second try, and send the same Idempotency-Key on every retry of the same upload. Without it, a retry after a timeout can create a second document and a second charge.
Response | Retry? | What to do |
Timeout, 504 or 5xx | Yes | Retry with backoff (for example 30 s, 2 min, 10 min) and the same |
409 (request with this key still processing) | Yes | Wait, then retry with the same key. Never generate a new key |
429 (rate limited) | Yes | Back off and spread uploads through a queue |
400 (unsupported, too large, too small, or encrypted file) | No | Mark failed and ask the user to resend a fixed file |
401 or 403 | No | Check your credentials and account access |
What to set up:
Generate one
Idempotency-Keyper upload (a UUID), store it with the job, and reuse it only for retries of that upload.Set your HTTP client timeout to 180 seconds so long multi-page documents are not cut off on your side.
Skip duplicates before calling the API: don’t upload an email whose
Message-IDand attachment you have already processed.Keep the raw email for a set period (for example 30 days) so you can replay a failed upload without asking the user to resend.
See API error responses for the full list of error messages.
Adding email details to the JSON
The JSON has no dedicated fields for email metadata such as subject, sender or recipients. You can copy one of these values into the notes field with a Data Transformation rule.
Email detail | Rule placeholder |
Sender |
|
Recipient |
|
CC |
|
Subject |
|
To create the rule:
In the Veryfi portal, go to Data Transformation > Rules.
Click Add Rule.
Set Condition to All Documents and Action to Apply to Notes, with the value
{EmailedReceipt.email_from}.Set the rule live.
The sender's address then appears in the notes field of the JSON. If you already fill notes with another rule, the new rule overwrites that value.
Frequently asked questions
I forwarded a receipt but can't see it in my Veryfi Inbox.
Give it time. Most emails are processed in 3 to 5 minutes
Check your spam or junk folder for the confirmation email, or for a rejected email with the reason in its subject line.
Check the date range and sort order of your document filters in the Inbox.
If you still can't find it, contact support@veryfi.com with the time you sent the email and the address you sent it from.
Does Veryfi read e-receipts from point-of-sale systems?
Yes. For many common providers, Veryfi also follows the link in the email to a receipt hosted on the provider's site. If a provider doesn't work, let support know.
Can I have more than one veryfi.cc address?
Each user account has one address. Every team member or client profile you add gets its own.
Will I receive a webhook for every emailed document?
Yes, if a webhook URL is configured on your account. When attachments are processed separately, you receive one webhook per document.
How do I stop the confirmation emails?
Go to Settings > Profile > Auto-forward emailed receipts & bills back to me? and turn it off.
Can I tell which of my end users sent a receipt?
Yes. See Collecting receipts from your own end users above: use the
X-External-IDheader with Email Collector, or theexternal_idfield with the API.
Need help setting this up? Contact support@veryfi.com.
How to retrieve email keys to JSON
While there is no specific field in Veryfi JSON that would return (capture) the metadata from a submission via email collector [like: subject, email_from, email_to, email_cc].
The workaround is to use Data Transformation Rules to pull that metadata to notes field. You can find Rules section under Data Transformation in your Veryfi portal.
📍 There are other keys that you can utilize for that rule with {EmailedReceipt.email_..... } criteria:
.email_from {EmailedReceipt.email_from}
.email_to {EmailedReceipt.email_to}
.email_cc {EmailedReceipt.email_cc}
.subject {EmailedReceipt.subject}
Option with notes field
notes field is available by default for all users, so you can build this rule anytime. A blocker could be if you already use notes field for a custom regular expression, a new rule added to the same field will overwrite the previous extraction results.
How to create a rule
Go to Veryfi portal> Data Transformation > Rules
Hit Add Rule
Set Condition & Action
Set Rule Live
Where:
Condition: ALL Documents
Action: Apply to Notes
Notes apply: {EmailedReceipt.email_from}
What is expected:
The rule will pull the sender_email to your JSON notes section
Example:
How to Pass and Get the custom email identifier?
1. Using Veryfi Email Collector
When you simply Auto-forward all emails to Veryfi.cc (no code solution)
it is not possible to get any In this case “forwarded from” would be impossible to capture. The only option, in this case, is if the client adds a tag to the subject line with their end user email address.
Auto-forward all emails to Veryfi.cc ( programmatically )
This approach will require you to have direct integration of your mailbox and API.
The majority of the mailboxes have the ability to set custom headers.
These headers can be used for specific purposes, tracking information. So you can set these custom headers to parse any information like the sender email address, user identification information, expense id to reconcilee later, and when this email reached vertyfoi.cc email collector Veryfi system will identify this custom header and pull to external_id field.
Custom email header
An email header is a set of metadata that provides information about the email itself. It is not visible to the recipient by default, but it contains essential information for the email to be properly routed and processed. Email headers are generated by the email client or server and include details such as sender and recipient addresses, subject line, date and time sent, and various technical information.
To customize an email header, you typically need access to the settings of your email client or server. Keep in mind that modifying email headers is generally more advanced and might require technical knowledge, as altering certain headers improperly could result in emails not being delivered correctly or being flagged as suspicious.
Here is Python code sample for your referenced
To add a custom header when forwarding an email using Python, you can use the `add_header()` method of the `email.message.Message` class.
Here's an example:
import smtplib
from email.message import EmailMessage
# Create a new email message
msg = EmailMessage()
# Load the original email to be forwarded
original_email = ... # load the original email using your preferred method
# Set the custom header
msg.add_header('X-External-ID', '<ExternalID>')
msg.add_header('X-Bulk','<true/false>')
# Transfer the original email content to the new email
msg.attach(original_email)
# Forward the email
with smtplib.SMTP('smtp.example.com', 587) as server:
server.login('username', 'password')
server.send_message(msg)
Where
the `add_header()` method is used to add a custom header called
X-External-IDwith the value<ExternalID>. - for the purpose of pulling the value from the external id header to Veryfi JSON field external_id.the `add_header()` method is used to add a custom header called
X-Bulkwith the value<true/false>- to process all email attachments separately.
2. Convert Email to HTML and send to Veryfi API directly
Another option is to pass the sender email if you integrate your mailbox directly to your API and send all emails directly to Veryfi API avoiding Email collector. In this case, the you can simply pass the email as an external_id field.
Please note that if the email collector is avoided you will need to do spam and other filtering efforts on your side. Also, this will be synchronously processed as opposed to asynchronous processing via email collector.
📚 Please check the API Docs for the up-to-date API schema to learn how to manage Tags via API
Where do I find my veryfi.cc email?
There are two places where you can find your @veryfi.cc email
Just press COLLECT and you will see the assigned email to your account from any page inside your Veryfi portal.
2. Email Collector section under Settings
How Veryfi notifies you that an Email has been processed
1. Webhook notification
If a customer submits the document to their Veryfi account via email and they have a webhook URL configured on their account, Veryfi will then notify that webhook URL once the email is processed.
If document processing fails, you will receive:
{
"event": "document.failed",
"data": {
"id": 123456789,
"created": "2021-10-20 15:27:26"
}
}
📚Read more about webhooks and asynchronous processing here or check API Documentation.
2. Email confirmation
Emails with confirmation that your email submission has been processed can be managed inside Profile settings.
Please go to Settings>Profile>AUTO-FORWARD EMAILED RECEIPTS & BILLS BACK TO ME? Toggle OFF/ON.
3. Error Handling for rejected emails
When there's an issue and the email is not processed, the email will be forwarded back, with the failure reason in the email subject line. The error cause should be the same as we have in our API documentation.
What exepcted
If you experience any problems or need help setting this up, please reach out to support@veryfi.com, we are here for you.





