Originate a digital check
Overview
Let's assume you want to send $100 via a digital check — for example, to pay a vendor, reimburse an employee, or issue a refund. Modern Treasury generates the check as a PDF that you download and deliver to the recipient. You'll need to create a Payment Order with a Counterparty.
Before making requests, you'll need your API Key and Organization ID. Follow this guide to retrieve them: Retrieve your API Key.
1. Retrieve your Internal Account ID
Internal Accounts
Modern Treasury uses the term Internal Account to refer to your bank accounts. Your customers', vendors', and employees' bank accounts are called External Accounts.
When you create a Payment Order, you must specify which account the check will be drawn against.
To get an Internal Account ID, pick a digital-check-enabled account from your accounts page.
To retrieve all internal accounts via the API, issue the following request:
curl --request GET \
-u ORGANIZATION_ID:API_KEY \
--url https://app.moderntreasury.com/api/internal_accounts[
{
"id": "0f8e3719-3dfd-4613-9bbf-c0333781b59f",
"object": "internal_account",
"account_type": null,
"party_name": "Modern Treasury",
"party_type": null,
"account_details": [
{
"id": "aaf74f7e-d697-4a73-95a3-05bede2edce6",
"object": "account_details",
"account_number_safe": "2971",
"account_number_type": null
}
],
"routing_details": [
{
"id": "a3649136-f8d2-46e8-8b41-327bd7da3110",
"object": "routing_details",
"payment_type": null,
"routing_number": "021000021",
"routing_number_type": "aba"
}
]
}
]The response returns an array of your Internal Accounts. For this example, use the first account ID: 0f8e3719-3dfd-4613-9bbf-c0333781b59f.
Sandbox Setup
Digital checks are supported in the sandbox. For more information on how we've set up your accounts, visit our Sandbox Details guide.
2. Create a Counterparty
A digital check requires the recipient's name but not a mailing address, account number, or routing number. Create a Counterparty with an External Account to use as the Payment Order's receiving account.
curl --request POST \
-u ORGANIZATION_ID:API_KEY \
--url https://app.moderntreasury.com/api/counterparties \
-H 'Content-Type: application/json' \
-d '{
"name": "Kenner, Bach and Ledeen",
"accounts": [
{
"account_type": "other"
}
]
}'{
"id": "37ba4454-dd33-4aa0-8906-0e2e4103e45c",
"object": "counterparty",
"name": "Kenner, Bach and Ledeen",
"email": null,
"metadata": {},
"accounts": [
{
"id": "5acec2ef-987b-4260-aa97-b719eeb0a8d5",
"object": "external_account",
"account_type": "other",
"party_name": "Kenner, Bach and Ledeen",
"party_type": null,
"party_address": null,
"account_details": [],
"routing_details": []
}
]
}The response returns a new Counterparty with one attached External Account. You'll need the External Account ID (5acec2ef-987b-4260-aa97-b719eeb0a8d5) for the next step.
3. Create a Payment Order
Create a Payment Order using your Internal Account ID as the originating_account_id and the Counterparty's External Account ID as the receiving_account_id. Set type to check, subtype to digital, and direction to credit.
curl --request POST \
-u ORGANIZATION_ID:API_KEY \
--url https://app.moderntreasury.com/api/payment_orders \
-H 'Content-Type: application/json' \
-d '{
"type": "check",
"subtype": "digital",
"amount": 10000,
"direction": "credit",
"currency": "USD",
"effective_date": "2026-09-01",
"originating_account_id": "0f8e3719-3dfd-4613-9bbf-c0333781b59f",
"receiving_account_id": "5acec2ef-987b-4260-aa97-b719eeb0a8d5",
"remittance_information": "Invoice 1234",
"expires_at": "2027-01-15T23:59:59Z"
}'The
remittance_informationappears in the memo field on the generated check PDF and can contain up to 140 characters. By default, the check expires 90 days after itseffective_date. You can setexpires_atto a date up to 180 days after theeffective_date.
{
"id": "c5f4009c-bdd6-4cc1-84b2-17974ac9e77a",
"object": "payment_order",
"type": "check",
"subtype": "digital",
"amount": 10000,
"direction": "credit",
"originating_account_id": "0f8e3719-3dfd-4613-9bbf-c0333781b59f",
"receiving_account": {
"id": "5acec2ef-987b-4260-aa97-b719eeb0a8d5",
"object": "external_account",
"account_type": "other",
"party_name": "Kenner, Bach and Ledeen",
"party_type": null,
"party_address": null,
"account_details": [],
"routing_details": [],
"created_at": "2026-06-23T00:11:07Z",
"updated_at": "2026-06-23T00:11:07Z"
},
"receiving_account_id": "5acec2ef-987b-4260-aa97-b719eeb0a8d5",
"receiving_account_type": "external_account",
"accounting_category_id": null,
"currency": "USD",
"effective_date": "2026-09-01",
"priority": "normal",
"description": null,
"statement_descriptor": null,
"remittance_information": "Invoice 1234",
"metadata": {},
"expires_at": "2027-01-15T23:59:59Z",
"status": "approved",
"counterparty_id": "37ba4454-dd33-4aa0-8906-0e2e4103e45c",
"transaction_ids": [],
"charge_bearer": null,
"foreign_exchange_indicator": null,
"foreign_exchange_contract": null,
"created_at": "2026-06-23T00:11:07Z",
"updated_at": "2026-06-23T00:11:07Z"
}The response contains the Payment Order ID (c5f4009c-bdd6-4cc1-84b2-17974ac9e77a) and its details. Modern Treasury creates the PDF while processing the Payment Order. The PDF is ready when the Payment Order reaches sent status.
4. Retrieve the digital check
After the Payment Order has been approved a created event will be sent for the Check PDF (see Document Webhooks for more details). To retrieve the PDF, list its Documents and select the Document whose document_type is rendered_check.
curl --request GET \
-u ORGANIZATION_ID:API_KEY \
--url 'https://app.moderntreasury.com/api/documents?documentable_type=payment_order&documentable_id=c5f4009c-bdd6-4cc1-84b2-17974ac9e77a&document_type=rendered_check'[
{
"id": "b05dd054-6eea-4cdd-9096-cf3fa8eb6fb7",
"object": "document",
"source": "modern_treasury",
"document_type": "rendered_check",
"documentable_id": "c5f4009c-bdd6-4cc1-84b2-17974ac9e77a",
"documentable_type": "payment_order",
"file": {
"filename": "check_12345678.pdf",
"content_type": "application/pdf"
}
}
]Use the Document ID to download the PDF:
curl --request GET \
-u ORGANIZATION_ID:API_KEY \
--location \
--output digital-check.pdf \
--url https://app.moderntreasury.com/api/documents/b05dd054-6eea-4cdd-9096-cf3fa8eb6fb7/downloadSee Documents for more information about listing and downloading Documents.
5. Deliver the digital check
Modern Treasury does not mail or email a digital check to the recipient. Deliver the downloaded PDF through your preferred secure channel. The recipient can print and deposit it according to their financial institution's requirements.
Optional: Add a logo to the check
Attach a check_logo Document when creating the Payment Order to place an image in the upper-left corner of the generated check. The image must meet the following requirements:
- PNG or JPG format
- RGB or CMYK color space
- Square aspect ratio (equal width and height)
- Minimum 100px × 100px
- Transparent background
See Originate a printed check for multipart and base64 upload examples. Set subtype to digital when adapting those requests.
Optional: Handle post-creation events
Modern Treasury sends events as your Payment Order progresses. Use the Dashboard, Webhooks, or a third-party integration to track the status of the check processing and cashing. You can also stop a check payment after creation when the Payment Order is eligible.
Updated 6 days ago