Welcome to the Online Check Writer API V3! Our API makes it incredibly easy to integrate check writing, payment processing, and banking features into your application. Most integrations take less than 1 hour to complete.
These are the three most frequently used API operations. Each section below provides complete, working examples that you can copy and use immediately.
Check mailing allows you to create a check digitally and have it physically printed and mailed via USPS directly to the recipient. You never have to touch paper or go to the post office.
bankAccountId
) β How to get thispayeeId
) β How to get thischeckId
) β How to get thisStep 1: Create a Bank Account (One-time setup)
POST /bankAccounts
{
"bankAccounts": [{
"name": "Business Checking",
"accountNumber": "1234567890",
"bankRoutingNumber": "121000358",
"addressLine1": "123 Business St",
"city": "San Jose",
"state": "CA",
"zip": "95113",
"bankName": "Chase Bank"
}]
}
// Response: { "bankAccountId": "bnk_12345" }
Step 2: Create a Payee (The recipient)
POST /payees
{
"payees": [{
"name": "John Smith",
"addressLine1": "789 Main Street",
"addressLine2": "Apt 4B",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"phone": "555-0123"
}]
}
// Response: { "payeeId": "pay_67890" }
Step 3: Create the Check
Need these IDs? Get bankAccountId | Get payeeId
POST /checks
{
"checks": [{
"bankAccountId": "bnk_12345", // From Step 1
"payeeId": "pay_67890", // From Step 2
"amount": 500.00,
"memo": "Payment for Invoice #1234",
"issueDate": "2024-01-25"
}]
}
// Response: { "checkId": "chk_99999" }
Step 4: Mail the Check
Need the check ID? Learn how to create checks β
POST /mailchecks
{
"checkId": "chk_99999", // From Step 3
"mailType": 1, // 1 = First Class (3-5 days)
"sendDate": "2024-01-26" // Optional: Schedule for future
}
// Response: { "success": true, "trackingNumber": "XXXXX" }
Mail Type | Description | Delivery Time | Cost |
---|---|---|---|
1 | First Class Mail | 3-5 business days | $1.85 |
2 | First Class with Tracking | 3-5 business days | $4.50 |
3 | Express Mail | 1-2 business days | $26.35 |
async function mailCheckComplete() {
const API_TOKEN = 'your_token_here';
const BASE_URL = 'https://test.onlinecheckwriter.com/api/v3';
const headers = {
'Authorization': `Bearer ${API_TOKEN}`,
'Content-Type': 'application/json'
};
// Step 1: Create bank account (skip if already exists)
const bankResponse = await fetch(`${BASE_URL}/bankAccounts`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
bankAccounts: [{
name: "Business Checking",
accountNumber: "1234567890",
bankRoutingNumber: "121000358",
addressLine1: "123 Business St",
city: "San Jose",
state: "CA",
zip: "95113"
}]
})
});
const bank = await bankResponse.json();
const bankAccountId = bank.data.bankAccounts[0].bankAccountId;
// Step 2: Create payee
const payeeResponse = await fetch(`${BASE_URL}/payees`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
payees: [{
name: "Vendor ABC",
addressLine1: "456 Vendor Ave",
city: "Dallas",
state: "TX",
zip: "75001"
}]
})
});
const payee = await payeeResponse.json();
const payeeId = payee.data.payees[0].payeeId;
// Step 3: Create check
const checkResponse = await fetch(`${BASE_URL}/checks`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
checks: [{
bankAccountId: bankAccountId,
payeeId: payeeId,
amount: 1000.00,
memo: "Monthly payment"
}]
})
});
const check = await checkResponse.json();
const checkId = check.data.checks[0].checkId;
// Step 4: Mail the check
const mailResponse = await fetch(`${BASE_URL}/mailchecks`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
checkId: checkId,
mailType: 1 // First class mail
})
});
const result = await mailResponse.json();
console.log('Check mailed successfully!', result);
return result;
}
Check printing generates a PDF file that you can download and print on your own check stock or blank paper. Perfect for businesses that want to print checks in-house.
bankAccountId
) β How to get thispayeeId
) β How to get thischeckId
) β How to get thisStep 1-3: Same as Check Mailing (Create Bank Account, Payee, and Check)
Step 4: Print the Check to PDF
POST /checks/print
{
"checkId": ["chk_99999"], // Can print multiple checks at once
"paperType": 1 // See paper types below
}
// Response: {
// "success": true,
// "data": {
// "url": "https://download-link.com/your-check.pdf"
// }
// }
Paper Type | Description | Best For |
---|---|---|
1 | Check on Top | Standard business checks with stub at bottom |
2 | Check on Middle | Checks with stubs on top and bottom |
3 | Check on Bottom | Checks with stub at top |
4 | Three per page | Multiple checks on one page |
5 | Wallet size | Personal-sized checks |
6 | Simple print | Plain paper printing (no special stock needed) |
async function printCheckComplete() {
const API_TOKEN = 'your_token_here';
const BASE_URL = 'https://test.onlinecheckwriter.com/api/v3';
const headers = {
'Authorization': `Bearer ${API_TOKEN}`,
'Content-Type': 'application/json'
};
// Step 1: Get existing bank account (or create new)
const banksResponse = await fetch(`${BASE_URL}/bankAccounts`, {
method: 'GET',
headers: headers
});
const banks = await banksResponse.json();
const bankAccountId = banks.data.bankAccounts[0].bankAccountId;
// Step 2: Get existing payee (or create new)
const payeesResponse = await fetch(`${BASE_URL}/payees`, {
method: 'GET',
headers: headers
});
const payees = await payeesResponse.json();
const payeeId = payees.data.payees[0].payeeId;
// Step 3: Create check with voucher for detailed stub
const checkResponse = await fetch(`${BASE_URL}/checks`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
checks: [{
bankAccountId: bankAccountId,
payeeId: payeeId,
amount: 2500.00,
memo: "Professional Services",
invoiceNumber: "INV-2024-001",
voucher: {
voucherNumber: "V001",
memo: "January Services",
date: "2024-01-31",
voucherItems: [
{
name: "Consulting",
description: "20 hours @ $100",
quantity: 20,
unitCost: 100,
total: 2000
},
{
name: "Travel",
description: "Expenses",
quantity: 1,
unitCost: 500,
total: 500
}
]
}
}]
})
});
const check = await checkResponse.json();
const checkId = check.data.checks[0].checkId;
// Step 4: Generate PDF for printing
const printResponse = await fetch(`${BASE_URL}/checks/print`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
checkId: [checkId],
paperType: 1 // Check on top
})
});
const result = await printResponse.json();
console.log('PDF URL:', result.data.url);
// Optional: Download the PDF
window.open(result.data.url, '_blank');
return result;
}
// Print multiple checks at once
POST /checks/print
{
"checkId": ["chk_111", "chk_222", "chk_333"],
"paperType": 4 // Three per page
}
// Returns single PDF with all checks
eCheck (electronic check) allows you to send checks digitally via email. The recipient receives a secure PDF of the check that they can print or deposit electronically. It's instant, free, and environmentally friendly.
bankAccountId
) β How to get thispayeeId
) β How to get thischeckId
) β How to get thisStep 1-3: Same as above (Create Bank Account, Payee, and Check)
Step 4: Email the Check
POST /emailchecks
{
"checkId": "chk_99999",
"recipientEmail": "recipient@example.com",
"subject": "Payment for Invoice #1234",
"message": "Please find attached your payment. Thank you for your services.",
"ccEmails": ["accounting@company.com", "records@company.com"],
"sendDate": "2024-01-25" // Optional: Schedule for later
}
// Response: {
// "success": true,
// "message": "Check emailed successfully"
// }
Parameter | Required | Description |
---|---|---|
checkId |
Yes | The ID of the check to email |
recipientEmail |
Yes | Primary recipient's email |
subject |
No | Email subject line (default: "Payment from [Your Name]") |
message |
No | Email body message |
ccEmails |
No | Array of CC recipients |
sendDate |
No | Schedule for future delivery (YYYY-MM-DD) |
async function sendECheckComplete() {
const API_TOKEN = 'your_token_here';
const BASE_URL = 'https://test.onlinecheckwriter.com/api/v3';
const headers = {
'Authorization': `Bearer ${API_TOKEN}`,
'Content-Type': 'application/json'
};
// Step 1: Create or get bank account
const banksResponse = await fetch(`${BASE_URL}/bankAccounts`, {
method: 'GET',
headers: headers
});
const banks = await banksResponse.json();
let bankAccountId;
if (banks.data.bankAccounts.length === 0) {
// Create new bank account
const newBankResponse = await fetch(`${BASE_URL}/bankAccounts`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
bankAccounts: [{
name: "Business Checking",
accountNumber: "9876543210",
bankRoutingNumber: "121000358",
addressLine1: "456 Corporate Blvd",
city: "San Francisco",
state: "CA",
zip: "94105"
}]
})
});
const newBank = await newBankResponse.json();
bankAccountId = newBank.data.bankAccounts[0].bankAccountId;
} else {
bankAccountId = banks.data.bankAccounts[0].bankAccountId;
}
// Step 2: Create payee with email
const payeeResponse = await fetch(`${BASE_URL}/payees`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
payees: [{
name: "Digital Vendor LLC",
email: "vendor@digitalvendor.com",
addressLine1: "789 Online Ave",
city: "Austin",
state: "TX",
zip: "78701",
phone: "555-9999"
}]
})
});
const payee = await payeeResponse.json();
const payeeId = payee.data.payees[0].payeeId;
// Step 3: Create check with attachment option
const checkResponse = await fetch(`${BASE_URL}/checks`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
checks: [{
bankAccountId: bankAccountId,
payeeId: payeeId,
amount: 750.00,
memo: "Website development - Phase 1",
invoiceNumber: "WEB-2024-001",
note: "Internal: Q1 web project"
}]
})
});
const check = await checkResponse.json();
const checkId = check.data.checks[0].checkId;
// Step 4: Email the check
const emailResponse = await fetch(`${BASE_URL}/emailchecks`, {
method: 'POST',
headers: headers,
body: JSON.stringify({
checkId: checkId,
recipientEmail: "vendor@digitalvendor.com",
subject: "Payment for Website Development - Invoice WEB-2024-001",
message: `Dear Digital Vendor LLC,
Please find attached the payment for Phase 1 of the website development project.
The check can be printed or deposited electronically.
Amount: $750.00
Invoice: WEB-2024-001
Thank you for your excellent work!
Best regards,
Accounts Payable`,
ccEmails: ["accounting@mycompany.com", "projectmanager@mycompany.com"],
sendDate: "2024-01-25"
})
});
const result = await emailResponse.json();
console.log('eCheck sent successfully!', result);
return result;
}
// First, add an attachment to the check
POST /checks/{checkId}/attachments
// Upload invoice or supporting document
// Then email the check with attachment
POST /emailchecks
{
"checkId": "chk_99999",
"recipientEmail": "vendor@example.com",
"subject": "Payment with Invoice Attached",
"message": "Payment and invoice documentation attached."
}
Scenario | Best Method | Why |
---|---|---|
Recipient prefers physical checks | Check Mailing | Arrives via USPS, no action needed from you |
You want to print checks in-office | Check Printing | Full control, immediate printing |
Need instant delivery | eCheck | Arrives in seconds via email |
Saving on postage | eCheck | No mailing costs |
Bulk payments to multiple vendors | Check Printing | Print all at once on multi-check paper |
Remote/international recipients | eCheck | No geographical limitations |
Make a simple GET request to verify your setup:
curl --request GET \
--url 'https://test.onlinecheckwriter.com/api/v3/me' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
Many API endpoints require IDs from other resources. You CANNOT create a check without first having a bank account and payee. This section shows you exactly what you need and in what order.
What You Want To Do | Required IDs/Data | How To Get Them (In Order) |
---|---|---|
Create a Check | bankAccountId β, payeeId β |
1. POST /bankAccounts OR GET /bankAccounts 2. POST /payees OR GET /payees 3. Then POST /checks |
Print a Check | checkId β |
1. Create check first (POST /checks) 2. Use checkId from response 3. POST /checks/print |
Mail a Check | checkId β, fromAddressId , toAddressId |
1. Create check (POST /checks) 2. Create addresses (POST /customFromAddress, POST /customToAddress) 3. POST /mailchecks |
Email a Check | checkId β |
1. Create check (POST /checks) 2. POST /emailchecks |
Add Signature | bankAccountId β |
1. Create bank account (POST /bankAccounts) 2. POST /bankAccounts/{id}/signatures |
Create Check with Category | bankAccountId β, payeeId β, categoryId β |
1. Create bank account 2. Create payee 3. Create category (POST /categories) 4. POST /checks |
Add Attachment to Check | checkId β |
1. Create check first 2. POST /checks/{checkId}/attachments |
Cloud Bank ACH Payment | accountId β, contactId |
1. Create cloud bank account 2. Create contact 3. POST /cloud-bank/send-payment/ach |
Fund Cloud Bank Account | accountId β, sourceBankAccountId β |
1. Create cloud bank account 2. Have verified bank account 3. POST /cloud-bank/account/{id}/fund |
Follow this EXACT order when setting up your integration for the first time:
GET /me
# Save your userId and account details
POST /bankAccounts
{
"bankAccounts": [{
"name": "My Business Account",
"accountNumber": "1234567890",
"bankRoutingNumber": "121000358",
# ... other required fields
}]
}
# SAVE THE RESPONSE: bankAccountId = "bnk_xxxxx"
POST /bankAccounts/{bankAccountId}/signatures
# Upload signature image file
POST /payees
{
"payees": [{
"name": "John Smith",
"addressLine1": "123 Main St",
# ... other fields
}]
}
# SAVE THE RESPONSE: payeeId = "pay_xxxxx"
POST /categories
{
"categories": [{
"name": "Office Supplies"
}]
}
# SAVE THE RESPONSE: categoryId = "cat_xxxxx"
Need these IDs? Get bankAccountId | Get payeeId | Get categoryId
POST /checks
{
"checks": [{
"bankAccountId": "bnk_xxxxx", # From Step 2
"payeeId": "pay_xxxxx", # From Step 4
"categoryId": "cat_xxxxx", # From Step 5 (optional)
"amount": 100.00,
"memo": "Payment"
}]
}
# SAVE THE RESPONSE: checkId = "chk_xxxxx"
If you already have resources created, here's how to retrieve their IDs:
β Jump to Bank Accounts section for full details
GET /bankAccounts
# Response will include:
{
"data": {
"bankAccounts": [
{
"bankAccountId": "bnk_xxxxx", # <-- Use this ID
"name": "Business Checking",
"isVerified": true # <-- Check verification status
}
]
}
}
β Jump to Payees section for full details
GET /payees
# Response will include:
{
"data": {
"payees": [
{
"payeeId": "pay_xxxxx", # <-- Use this ID
"name": "John Smith"
}
]
}
}
β Jump to Checks section for full details
GET /checks
# Response will include:
{
"data": {
"checks": [
{
"checkId": "chk_xxxxx", # <-- Use this ID
"status": 0, # <-- Check status (0 = new)
"amount": "100.00"
}
]
}
}
β Jump to Categories section for full details
GET /categories
# Response will include:
{
"data": {
"categories": [
{
"categoryId": "cat_xxxxx", # <-- Use this ID
"name": "Office Supplies"
}
]
}
}
bankAccountId
payeeId
(unless using noPayee: true
)Environment | Base URL |
---|---|
Sandbox (Testing) | https://test.onlinecheckwriter.com/api/v3 |
Production (Live) | https://app.onlinecheckwriter.com/api/v3 |
Set up these variables in your application:
# Required
BASE_URL=https://test.onlinecheckwriter.com/api/v3
AUTH_TOKEN=your_api_token_here
# Optional (will be populated as you create resources)
BANK_ACCOUNT_ID=
PAYEE_ID=
CATEGORY_ID=
CHECK_ID=
CUSTOM_FROM_ADDRESS_ID=
CUSTOM_TO_ADDRESS_ID=
VOUCHER_ID=
CUSTOMER_ID=
CUSTOMER_BANK_ACCOUNT_ID=
Method | Description | Usage |
---|---|---|
GET | Retrieve resources | Fetching data |
POST | Create resources | Creating new records |
PUT | Update resources | Modifying existing records |
DELETE | Delete resources | Removing records |
All API requests require Bearer token authentication.
Include your API token in the Authorization header of every request:
Authorization: Bearer YOUR_API_TOKEN
Every request should include these headers:
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
Accept: application/json
curl --request GET \
--url 'https://test.onlinecheckwriter.com/api/v3/bankAccounts' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'
Retrieve information about the authenticated user.
Endpoint: GET /me
Request Example:
curl --request GET \
--url '{{BASE_URL}}/me' \
--header 'Authorization: Bearer {{AUTH_TOKEN}}'
Success Response (200 OK):
{
"success": true,
"data": {
"userId": "usr_xxxxx",
"email": "user@example.com",
"name": "John Doe",
"company": "Example Corp",
"accountType": "business"
}
}
Create multiple bank accounts in a single request.
Endpoint: POST /bankAccounts
Request Body:
Need help finding IDs for checks? After creating a bank account, save the bankAccountId
from the response to use when creating checks.
{
"bankAccounts": [
{
"name": "Business Checking",
"nickName": "Main Account",
"accountNumber": "1234567890",
"addressLine1": "123 Business St",
"addressLine2": "Suite 100",
"phone": "555-0100",
"city": "San Jose",
"state": "CA",
"zip": "95113",
"bankName": "Chase Bank",
"bankRoutingNumber": "121000358",
"bankAddress1": "456 Bank Ave",
"bankCity": "Dallas",
"bankState": "TX",
"bankZip": "75001"
}
]
}
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
name | String | β Yes | Bank account name (max 100 chars) |
nickName | String | No | Nickname for the account (max 100 chars) |
accountNumber | String | β Yes | Account number (max 20 chars) |
addressLine1 | String | β Yes | Primary address (max 180 chars) |
addressLine2 | String | No | Secondary address (max 180 chars) |
phone | String | No | Phone number (max 15 chars) |
city | String | β Yes | City name |
state | String | β Yes | State abbreviation (e.g., "CA") |
zip | String | β Yes | Valid ZIP code |
bankName | String | No | Name of the bank (max 100 chars) |
bankRoutingNumber | String | β Yes | 9-digit US routing number |
bankAddress1 | String | No | Bank address line 1 (max 180 chars) |
bankCity | String | No | Bank city |
bankState | String | No | Bank state |
bankZip | String | No | Bank ZIP code |
Success Response (201 Created):
{
"success": true,
"message": "Successfully created",
"data": {
"bankAccounts": [
{
"bankAccountId": "bnk_xxxxx",
"name": "Business Checking",
"isVerified": false
}
]
}
}
List all bank accounts with optional filtering.
Endpoint: GET /bankAccounts
Get details of a specific bank account.
Endpoint: GET /bankAccounts/{bankAccountId}
Modify an existing bank account.
Endpoint: PUT /bankAccounts/{bankAccountId}
Remove a bank account from your account.
Endpoint: DELETE /bankAccounts/{bankAccountId}
Upload a signature image for check signing. Need a bankAccountId
? Create or retrieve one first
Endpoint: POST /bankAccounts/{bankAccountId}/signatures
Upload a logo for check customization.
Endpoint: POST /bankAccounts/{bankAccountId}/logos
Create one or multiple checks in a single request.
Endpoint: POST /checks
Request Body:
Need help finding required IDs?
bankAccountId
- Get from Bank Accounts βpayeeId
- Get from Payees βcategoryId
(optional) - Get from Categories β{
"checks": [
{
"bankAccountId": "yd6LeMYmdQeE8Dx", // Required - from Bank Accounts
"payeeId": "Xw2lx48MdGMzWyD", // Required - from Payees
"categoryId": "MLbz3Aj3ReVw6Ev", // Optional - from Categories
"serialNumber": "1001",
"issueDate": "2024-01-25",
"amount": 100.00,
"memo": "Invoice Payment #1234",
"note": "Internal reference note",
"accountNumber": "458756",
"invoiceNumber": "INV-2024-001",
"noSign": false,
"noAmount": false,
"noDate": false,
"noPayee": false,
"voucher": {
"voucherNumber": "1000",
"memo": "Monthly Services",
"date": "2024-01-20",
"voucherItems": [
{
"invoiceNumber": "858",
"name": "Consulting Services",
"description": "January 2024 consulting",
"quantity": 10,
"unitCost": 50,
"total": 500
}
]
}
}
]
}
Status | Code | Description |
---|---|---|
New | 0 | Newly created check |
Printed | 1 | Check has been printed |
Void | 2 | Check has been voided |
Mailed | 7 | Check has been mailed |
Refunded | 11 | Check mailing refunded |
E-Mailed | 12 | Check sent via email |
E-Printed | 14 | Check printed electronically |
DD | 300-306 | Direct Deposit statuses |
Add recipients for checks and payments. Save the payeeId
from the response to use when creating checks.
Endpoint: POST /payees
Request Body:
{
"payees": [
{
"name": "John Smith",
"nickName": "Contractor",
"addressLine1": "789 Main St",
"addressLine2": "Apt 4B",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"phone": "555-0123",
"email": "john@example.com"
}
]
}
Endpoint: GET /payees
Endpoint: PUT /payees/{payeeId}
Endpoint: DELETE /payees/{payeeId}
Organize your financial transactions. Save the categoryId
to optionally use when creating checks.
Endpoint: POST /categories
Request Body:
{
"categories": [
{
"name": "Office Supplies",
"description": "Purchases for office materials"
}
]
}
Endpoint: GET /categories
Send a physical check via USPS. Need a checkId
? Create a check first
Endpoint: POST /mailchecks
Request Body:
{
"checkId": "chk_xxxxx",
"mailType": 1,
"fromAddressId": "adr_xxxxx",
"toAddressId": "adr_yyyyy",
"sendDate": "2024-01-30"
}
Send a check digitally via email. Need a checkId
? Create a check first
Endpoint: POST /emailchecks
Request Body:
{
"checkId": "chk_xxxxx",
"recipientEmail": "recipient@example.com",
"subject": "Payment for Invoice #1234",
"message": "Please find attached your payment.",
"ccEmails": ["accounting@example.com"],
"sendDate": "2024-01-25"
}
Cloud Banking provides virtual bank accounts with full transaction capabilities.
Endpoint: GET /cloud-bank/account
Endpoint: POST /cloud-bank/account
Need IDs? Get accountId
from Cloud Bank Accounts, create contactId
with POST /cloud-bank/contact
Endpoint: POST /cloud-bank/send-payment/ach
Endpoint: POST /cloud-bank/send-payment/wire
Endpoint: POST /cloud-bank/send-payment/international-wire
Create links for customers to pay you.
Endpoint: POST /payment-links
Manage crypto transactions.
Get Wallets: GET /cloud-bank/crypto/wallet
Activate Wallet: POST /cloud-bank/crypto/wallet
Create Gift Card: POST /gift-cards
Check Balance: GET /gift-cards/{cardId}/balance
Goal: Pay multiple vendors at the end of each month
// Complete workflow with all dependencies
async function processMonthlyVendorPayments() {
// Step 1: Get your bank account (or create if first time)
let bankAccountId;
const bankAccounts = await api.get('/bankAccounts');
if (bankAccounts.data.bankAccounts.length === 0) {
// First time - create bank account
const newBank = await api.post('/bankAccounts', {
bankAccounts: [{
name: "Business Checking",
accountNumber: "1234567890",
bankRoutingNumber: "121000358",
addressLine1: "123 Business St",
city: "San Jose",
state: "CA",
zip: "95113"
}]
});
bankAccountId = newBank.data.bankAccounts[0].bankAccountId;
} else {
bankAccountId = bankAccounts.data.bankAccounts[0].bankAccountId;
}
// Step 2: Get or create vendors (payees)
const vendors = [
{ name: "ABC Supplies", amount: 1500.00, invoice: "INV-001" },
{ name: "XYZ Services", amount: 2500.00, invoice: "INV-002" }
];
const payeeIds = {};
const existingPayees = await api.get('/payees');
for (const vendor of vendors) {
const existing = existingPayees.data.payees.find(p => p.name === vendor.name);
if (existing) {
payeeIds[vendor.name] = existing.payeeId;
} else {
const newPayee = await api.post('/payees', {
payees: [{
name: vendor.name,
addressLine1: "Vendor Address",
city: "City",
state: "CA",
zip: "90001"
}]
});
payeeIds[vendor.name] = newPayee.data.payees[0].payeeId;
}
}
// Step 3: Create all checks
const checksToCreate = vendors.map(vendor => ({
bankAccountId: bankAccountId,
payeeId: payeeIds[vendor.name],
amount: vendor.amount,
memo: `Payment for ${vendor.invoice}`,
invoiceNumber: vendor.invoice
}));
const checksResponse = await api.post('/checks', {
checks: checksToCreate
});
// Step 4: Process each check (mail or email)
for (const check of checksResponse.data.checks) {
// Mail the check
await api.post('/mailchecks', {
checkId: check.checkId,
mailType: 1 // First class mail
});
}
return checksResponse.data.checks;
}
All successful API calls return this format:
{
"success": true,
"message": "Operation completed successfully",
"data": {
// Response data here
}
}
For list endpoints:
{
"success": true,
"data": {
"meta": {
"total": 100,
"currentPage": 1,
"perPage": 10
},
"items": [
// Array of items
]
}
}
{
"success": false,
"errorMsg": "Human-readable error message"
}
Status Code | Meaning | Description |
---|---|---|
200 | OK | Request successful |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Invalid or missing API token |
403 | Forbidden | Access denied to resource |
404 | Not Found | Resource not found |
422 | Unprocessable Entity | Validation errors |
429 | Too Many Requests | Rate limit exceeded |
500 | Server Error | Internal server error |
const axios = require('axios');
// Configuration
const API_TOKEN = 'your_api_token_here';
const BASE_URL = 'https://test.onlinecheckwriter.com/api/v3';
// Create axios instance with default config
const api = axios.create({
baseURL: BASE_URL,
headers: {
'Authorization': `Bearer ${API_TOKEN}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
// Example: Create a check
async function createCheck() {
try {
const response = await api.post('/checks', {
checks: [{
bankAccountId: 'bnk_xxxxx',
payeeId: 'pay_xxxxx',
amount: 100.00,
memo: 'Payment for services',
issueDate: '2024-01-25'
}]
});
console.log('Check created:', response.data);
return response.data.data.checks[0].checkId;
} catch (error) {
console.error('Error creating check:', error.response.data);
}
}
// Example: Print the check
async function printCheck(checkId) {
try {
const response = await api.post('/checks/print', {
paperType: 1,
checkId: [checkId]
});
console.log('PDF URL:', response.data.data.url);
} catch (error) {
console.error('Error printing check:', error.response.data);
}
}
// Run the examples
(async () => {
const checkId = await createCheck();
if (checkId) {
await printCheck(checkId);
}
})();
import requests
import json
# Configuration
API_TOKEN = 'your_api_token_here'
BASE_URL = 'https://test.onlinecheckwriter.com/api/v3'
# Headers for all requests
headers = {
'Authorization': f'Bearer {API_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
# Create a check
def create_check():
url = f'{BASE_URL}/checks'
payload = {
'checks': [{
'bankAccountId': 'bnk_xxxxx',
'payeeId': 'pay_xxxxx',
'amount': 100.00,
'memo': 'Payment for services',
'issueDate': '2024-01-25'
}]
}
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 201:
data = response.json()
check_id = data['data']['checks'][0]['checkId']
print(f'Check created: {check_id}')
return check_id
else:
print(f'Error: {response.json()}')
return None
# Print the check
def print_check(check_id):
url = f'{BASE_URL}/checks/print'
payload = {
'paperType': 1,
'checkId': [check_id]
}
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 200:
data = response.json()
print(f'PDF URL: {data["data"]["url"]}')
else:
print(f'Error: {response.json()}')
# Run the example
if __name__ == '__main__':
check_id = create_check()
if check_id:
print_check(check_id)
Immediate Support:
Resources:
Issue: 401 Unauthorized
Issue: 422 Validation Error
Issue: Rate Limit Exceeded
Issue: Check Creation Fails
Q: How long does integration take?
A: Most developers complete integration in under 1 hour.
Q: Can I test without real bank accounts?
A: Yes! Use the sandbox environment with test data.
Q: What's the rate limit?
A: Default is 60 requests per minute. Contact support for increases.
Q: Is the API PCI compliant?
A: Yes, our API is fully PCI compliant and secure.
Congratulations! You now have all the information needed to integrate with the Online Check Writer API V3.
Remember:
Happy coding! π
Last Updated: January 2024
API Version: V3
Documentation Version: 1.0
OnlineCheckWriter.com - Powered by Zil Money Corporation
Changing the way small and medium businesses transact.