Skip to content

docs(cards): add periodic statements guide - #1071

Merged
jaymantri merged 14 commits into
mainfrom
ajay/statements-guide
Sep 24, 2026
Merged

jaymantri merged 14 commits into
mainfrom
ajay/statements-guide

Conversation

@jaymantri

@jaymantri jaymantri commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a reference page for card periodic statements under Cards > Statements. It follows the Receipts page structure: a sample consumer statement, when a statement is sent, what it contains, how each field maps to Grid transaction data, and an example that builds a statement at period close. The page appears in both Cards > Statements and Payouts & B2B > Sending payments (after List transactions); the guide body lives in one shared snippet with a thin wrapper page for each location, like Receipts. Docs only: one snippet, two wrapper MDX files, and two docs.json nav entries.

Preview

https://ramps-ajay-statements-guide.mintlify.app/cards/statements

https://ramps-ajay-statements-guide.mintlify.app/payouts-and-b2b/payment-flow/statements

Screenshot

The page renders the sample statement (period details, opening and closing balance, a six-line ledger with a wire fee line, total fees, the error-resolution notice, and the provider line), then the field tables, the Grid mapping table, and the JavaScript example. Run mint dev on this branch and open /cards/statements to see it.

Review asks

  • Copy and style. The page is written in second person, sentence case, and follows the Receipts page tone.
  • The intro <Info> frames statements as a reference, not as an instruction to the reader. Check that this reads right.

Relation

Companion to #1060 (playground), which is parked as a draft.

Add a reference page for card periodic statements under Cards >
Statements. It shows a sample consumer statement, when a statement is
sent, what it contains, how each field maps to Grid transaction data,
and an example that builds a statement at period close.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Sep 24, 2026, 4:53 PM

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Sep 24, 2026 4:53pm UTC
grid-flow-builder Ignored Ignored Preview Sep 24, 2026 4:53pm UTC
grid-wallet-demo Ignored Ignored Preview Sep 24, 2026 4:53pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The documentation changes appear safe to merge, with no outstanding correctness or repository-rule violations.

Summary

Adds a shared periodic-statements guide for card and payout documentation.

  • Documents statement timing, required fields, disclosures, and Grid data mappings.
  • Provides a sample statement and JavaScript period-close implementation.
  • Adds navigation entries, wrapper pages, and a dedicated statement icon.

Reviews (10) · Last reviewed commit: "docs: give the statements page its own s..."

Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
@jaymantri
jaymantri removed the request for review from patcapulong September 23, 2026 23:09
Only settled card rows and completed payments become statement lines.
Outgoing fees are shown as a separate line inside sentAmount instead of
being added on top. Amounts stay integers until render, query values
are URL-encoded, and the example checks that opening balance plus
lines equals closing balance.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@codex review

@jaymantri

Copy link
Copy Markdown
Contributor Author

@faraday review

@ls-bolt

ls-bolt Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

⚡ Running fastpass on this PR first (https://zeus.dev.dev.sparkinfra.net/#/instance?id=quantum-iridium-bt). A full council convenes only if fastpass assesses the risk at critical or above. Post a new comment '@faraday full review' to convene one anyway.

@ls-bolt

ls-bolt Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

📌 Bolt Status

2026-09-23 23:31:23 UTC — ⚡ Agent quantum-iridium-bt(#1) started
2026-09-23 23:42:02 UTC — ⚡ Agent quantum-iridium-bt-2(#2) started
2026-09-23 23:58:05 UTC — ⚡ Agent agile-quasar(#1) started
2026-09-24 00:03:56 UTC — ⚡ Agent quantum-iridium-bt-3(#3) started
2026-09-24 00:24:27 UTC — ⚡ Agent quantum-iridium-bt-4(#4) started
2026-09-24 00:44:02 UTC — ⚡ Agent quantum-iridium-bt-5(#5) started
2026-09-24 00:48:24 UTC — ⚡ Agent quantum-iridium-bt-6(#6) started
2026-09-24 01:06:33 UTC — ⚡ Agent quantum-iridium-bt-7(#7) started
2026-09-24 01:20:34 UTC — ⚡ Agent quantum-iridium-bt-8(#8) started
2026-09-24 04:29:56 UTC — ⚡ Agent agile-quasar-2(#2) started
2026-09-24 16:51:14 UTC — ⚡ Agent agile-quasar-3(#3) started


Feedback

@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
Comment thread mintlify/cards/statements.mdx Outdated
@lightspark-faraday

lightspark-faraday Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Faraday review

fastpass advisory - comment-only, never blocks a merge. To retire a finding, either fix it or reply explaining why it is wrong: a rebuttal gets an agree or disagree answer on the thread, and if you reply again after a disagreement we concede. Acknowledging it ("will fix") or resolving the thread does not retire it on its own. This comment is edited in place every round; inline findings still post as new comments each round.

⚠ Partial review: quote_verify did not run (quote_verify: all_unchecked); findings below were not quote-checked against the reviewed commit.

Faraday score: 5/5 (converged - nothing blocking open) - 5 nothing blocking open | 4 non-blocking only | 3 one blocking open | 2 two | 1 a P0 or 3+ blocking; never drops without a new blocker

Still open:

  • P2 mintlify/snippets/statements.mdx:142 - Using the full settledAmount for each period repeats earlier card clearings on later statements. · held (outside the round delta) fp:1cdd6ac0
  • P2 mintlify/snippets/statements.mdx:209 - The example sends a statement without saving its contents or making delivery retries idempotent. · held (outside the round delta) fp:97103235

f4f44a728bee | 0 inline + 0 in-body finding(s) (0 new) | 0 suggestion(s) | 0 refuted pre-post | route_deep: false | fail-open: 2 events (top: quote_verify_unchecked)

fastpass re-review: 2 new non-blocking finding(s) outside the round delta held back (delta-scoped); 1 previously dismissed by author. Converged - nothing new that blocks.

🦕 The Brachylophosaurus from this catch is already in @jaymantri's collection (x4): https://zeus.dev.dev.sparkinfra.net/#/dinodex/jaymantri

Round history (5 rounds)
round reviewed (UTC) commit score inline new
1 2026-09-23 23:36 9f8ab8040315 4/5 5 5
2 2026-09-24 00:09 2299f4f7ac74 3/5 0 0
3 2026-09-24 00:30 220d762d343c 5/5 0 0
4 2026-09-24 00:53 b1df3b013f10 3/5 1 1
5 2026-09-24 01:11 f4f44a728bee 5/5 0 0

This summary supersedes the per-round summary blocks on the faraday reviews above; those are left in place as history and are not edited.

Page through the customer's internal accounts instead of reading the
first USD page, and throw when the account is not found. Card rows
become lines only when status is SETTLED or PARTIALLY_SETTLED, so
EXCEPTION rows stay off the statement until reconciled. The statement
object now carries the error-resolution notice with the other fixed
disclosures.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai

@jaymantri

Copy link
Copy Markdown
Contributor Author

@codex review

@jaymantri

Copy link
Copy Markdown
Contributor Author

@faraday review

@ls-bolt

ls-bolt Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

⚡ Running fastpass on this PR first (https://zeus.dev.dev.sparkinfra.net/#/instance?id=quantum-iridium-bt-2). A full council convenes only if fastpass assesses the risk at critical or above. Post a new comment '@faraday full review' to convene one anyway.

Comment thread mintlify/cards/statements.mdx Outdated
@jaymantri

Copy link
Copy Markdown
Contributor Author

@bolt can you run this against the Grid sandbox and reply with the results? Read-only: do not change files on this PR.

The statements guide on this PR infers three API behaviors that I want measured. Use a sandbox-scoped token against https://api.lightspark.com/grid/2025-10-13.

Setup: POST /customers (INDIVIDUAL), then GET /customers/internal-accounts?customerId= and pick the USD account. POST /sandbox/internal-accounts/{accountId}/fund with {"amount":10000}. POST /cards with {customerId, form:"VIRTUAL", fundingSource}.

  1. Date window on GET /transactions?accountIdentifier={id}&startDate=&endDate=. Find the funding row. If createdAt and settledAt differ, query four one-second windows: around createdAt only, around settledAt only, both, neither. Report which windows return the row. If they are equal in sandbox, repeat on the card row after step 2 using createdAt, authorizedAt, and settledAt.

  2. Card rows. POST /sandbox/cards/{id}/simulate/authorization (amount 1250, USD, any merchant descriptor). Poll GET /transactions?cardId= until the type: CARD row appears. Then query GET /transactions with each of accountIdentifier={internal account id}, customerId=, type=CARD, and no filter. Report whether the card row appears under each, and its status, createdAt, authorizedAt, settledAt, authorizedAmount, settledAmount. Then POST /sandbox/cards/{id}/simulate/clearing with {cardTransactionId, amount:1250}, poll to SETTLED, and repeat the same filter diff.

  3. Balances. GET /customers/internal-accounts?customerId= before the authorization, after the authorization, and after the clearing. Report balance and totalBalance at each point.

Please paste the trimmed request/response pairs and a three-line answer table: which timestamp the date window filters on, whether accountIdentifier returns card rows, and which balance field moves on a hold versus on posting.

@ls-bolt ls-bolt Bot added the bolt label Sep 23, 2026
@ls-bolt

ls-bolt Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@jaymantri I can't start the sandbox run yet because my environment has no Grid API credentials. https://api.lightspark.com/grid/2025-10-13/customers returns 401 unauthenticated, and I have no way to read stored secrets.

To unblock it, I need a sandbox-scoped API token pair, GRID_API_TOKEN_ID and GRID_API_CLIENT_SECRET, for a platform where the /sandbox/... simulate routes are enabled. Please don't paste it in this PR, because the repo is public. Send it to my agent session directly instead. I'll keep it in a chmod 600 env file for the run, delete it afterwards, and never echo or post it.

Once I have it, I'll run all three measurements as specified without touching any files on this PR. The three measurements are the date-window diff, the card-row filter diff before and after clearing, and balance/totalBalance at each of the three points. I'll reply here with the trimmed request/response pairs and the three-line answer table.

Reply with a comment if you'd rather run it yourself and have me provide a script instead. Emoji reactions don't notify me on GitHub.

@jaymantri

jaymantri commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

No credentials will be shared for this run; the repo is public and the PR is docs only. Please post the script instead, so the measurements can be run by hand against a sandbox platform. Measured results, if any, will update the page text directly.

@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai

@jaymantri

Copy link
Copy Markdown
Contributor Author

@faraday review

@ls-bolt

ls-bolt Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

⚡ Running fastpass on this PR first (https://zeus.dev.dev.sparkinfra.net/#/instance?id=quantum-iridium-bt-6). A full council convenes only if fastpass assesses the risk at critical or above. Post a new comment '@faraday full review' to convene one anyway.

Comment thread mintlify/snippets/statements.mdx
Point to the platform agreement for cadence, delivery, records, and
disclosure text. Scope the provider lines to every statement, keep the
error-resolution markers on the consumer sample, and note that card rows
are dated by authorization.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai

@jaymantri

Copy link
Copy Markdown
Contributor Author

@faraday review

@ls-bolt

ls-bolt Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

⚡ Running fastpass on this PR first (https://zeus.dev.dev.sparkinfra.net/#/instance?id=quantum-iridium-bt-7). A full council convenes only if fastpass assesses the risk at critical or above. Post a new comment '@faraday full review' to convene one anyway.

Comment thread mintlify/snippets/statements.mdx
Comment thread mintlify/snippets/statements.mdx

@lightspark-faraday lightspark-faraday Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ Partial review: quote_verify did not run (quote_verify: all_unchecked); findings below were not quote-checked against the reviewed commit.

jaymantri and others added 2 commits September 23, 2026 18:20
Restore the provider line wording, keep contact details inside the
error-resolution notice, and stop the flag markers from rendering above
the baseline.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai

@jaymantri

Copy link
Copy Markdown
Contributor Author

@faraday review

@ls-bolt

ls-bolt Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

⚡ Running fastpass on this PR first (https://zeus.dev.dev.sparkinfra.net/#/instance?id=quantum-iridium-bt-8). A full council convenes only if fastpass assesses the risk at critical or above. Post a new comment '@faraday full review' to convene one anyway.

Comment thread mintlify/payouts-and-b2b/payment-flow/statements.mdx Outdated
@ls-bolt

ls-bolt Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Review ledger

Round 1

  1. @pengying: are statements required for any account at Lead, not just cards? → DEFERRED TO AUTHOR: the page is currently scoped to consumer cardholder accounts in mintlify/snippets/statements.mdx intro and both wrapper descriptions; widening scope is @jaymantri's decision (no file changes, PR is read-only for bolt)

Round 2

  1. @pengying: make statements a requirement for all accounts, not just cards → SUGGESTED: the widened intro, both page descriptions, and account-holder wording are posted as suggestions in the thread for @jaymantri to apply. No push, because this PR is read-only for bolt.
  2. @pengying: "What a statement contains" lead reads AI-ish → SUGGESTED: a plainer one-line rewrite is posted as a suggestion in the thread.

@ls-bolt

ls-bolt Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

🦣 Congratulations @pengying - your substantive review earned a Eremotherium! (uncommon)

A huge tropical ground sloth, it ranged from Brazil northward into the southern United States.

View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/pengying?section=ice-age

Comment thread mintlify/snippets/statements.mdx Outdated
Statements apply to every account, consumer or commercial. Describe the
base layout for all accounts and call out the consumer-only items where
they apply. Add the commercial contact line and plain wording for the
two parts of a statement.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

jaymantri commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Sep 24, 5:38 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 24, 5:38 PM UTC: @jaymantri merged this pull request with Graphite.

@jaymantri
jaymantri merged commit db13322 into main Sep 24, 2026
8 checks passed
@jaymantri
jaymantri deleted the ajay/statements-guide branch September 24, 2026 17:38

This branch was successfully deployed

1 active deployment
staging - mintlify — dd9fd0a5 Deployed Sep 24, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants