---
title: Moolah Dynamic Payment Page
slug: dynamic-payment-page
createdAt: 2024-04-12T17:53:54.481Z
---

The dynamic payment page lets you pre-fill and control a patient payment by passing parameters in the query string. The patient completes the card entry and the payment is processed into Crown.

The URL for the dynamic payment page is:

https\://patient.moolah.cc/payment-page/p/\<payment-page-code>

Your \<payment-page-code> can be located in Crown by visiting **Settings > Payment Page**

![](https://api.archbee.com/api/optimize/Es2h8oTIUQE1ZKRiIq3-l/AaUawkXtlv2FeL08l2bil_paymentpage.png)

## Query parameters

| Key           | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `firstName`   | Yes      | The patient's first name. Used to greet the patient on the page. Ignored for the record when a matched `patNum` is supplied (see `patNum`).                                                                                                                                                                                                                                                                                                                        |
| `lastName`    | Yes      | The patient's last name. Ignored for the record when a matched `patNum` is supplied (see `patNum`).                                                                                                                                                                                                                                                                                                                                                                |
| `email`       | Yes      | The patient's email address. The receipt is sent here — unless a matched `patNum` is supplied, in which case the email on file in your PMS is used instead.                                                                                                                                                                                                                                                                                                        |
| `phone`       | Yes      | The patient's phone number as digits only, e.g. `5555555555`. Crown formats it for display — no punctuation, spaces, or URL-encoding needed. Ignored for the record when a matched `patNum` is supplied (see `patNum`).                                                                                                                                                                                                                                            |
| `amount`      | Yes      | The payment amount in dollars, e.g. `33.12`. This is the amount charged to the card.                                                                                                                                                                                                                                                                                                                                                                               |
| `amountFixed` | No       | `true` locks the amount so the patient cannot change it. `false` (default) pre-fills the amount but lets the patient edit it. Use `true` whenever you pass `procedures`.                                                                                                                                                                                                                                                                                           |
| `note`        | No       | A note stored with the payment in Crown.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `patNum`      | No       | The patient number (`PatNum`) from your practice management system. When passed and matched, the payment posts automatically to that patient's ledger, and the patient's **name, email, and phone on file in your PMS become authoritative** — the `firstName`, `lastName`, `email`, and `phone` you pass are ignored (they're only used when no patient is matched). If it is omitted or not found, the payment posts as **Unassociated** in the Crown dashboard. |
| `procedures`  | No       | **Note:** Open Dental only.<br /><br />Allocate the payment across specific Open Dental procedures. Pass a comma-separated list of procedure numbers (numeric `procedurelog.ProcNum`, e.g. `101`) and/or procedure codes (the code shown in Open Dental, e.g. `D1110`) — in any mix, e.g. `101,D1110,102`. Crown spreads the `amount` across them automatically — see **How procedure allocation works** below.                                                    |
| `redirectUrl` | No       | A fully-qualified `https://` URL to send the patient to after a successful payment. On success the URL is appended with `trxId` (transaction ID) and `amt` (amount) — e.g. `https://example.com/thanks?trxId=1234&amt=33.12`.                                                                                                                                                                                                                                      |
| `post`        | No       | Set `post=false` to charge the card **without** posting the payment to your practice management system. The default is `true`.                                                                                                                                                                                                                                                                                                                                     |

## How procedure allocation works (Open Dental)

When you pass `procedures`, the `amount` you send is the total charged to the card. Crown then allocates that amount across the listed procedures for you — you do **not** send a per-procedure amount:

- Procedures are paid **oldest first** (FIFO, by procedure date).
- Each procedure receives up to its **remaining patient balance** — never more than it is owed.
- If the `amount` is **greater** than the combined remaining balance of the listed procedures, the leftover posts as an **Unallocated** payment on the patient's account.
- If the `amount` is **less** than the combined balance, the oldest procedures are paid first; later procedures receive a partial payment or nothing.

Requirements:

- The payment must resolve to a patient — via `patNum`, or via `email` if automatic patient association is enabled for your practice — and `post` must not be `false`. Otherwise the payment records as **Unassociated** and no allocation occurs.
- Each entry is matched to the resolved patient's procedures by procedure number (`procedurelog.ProcNum`) or by procedure code (case-insensitive). A code that matches more than one procedure is paid oldest-first. Entries that don't match a procedure with a remaining balance are skipped.
- Pass `amountFixed=true` so the amount charged matches the amount allocated.

## Examples

Simple fixed-amount payment:

:::BlockQuote
https\://patient.moolah.cc/payment-page/p/moolahpayfac?firstName=John\&lastName=Doe\&email=john\@domain.com\&phone=5555555555\&amount=33.12\&amountFixed=true
:::

Post to a patient's ledger (posts as Unassociated if patNum is not found):

:::BlockQuote
https\://patient.moolah.cc/payment-page/p/moolahpayfac?firstName=John\&lastName=Doe\&email=john\@domain.com\&amount=150.00\&patNum=99999
:::

Allocate a payment across procedures (oldest first):

:::BlockQuote
https\://patient.moolah.cc/payment-page/p/moolahpayfac?firstName=John\&lastName=Doe\&email=john\@domain.com\&amount=250.00\&amountFixed=true\&patNum=99999\&procedures=101,D1110,102
:::

Redirect the patient to your own confirmation page after a successful payment:

:::BlockQuote
https\://patient.moolah.cc/payment-page/p/moolahpayfac?firstName=John\&lastName=Doe\&email=john\@domain.com\&amount=33.12\&amountFixed=true\&redirectUrl=https\://www\.example.com/thank-you
:::

