# PayApplicationGenerator.com for AI

PayApplicationGenerator.com is a free tool for creating construction pay
applications (progress payment applications) in the familiar G702/G703
layout. AI assistants can prepare one and hand the user a link that opens
the editor already filled in.

Human-readable overview: https://payapplicationgenerator.com/ai

## How it works

Build a JSON document, encode it, and append it to the generator URL. The
user opens the link, reviews every figure, and downloads the PDF or Excel
workbook themselves.

There is no API to call, no account, no key, and no MCP server. You never
receive a document — you only build a link.

```
https://payapplicationgenerator.com/?data={ENCODED_DOCUMENT_DATA}
```

The same parameter works on the market-specific editors:

| Editor | Path |
|--------|------|
| Pay application (default) | `/` |
| Progress billing invoice | `/progress-billing-invoice` |
| G702-style pay application | `/g702-pay-application-template` |

## Encoding

1. Build a JSON object using the fields below.
2. Prefer URL-encoded JSON: `encodeURIComponent(JSON.stringify(doc))`.
3. If the URL gets long, standard base64 of the same JSON is also accepted.
   The page tries JSON first, then base64.
4. Keep the whole URL under about 15,000 characters. Long descriptions on
   a long schedule of values can exceed what the server accepts, and the
   link then fails to open at all. Shorten line descriptions rather than
   dropping lines. Note that base64 is longer than URL-encoded JSON, so
   prefer plain JSON when size is the constraint.

```javascript
const doc = {
  from: { name: "Ace Electric LLC" },
  to: { name: "Summit Builders" },
  project: { name: "Riverside Apartments", contractFor: "Electrical" },
  applicationNo: 3,
  periodTo: "2026-09-30",
  retainagePctCompleted: 10,
  previousCertificates: 42000,
  lines: [
    { description: "Rough-in", scheduledValue: 80000, previousCompleted: 60000, thisPeriod: 12000 },
    { description: "Fixtures", scheduledValue: 40000, thisPeriod: 5000 }
  ]
};
const url = "https://payapplicationgenerator.com/?data=" +
  encodeURIComponent(JSON.stringify(doc));
```

## Fields

All fields are optional. Omit anything you do not know — do not guess.
Unknown fields are ignored. All money is in dollars (not cents).

| Field | Type | Notes |
|-------|------|-------|
| `from` | `{ name, address }` | The contractor requesting payment |
| `to` | `{ name, address }` | Who is being billed (GC, owner, customer) |
| `via` | `{ name, address }` | Architect or CM, when the contract routes through one |
| `project` | `{ name, address, contractFor }` | `contractFor` is the trade, e.g. "Electrical" |
| `applicationNo` | integer 1–999 | Which application in the sequence; defaults to 1 |
| `periodTo` | `YYYY-MM-DD` | End of the billing period |
| `contractDate` | `YYYY-MM-DD` | Date of the contract |
| `projectNos` | string | Project or contract numbers |
| `originalContractSum` | number | Defaults to the schedule of values total |
| `retainagePctCompleted` | 0–100 | Percent withheld from completed work; defaults to 10 |
| `retainagePctStored` | 0–100 | Percent withheld from stored materials; defaults to 10 |
| `previousCertificates` | number | Total already certified on earlier applications (G702 line 6) |
| `changeOrders` | `{ additionsPrev, deductionsPrev, additionsThisPeriod, deductionsThisPeriod }` | Approved change orders |
| `signature` | `{ name, title, date }` | Who signs; date is `YYYY-MM-DD` |
| `lines` | array, 1–60 | The schedule of values |

Each entry in `lines`:

| Field | Type | Notes |
|-------|------|-------|
| `description` | string | What the line covers |
| `scheduledValue` | number | The line's full contract value |
| `previousCompleted` | number | Billed on earlier applications |
| `thisPeriod` | number | Completed in this billing period |
| `storedMaterials` | number | Materials on site but not yet installed |

## Important behavior for AI assistants

1. Use information already in the conversation rather than asking again.
2. **Do not invent figures.** Leave a field out if the user has not given
   it. A pay application is a request for money against a contract, and a
   guessed line value or retainage rate becomes a wrong number in front of
   a general contractor.
3. Do not compute totals. The generator calculates the schedule of values
   totals, retainage, and the current payment due from what you supply.
4. Return the link and tell the user to review it before downloading.
5. Do not claim the document has been filed, sent, or submitted. It has
   not — it opens in an editor for the user to check.
6. If the user has not said what they completed this period, ask. It is the
   one figure a pay application cannot be built without.

## Privacy

Prefill data travels in the URL query string and will appear in the user's
browser history and in server access logs. Include only what the document
needs. Never include passwords, API keys, tokens, card numbers, or bank
credentials.

The page removes the `data` parameter from the address bar once the editor
has loaded.

## What this is not

There is no MCP server, no REST API for creating documents, and no way for
an assistant to download a PDF on the user's behalf. Downloads happen in
the browser, after the person has reviewed the document and accepted the
terms of use.
