Guide: Mailing Checks with PDF Attachments via API

Guide: Mailing Checks with PDF Attachments via API

Guide: How to Mail Checks with PDF Attachments

Welcome! This simplified guide will walk you through the complete workflow: from creating a check record with advanced details to physically mailing it with a PDF attachment (like an invoice or receipt).

The Mandatory Step: Set Your Connection Headers

Before making any request, you must add these 3 headers in your API tool (like Postman). Without these, our system cannot verify your account:

  • Content-Type: application/json
  • Accept: application/json
  • Authorization: Bearer YOUR_API_TOKEN_HERE (Find this in your dashboard under Developer Panel).

Step 1: Find Your Bank Account ID

You need a unique code for your bank account to tell the system where the funds are coming from.

ENDPOINT (GET)
RESPONSE EXAMPLE
{ "success": true, "data": { "bankAccounts": [{ "bankAccountId": "yd6LeMYmdQeE8Dx", "name": "Business Checking" }] } }

Action: Copy the bankAccountId value for Step 3.

Step 2: Find Your Payee ID

This is the unique code for the person or company you are paying.

ENDPOINT (GET)
RESPONSE EXAMPLE
{ "success": true, "data": { "payees": [{ "payeeId": "Xw2lx48MdGMzWyD", "name": "Jane Doe" }] } }

Action: Copy the payeeId for the next step.

Step 3: Create the Check Record (Advanced)

Create the check in our database. You can include advanced details like memos, serial numbers, or payment vouchers.

ENDPOINT (POST)
REQUEST BODY (JSON)
{ "checks" : [ { "bankAccountId" :"yd6LeMYmdQeE8Dx", "payeeId" :"Xw2lx48MdGMzWyD", "amount" :100.00, "memo" :"Invoice Payment", "serialNumber" :"1001", "note" :"Internal reference only", "accountNumber" :"458756", "invoiceNumber" :"2545", "voucher" :{ "voucherNumber" :"1000", "memo" :"Payment breakdown", "date" :"2026-01-20", "voucherItems" :[ { "invoiceNumber" :858, "name" :"Professional Services", "total" :100.00 } ] } } ] }
RESPONSE EXAMPLE
{ "success": true, "data": { "checks": [{ "checkId": "RJ6qGAm5lJGE1rD" }] } }

Action: Copy the checkId. You must have this to attach your PDF in the next step.

Step 4: Attach Your PDF Document

Now, link your PDF document (like an invoice) to the check you just created.

How to upload your file:
  1. In your API tool, change the Body format to form-data.
  2. In the KEY column, type exactly: attachment.
  3. Change the Key type from Text to File (check the dropdown menu).
  4. Click 'Select Files' and pick your PDF.
ENDPOINT (POST)
RESPONSE EXAMPLE
{ "success": false, "message": "Succesfully added", "data": { "mailAttachmentId": "OJapb4kkA4Y1Ewm" } }

Step 5: Choose Your Shipping & Paper Quality

Use this request to see every available mailing option and paper type. You must pick one ID from each category for the final step.

ENDPOINT (GET)
FULL LIST OF OPTIONS (RESPONSE DATA)
{ "success": true, "data": { "shippingTypes": [ { "shippingTypeId": 1, "name": "First Class" }, { "shippingTypeId": 3, "name": "First Class with Tracking" }, { "shippingTypeId": 4, "name": "Priority Mail" }, { "shippingTypeId": 5, "name": "Express Mail" }, { "shippingTypeId": 11, "name": "Fedex 2 days Shipping" }, { "shippingTypeId": 12, "name": "Fedex Standard Overnight" } ], "paperTypes": [ { "paperTypeId": 7, "name": "Regular Check Paper" }, { "paperTypeId": 8, "name": "Hollogram Check Paper" }, { "paperTypeId": 9, "name": "Ultra Hollogram Check Paper" } ] } }

Step 6: Trigger the Physical Mailing

The final step! This tells our facility to print and mail the check and attachment.

ENDPOINT (POST)
REQUEST BODY (JSON)
{ "mailChecks": [{ "checkId": "RJ6qGAm5lJGE1rD", "shippingTypeId": 3, "paperTypeId": 7 }] }
RESPONSE EXAMPLE
{ "success": true, "message": "successfully mailed" }
Done! Our facility has received your order and will begin processing the physical delivery.


    • Related Articles

    • How to use OnlineCheckWriter: A Developers Simple Guide

      ? Online Check Writer API V3 - Complete Integration Guide for Beginners ? Table of Contents Welcome & Quick Start ? Most Common Use Cases (Check Printing, Mailing, eCheck) Getting Started IMPORTANT: API Prerequisites & Dependencies Environment ...
    • How to Subscribe to Webhooks and Get Status Updates for Your Mailed Checks

      Guide: How to Subscribe to Webhooks and Get Status Updates for Your Mailed Checks Welcome! This comprehensive guide will walk you through the complete workflow of setting up webhooks to automatically receive real-time status updates when your mailed ...
    • Quick Guide: How to Mail Checks

      To quickly mail a check to your vendor, follow these steps using the provided API payload. Endpoint POST {{baseUrl}}/quickpay/mailcheck Payload Structure: { "source" : { "accountType" : "bankaccount", "accountId" : "{{bankAccountId}}" }, ...
    • Instant Checks by OnlineCheckWriter (Google Chrome™ Extension)

      Instant Checks by OnlineCheckWriter (Google Chrome™ Extension) Home Privacy Policy Terms of Use Schedule Demo ? Need Immediate Assistance? Email: support@onlinecheckwriter.com Phone: (408) 775-7720 Website: OnlineCheckWriter.com Schedule a Demo ? ...
    • How to Send Mail via OnlineCheckWriter.com: A Step-by-Step Guide

      Sending mail through OnlineCheckWriter.com is a straightforward process. Here's how you can do it: 1. Create a Payee First, you need to create a payee. Use the following API endpoint: POST {{baseUrl}}/payees If the payee information already exists in ...