Skip to content

docs: add receipts guide for payouts & B2B#570

Merged
pengying merged 3 commits into
mainfrom
06-10-docs_add_receipts_guide_for_payouts_b2b
Jun 12, 2026
Merged

docs: add receipts guide for payouts & B2B#570
pengying merged 3 commits into
mainfrom
06-10-docs_add_receipts_guide_for_payouts_b2b

Conversation

@pengying

@pengying pengying commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds developer-facing documentation educating platforms on sending receipts to their customers. Receipts are required for regulatory compliance on every completed transaction where Lightspark Payments, LLC is the licensed money transmitter.

Based on the Grid: Receipts PRD.

What's included

  • New snippet mintlify/snippets/receipts.mdx and page mintlify/payouts-and-b2b/payment-flow/receipts.mdx (in the Sending payments group, after List transactions).
  • When to send: trigger off OUTGOING_PAYMENT.COMPLETED / INCOMING_PAYMENT.COMPLETED; only completed transactions; freeze issued receipts.
  • Required content: Lightspark regulatory disclosures (entity, NMLS 2429193, address, phone, fraud-reporting + nondelivery-liability language) plus data-driven transaction fields.
  • Data mapping: table mapping the Grid transaction object (sentAmount, receivedAmount, fees, exchangeRate, reconciliationInstructions, etc.) to each receipt field.
  • Example: webhook-triggered handler that assembles fields and sends a receipt.
  • Sample receipt layout matching the PRD template.
  • Confirm delivery: links to and documents the confirmReceiptDelivery endpoint.

Verification

  • make lint → Redocly bundle + lint pass (no OpenAPI changes; pre-existing card-webhook warnings only). The spectral step fails due to a pre-existing tooling issue unrelated to this change.
  • docs.json validated as JSON; API-reference link targets (confirmReceiptDelivery, getTransactionById) confirmed present in the spec.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jun 12, 2026 12:36am

Request Review

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pengying pengying marked this pull request as ready for review June 10, 2026 16:26
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a new developer-facing Receipts guide to the Payouts & B2B section, explaining that platforms using Grid's money-transmitter licenses must send a compliant receipt to their customer after every completed transaction.

  • New snippets/receipts.mdx contains a rendered sample receipt component, regulatory-disclosure tables, a field-mapping table, and a JS webhook handler example; a new page wrapper (payouts-and-b2b/payment-flow/receipts.mdx) and a docs.json navigation entry wire it into the docs site.
  • The cURL confirm-delivery example is correct (-u flag with shell variable expansion); however, the JS example still has several gaps — undefined helper functions, missing error handling, and IncomingTransaction fields referenced on an object that doesn't carry them — that have been flagged in prior review rounds and remain open.
  • A new finding in this round: the verbatim fraud-reporting disclosure differs between the mapping table ("customer services") and the rendered receipt component ("customer service"), a mismatch that could lead platforms to emit non-compliant text on legally-required receipts.

Confidence Score: 3/5

The guide has an unresolved verbatim mismatch in a mandatory legal disclosure, plus several previously-flagged gaps in the JS code example that would cause runtime errors or produce non-compliant receipt content on the INCOMING payment path.

The fraud-reporting text in the regulatory disclosures table ("customer services") contradicts the wording in the rendered receipt component ("customer service"). Because this is a required verbatim disclosure, both instances must be identical — and one of them is wrong. Combined with the remaining open issues from earlier rounds (undefined confirmReceiptDelivery, tx.sentAmount crash on incoming payments, raw tx.fees integer bypassing the formatter, missing Total derivation, and no error handling), the snippet has multiple correctness problems on a compliance-critical document. The navigation and page-wrapper changes are clean.

mintlify/snippets/receipts.mdx — the JS webhook example and the regulatory disclosure tables both need attention before this guide is published.

Important Files Changed

Filename Overview
mintlify/snippets/receipts.mdx New receipts snippet with sample receipt component, regulatory disclosure tables, field-mapping table, and a JS webhook handler example — several pre-existing issues in the example code (undefined function references, missing type coercions, incoming-payment field gaps) plus a new verbatim disclosure mismatch between the table and the rendered component.
mintlify/payouts-and-b2b/payment-flow/receipts.mdx Thin wrapper page that imports the receipts snippet; frontmatter is complete and correct.
mintlify/docs.json Adds the new receipts page to the navigation in the correct position (after list-transactions, before reconciliation).

Sequence Diagram

sequenceDiagram
    participant Grid
    participant Platform as Platform Webhook Handler
    participant Customer
    participant GridAPI as Grid API

    Grid->>Platform: "POST /webhooks/grid<br/>OUTGOING_PAYMENT.COMPLETED<br/>or INCOMING_PAYMENT.COMPLETED"
    Platform->>Platform: Verify X-Grid-Signature
    Platform->>Platform: "Assemble receipt fields<br/>(regulatory disclosures + tx data)"
    Platform->>Customer: "Send receipt<br/>(email / in-app / PDF)"
    Platform->>GridAPI: "POST /transactions/{id}/confirm<br/>{ receiptDeliveryConfirmedAt }"
    GridAPI-->>Platform: 200 OK
    Platform-->>Grid: "200 { received: true }"
Loading

Reviews (13): Last reviewed commit: "docs: use UUID for sample receipt transa..." | Re-trigger Greptile

Comment thread mintlify/snippets/receipts.mdx
Comment thread mintlify/snippets/receipts.mdx
Comment thread mintlify/snippets/receipts.mdx Outdated
Comment thread mintlify/snippets/receipts.mdx Outdated
Comment thread mintlify/snippets/receipts.mdx
@pengying pengying force-pushed the 06-10-docs_add_receipts_guide_for_payouts_b2b branch from a4a9dcb to 949601d Compare June 11, 2026 21:15
Comment thread mintlify/snippets/receipts.mdx
Comment thread mintlify/snippets/receipts.mdx
Peng Ying and others added 2 commits June 11, 2026 16:11
Add developer-facing documentation explaining that platforms must send a
compliant receipt to their customer for every completed transaction where
Lightspark Payments, LLC is the licensed money transmitter.

Covers when to send (OUTGOING/INCOMING_PAYMENT.COMPLETED), required content
(Lightspark regulatory disclosures + data-driven transaction fields), mapping
Grid transaction data to receipt fields, a webhook-triggered example, the
sample receipt layout, and confirming delivery via the confirmReceiptDelivery
endpoint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pengying pengying merged commit facda85 into main Jun 12, 2026
10 checks passed
@pengying pengying deleted the 06-10-docs_add_receipts_guide_for_payouts_b2b branch June 12, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants