How to Automate Shopify B2B Overdue Invoice Reminders and Net 30/60 Dunning Without Plus

A verified Shopify Admin GraphQL API 2025-10 / 2026-01 architecture for querying overdue paymentSchedules, running an idempotent D-5 to D+21 reminder cadence, triggering automatic credit holds, and cancelling reminders instantly on orders/paid webhooks.

Published December 4, 2026 · 12 min read · By André Théo Lauret (Eclipse Technology) · Verified against Shopify Admin GraphQL API 2025-10 / 2026-01

Direct answer

To automate Shopify B2B overdue invoice reminders on Basic, Grow, or Advanced without Shopify Plus, query pending and partially paid orders via Admin GraphQL and inspect payment terms and installment schedules for due dates and remaining balances. Run an idempotent five-step dunning cadence from D-5 through automatic credit hold, verify live balance before dispatch, and stop immediately on paid webhooks.

1. Why native non-Plus Shopify payment reminders break at scale

Extending Net 30 or Net 60 terms to wholesale accounts increases average B2B order value, yet cash flow erodes rapidly when accounts receivable (AR) collections rely on manual admin clicks. In our earlier engineering guides on enforcing B2B credit limits on non-Plus Shopify stores and capturing Purchase Orders with Net 30 payment terms via GraphQL, we covered order origination and atomic credit reservations. The second half of the wholesale lifecycle is collecting cash on time without damaging long-term buyer relationships.

On Shopify Basic, Grow, and Advanced plans, merchants hit five concrete structural gaps once monthly B2B invoice volume crosses 25 to 30 open receivables:

2. Quantified comparison: Manual vs Flow vs Net Terms Engine vs ERP

Before building custom automation or selecting a dedicated app, evaluate the four operational approaches across real wholesale finance metrics: typical Days Sales Outstanding (DSO) on Net 30 terms, 60-day cash collection rate, automated credit hold enforcement, partial-payment accuracy, and total monthly software plus operator cost.

Dunning architecture Typical Net 30 DSO 60-day collection rate Automated credit hold Webhook stop & partial balance Monthly cost (software + ops)
Manual Shopify Admin + spreadsheets 46 to 58 days 74% to 82% None (manual order review) Manual check before each email 0 USD app + 6 to 10 h/mo ops (300 to 500 EUR hidden cost)
Shopify Flow + basic notifications 39 to 46 days 83% to 88% Tag only (does not block checkout) Weak on partial wires and multi-schedule splits 0 USD app + 2 to 4 h/mo ops maintenance
Dedicated Net Terms & B2B AR Engine (Non-Plus) 31 to 35 days 94% to 97% Yes (atomic SQL block at Cart App Block / App Proxy) Live balanceDue guard + orders/paid instant stop 0 to 119 USD/mo (Free up to 3 accounts, Pro tiers)
Shopify Plus + External ERP Connector (NetSuite / Odoo / Sage) 30 to 34 days 95% to 98% Yes (via B2B Companies + ERP sync lag) Yes, subject to ERP batch sync interval 2,300+ USD/mo Shopify Plus + 500 to 1,500 USD/mo ERP middleware

Notice the decisive gap in total cost of ownership. Moving from manual follow-up to a stateful GraphQL dunning loop cuts 11 to 20 days off average DSO on a 50,000 EUR monthly wholesale book, freeing 18,000 to 33,000 EUR in working capital without paying 27,600 USD per year for Shopify Plus.

3. Querying overdue paymentSchedules and sending invoices via GraphQL

In Shopify Admin GraphQL API 2025-10 and 2026-01, payment-term schedules live on the Order.paymentTerms object and require the read_orders and read_payment_terms OAuth access scopes (plus write_orders for tagging and write_payment_terms if your app updates due dates). Because overdue is not a valid keyword inside orders(query:), always filter on financial_status:pending OR financial_status:partially_paid, paginate with cursors, and inspect paymentTerms.overdue alongside each node inside the paymentSchedules Relay connection.

Starting in API version 2025-10, Shopify introduced balanceDue, totalBalance, and the boolean due field on PaymentSchedule while deprecating the legacy scalar amount field. Using balanceDue ensures partial wires are reflected accurately:

GraphQL (Shopify Admin API 2025-10 / 2026-01)Paginated query for open and overdue B2B paymentSchedules
query ListOpenNetTermsOrders($cursor: String) {
  orders(
    first: 50
    after: $cursor
    sortKey: CREATED_AT
    reverse: false
    query: "status:open AND (financial_status:pending OR financial_status:partially_paid)"
  ) {
    pageInfo {
      hasNextPage
      endCursor
    }
    nodes {
      id
      name
      poNumber
      createdAt
      displayFinancialStatus
      tags
      email
      customer {
        id
        displayName
        email
      }
      totalOutstandingSet {
        shopMoney {
          amount
          currencyCode
        }
      }
      paymentTerms {
        id
        overdue
        nextDueAt
        paymentTermsName
        paymentSchedules(first: 10) {
          nodes {
            id
            due
            dueAt
            issuedAt
            completedAt
            balanceDue {
              amount
              currencyCode
            }
            totalBalance {
              amount
              currencyCode
            }
          }
        }
      }
    }
  }
}

Sending invoice reminders via orderInvoiceSend vs draftOrderInvoiceSend

Shopify exposes two distinct invoice-dispatch mutations that both accept the shared EmailInput structure (to, from, bcc, subject, customMessage):

GraphQL (Shopify Admin API 2025-10 / 2026-01)Dispatching a payment reminder via orderInvoiceSend and stamping audit tags via orderUpdate
mutation SendOverdueOrderInvoice($orderId: ID!, $email: EmailInput) {
  orderInvoiceSend(id: $orderId, email: $email) {
    order {
      id
      name
      totalOutstandingSet {
        shopMoney {
          amount
          currencyCode
        }
      }
    }
    userErrors {
      field
      message
      code
    }
  }
}

mutation StampDunningTag($input: OrderInput!) {
  orderUpdate(input: $input) {
    order {
      id
      tags
      note
    }
    userErrors {
      field
      message
    }
  }
}

Critical EmailInput constraint in production: Both from and bcc inside EmailInput must match active store or staff account emails registered in Shopify Admin. Passing an external accounting mailbox or unverified alias causes Shopify to reject or drop the delivery. Furthermore, orderUpdate replaces the entire tags array if you pass tags directly, so always merge existing tags (or use the dedicated tagsAdd mutation) to avoid wiping fulfillment or ERP tags.

4. Designing a D-5 to D+21 B2B dunning cadence and credit hold matrix

Effective B2B collections separate forgetful accounts-payable queues from true insolvency risk. Sending an aggressive legal notice one day after due date alienates reliable buyers whose weekly payment run falls on Thursday, while waiting 30 days past due cuts recovery odds sharply. In production across European and North American wholesale merchants, a five-stage cadence tied to calendar days around PaymentSchedule.dueAt delivers the highest collection velocity with the lowest friction:

Stage code Trigger offset Channel & recipients Tone & mandatory attachments Automated system action
PRE_DUE_D5 5 days before dueAt Buyer email + AP email (if stored) Courteous heads-up with PDF invoice, PO number, IBAN/BIC or payment link Log event; no tag escalation; no credit restriction
DUE_D1 1 business day after dueAt Buyer email + AP email Neutral check-in assuming bank transfer is in transit; quote exact balanceDue Add tag dunning:d1; flag in daily AR digest
OVERDUE_D7 7 days after dueAt Buyer + AP + CC merchant finance Firm overdue notice with ageing summary, PO reference, and 5-day settlement window Add tag dunning:d7; increment overdue_invoice_count
WARNING_D15 15 days after dueAt Buyer + AP + sales rep alert Pre-suspension warning citing contractual late-payment terms and EU 40 EUR recovery fee (if applicable) Add tag dunning:d15; prepare automated credit hold
HOLD_D21 21 days after dueAt Finance director + human phone call task Formal suspension notice; no further automated emails (hand off to human AR owner) Set is_blocked = TRUE in credit ledger; add tag b2b:credit-hold

Stop automated emailing after HOLD_D21. Once an invoice is three weeks overdue, a sixth automated template rarely moves the needle; a two-minute phone call from an account manager or finance operator resolves missing PO approvals, disputed quantities, or payment-plan requests far faster than robotic follow-ups.

5. Idempotent SQL ledger, live balance guard, and Python worker

Never track dunning state solely with Shopify order tags. Tags are eventually consistent in search indexes, easily edited by staff, and cannot enforce database-level uniqueness across concurrent worker replicas. Maintain a dedicated PostgreSQL or SQLite dunning ledger keyed on (shop_domain, order_gid, schedule_gid, step_code) so every installment of a split payment schedule (for example 30% deposit + 70% Net 30) is tracked cleanly and never double-emailed:

SQL (PostgreSQL)Idempotent dunning ledger and buyer credit-hold table
CREATE TABLE b2b_dunning_events (
  id                BIGSERIAL PRIMARY KEY,
  shop_domain       TEXT NOT NULL,
  order_gid         TEXT NOT NULL,
  schedule_gid      TEXT NOT NULL,
  step_code         TEXT NOT NULL,
  balance_cents     BIGINT NOT NULL,
  currency_code     TEXT NOT NULL,
  channel           TEXT NOT NULL,
  status            TEXT NOT NULL DEFAULT 'PENDING',
  provider_msg_id   TEXT,
  sent_at           TIMESTAMPTZ,
  created_at        TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  UNIQUE (shop_domain, order_gid, schedule_gid, step_code)
);

CREATE TABLE b2b_credit_accounts (
  shop_domain           TEXT NOT NULL,
  shopify_customer_id   TEXT NOT NULL,
  credit_limit_cents    BIGINT NOT NULL,
  reserved_cents        BIGINT NOT NULL DEFAULT 0,
  overdue_invoice_count INTEGER NOT NULL DEFAULT 0,
  is_blocked            BOOLEAN NOT NULL DEFAULT FALSE,
  manual_hold           BOOLEAN NOT NULL DEFAULT FALSE,
  dispute_hold_orders   JSONB NOT NULL DEFAULT '[]'::jsonb,
  updated_at            TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  PRIMARY KEY (shop_domain, shopify_customer_id)
);

Before dispatching any scheduled reminder, the worker performs four deterministic checks: (1) verify the order is not inside dispute_hold_orders, (2) reserve the idempotency row with INSERT ... ON CONFLICT DO NOTHING, (3) execute a live single-order GraphQL query to confirm balanceDue > 0 and completedAt IS NULL right before sending, and (4) update the row to SENT or CANCELLED_PAID so your audit trail stays complete for month-end reviews:

Python 3.12 (httpx + PostgreSQL)Daily dunning worker with live balance re-verification and grace-period logic
from datetime import datetime, timezone
from decimal import Decimal

CADENCE_DAYS = [
    ("PRE_DUE_D5", -5),
    ("DUE_D1", 1),
    ("OVERDUE_D7", 7),
    ("WARNING_D15", 15),
    ("HOLD_D21", 21),
]

def select_due_step(due_at_iso: str, now_utc: datetime) -> str | None:
    due_dt = datetime.fromisoformat(due_at_iso.replace("Z", "+00:00"))
    delta_days = (now_utc.date() - due_dt.date()).days
    matched = None
    for step_code, threshold in CADENCE_DAYS:
        if delta_days >= threshold:
            matched = step_code
    return matched

def process_schedule(db, shopify_client, shop: str, order: dict, schedule: dict) -> str:
    if schedule.get("completedAt"):
        return "SKIP_COMPLETED"

    balance = Decimal(schedule["balanceDue"]["amount"])
    if balance <= Decimal("0"):
        return "SKIP_ZERO_BALANCE"

    step_code = select_due_step(schedule["dueAt"], datetime.now(timezone.utc))
    if not step_code:
        return "SKIP_NOT_YET_DUE"

    if db.is_order_disputed(shop, order["id"]):
        return "SKIP_DISPUTE_HOLD"

    # Claim idempotency slot before touching external SMTP or Shopify API
    claimed = db.claim_dunning_slot(
        shop_domain=shop,
        order_gid=order["id"],
        schedule_gid=schedule["id"],
        step_code=step_code,
        balance_cents=int(balance * 100),
        currency_code=schedule["balanceDue"]["currencyCode"],
    )
    if not claimed:
        return "SKIP_ALREADY_SENT"

    # Live pre-send guard: re-fetch order balance to prevent racing a fresh wire
    live_order = shopify_client.get_order_payment_state(order["id"])
    live_outstanding = Decimal(live_order["totalOutstandingSet"]["shopMoney"]["amount"])
    if live_order["displayFinancialStatus"] == "PAID" or live_outstanding <= Decimal("0"):
        db.mark_dunning_status(shop, order["id"], schedule["id"], step_code, "CANCELLED_PAID")
        return "CANCELLED_LIVE_PAID"

    if step_code == "HOLD_D21":
        db.apply_automated_credit_hold(shop, order["customer"]["id"])

    msg_id = shopify_client.send_dunning_notice(
        order=live_order,
        schedule=schedule,
        step_code=step_code,
        outstanding=live_outstanding,
    )
    db.mark_dunning_status(shop, order["id"], schedule["id"], step_code, "SENT", msg_id)
    return f"DISPATCHED_{step_code}"

Notice one subtle edge case in select_due_step: if you onboard a merchant who already has invoices that are 18 days overdue, running this worker naively would jump straight to WARNING_D15 on day one without ever sending a gentle reminder. Add a migration cutoff timestamp (dunning_enrolled_at) or cap first-run escalation at DUE_D1 with a 48-hour cooldown between stages so legacy overdue buyers receive a respectful progression.

6. Real-time webhooks, partial payments, and automatic credit-hold release

Polling alone creates a dangerous blind spot between cron runs. Wire three Shopify webhooks via webhookSubscriptionCreate so your dunning engine and buyer credit ledger react in real time when cash clears:

GraphQL (Shopify Admin API) + SQLRegistering real-time payment webhooks and safely releasing automated credit holds
mutation RegisterPaymentWebhooks($paidUrl: URL!, $txUrl: URL!) {
  paidSub: webhookSubscriptionCreate(
    topic: ORDERS_PAID
    webhookSubscription: { callbackUrl: $paidUrl, format: JSON }
  ) {
    webhookSubscription { id topic }
    userErrors { field message }
  }
  txSub: webhookSubscriptionCreate(
    topic: ORDER_TRANSACTIONS_CREATE
    webhookSubscription: { callbackUrl: $txUrl, format: JSON }
  ) {
    webhookSubscription { id topic }
    userErrors { field message }
  }
}

-- Atomic credit-hold release inside the orders/paid webhook handler:
BEGIN;

-- 1. Deduplicate X-Shopify-Webhook-Id first (Shopify delivers at-least-once)
INSERT INTO processed_shopify_webhooks (webhook_id, topic, shop_domain)
VALUES ($1, 'orders/paid', $2)
ON CONFLICT (webhook_id) DO NOTHING;

-- 2. Recompute open overdue schedules and lift is_blocked ONLY if manual_hold is FALSE
UPDATE b2b_credit_accounts
SET reserved_cents = GREATEST(0, reserved_cents - $paid_order_cents),
    overdue_invoice_count = (
      SELECT COUNT(*) FROM b2b_invoices
      WHERE shop_domain = $2
        AND shopify_customer_id = $3
        AND status = 'OVERDUE'
    ),
    is_blocked = CASE
      WHEN manual_hold = TRUE THEN TRUE
      ELSE (
        SELECT COUNT(*) > 0 FROM b2b_invoices
        WHERE shop_domain = $2
          AND shopify_customer_id = $3
          AND status = 'OVERDUE'
      )
    END,
    updated_at = NOW()
WHERE shop_domain = $2
  AND shopify_customer_id = $3;

COMMIT;

Separating is_blocked (automated overdue trigger) from manual_hold (finance controller override) prevents a classic production bug where an insolvent buyer pays off one small 250 EUR invoice and accidentally unlocks a 15,000 EUR credit line that the CFO explicitly froze.

7. EU/French statutory recovery rules, disputes, and AP deliverability

Technical automation is only half the battle. In European and French B2B commerce, dunning emails that omit mandatory invoice identifiers or ignore written disputes create legal friction and land in spam folders.

If your store also needs compliant hybrid PDF/A-3B + XML e-invoicing for European B2B buyers, review our Factur-X EN 16931 e-invoicing and 27-state EU VAT guide, or explore our Shopify Net Terms OS 2.0 setup documentation and Eclipse Client Portal for live billing and license management.

8. Frequently asked questions

Does Shopify Basic, Grow, or Advanced send automatic overdue invoice reminders for Net 30/60 orders?

No. Non-Plus Shopify plans let you attach Net 15, Net 30, or Net 60 payment terms to orders and click a manual Send invoice or Send reminder button in Shopify Admin, or build simple triggers in Shopify Flow, but they do not include an escalating multi-step dunning engine with live balance re-checks, partial-payment recalculation, AP CC routing, or automatic credit holds.

Why can you not filter directly by overdue status in the Shopify GraphQL orders query?

While the Shopify Admin UI displays a Due or Overdue payment filter, the GraphQL Admin API orders(query:) filter does not expose an overdue search keyword. Instead, query orders with financial_status:pending OR financial_status:partially_paid, request paymentTerms { overdue nextDueAt paymentSchedules(first: 10) { nodes { id due dueAt completedAt balanceDue { amount currencyCode } } } }, and evaluate schedule due dates against your grace period in backend code.

What is the difference between orderInvoiceSend and draftOrderInvoiceSend in Shopify Admin GraphQL?

draftOrderInvoiceSend sends a payment link for an uncompleted DraftOrder before inventory is committed or an Order ID exists. Once a B2B purchase order is converted via draftOrderComplete into a live payment-pending Order, you must use orderInvoiceSend(id: $orderId, email: $email). Note that orderInvoiceSend returns ORDER_INVOICE_SEND_UNSUCCESSFUL if the order has zero outstanding balance, and its from and bcc fields must match verified store or staff emails.

How do you prevent duplicate dunning emails or reminders sent right after a bank transfer clears?

Combine two technical controls. First, store every sent stage in a relational ledger with a UNIQUE constraint on (shop_domain, order_gid, schedule_gid, step_code) so cron retries never double-send. Second, execute a live GraphQL balance check right before dispatch and subscribe to orders/paid and order_transactions/create webhooks so reconciled transfers cancel queued reminders within seconds.

How should automated B2B dunning handle partial SEPA or ACH wire payments?

When an accounts-payable team pays half an invoice or deducts a disputed line item, Shopify transitions the order to PARTIALLY_PAID and updates totalOutstandingSet and PaymentSchedule.balanceDue. Never silence dunning on partial payment and never keep quoting the original gross invoice total. Subscribe to order_transactions/create, refresh balanceDue, and send reminders strictly for the remaining net balance unless a formal dispute_hold flag is set.

Does marking a bank transfer paid via orderMarkAsPaid automatically lift a B2B buyer credit hold?

Yes, if your webhook worker is wired properly. Calling orderMarkAsPaid creates a successful payment transaction in Shopify, which fires the orders/paid webhook. Your webhook handler verifies X-Shopify-Hmac-Sha256, deduplicates X-Shopify-Webhook-Id, decrements the buyer's overdue_invoice_count in an atomic SQL transaction, and lifts the automated credit hold only when overdue_invoice_count reaches zero and no manual finance freeze is active.

Automate Shopify B2B dunning and credit holds without Shopify Plus

Skip building and maintaining the GraphQL schedule poller, idempotent SQL ledger, HMAC webhook handlers, PDF invoice generator, and automatic credit-hold engine from scratch. Eclipse Net Terms & PO brings Net 15/30/60 terms, atomic buyer credit limits, escalating dunning reminders, and 18-column FEC accounting exports to Shopify Basic, Grow, and Advanced stores (Free tier up to 3 B2B accounts).