Uh oh!
There was an error while loading. Please reload this page.
docs(review): address Greptile review feedback across the stack - #96
Conversation
Greptile SummaryThis PR applies 16 of 18 Greptile review items from PRs #88–95, covering credential naming (
Confidence Score: 4/5Safe to merge after fixing the webhook signature example in getting-started.mdx. The Getting Started webhook snippet now uses express.json() to parse the body, then computes an HMAC over JSON.stringify(req.body). Because the webhook provider signs raw bytes, the re-serialized form will not match and every webhook delivery will return 401. The correct pattern — shown in programmatic-payment-links.mdx — uses express.raw() so the raw bytes are hashed directly. All other changes in this PR (credential renames, component upgrades, timingSafeEqual fix, crosschain publicClient, nav dedup) are accurate and well-executed. api-setup/getting-started.mdx — the webhook handler body-parsing middleware conflicts with its own HMAC verification logic. Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant GS as getting-started.mdx
participant PPL as programmatic-payment-links.mdx
participant WH as Webhook Handler
Dev->>GS: Copy webhook snippet
GS->>WH: app.use(express.json()) — body parsed as object
WH->>WH: JSON.stringify(req.body) HMAC re-serialized bytes
WH-->>Dev: Signature mismatch (401)
Dev->>PPL: Copy webhook snippet
PPL->>WH: "express.raw({ type: application/json }) — raw bytes preserved"
WH->>WH: createHmac.update(req.body) HMAC raw bytes
WH-->>Dev: Signature matches (200)
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bundles two passes of Greptile feedback: (A) PR #96 follow-up — the fixes PR itself attracted two new comments: - use-cases/programmatic-payment-links.mdx: cURL language tag bash → curl - RN_API_KEY → RN_CLIENT_ID and X-Api-Key → x-client-id renamed across api-setup/integration-tutorial.mdx, api-setup/getting-started.mdx, api-features/create-requests.mdx for stack-wide consistency. Zero RN_API_KEY / X-Api-Key references remain. (B) Older PRs (51-87) — 23 still-applicable comments out of 51 total. The other 28 are stale (resolved by the revamp rewriting or removing the relevant sections/files); those will be resolved on GitHub with a note explaining staleness. PR #53 — getting-started.mdx - Added Express setup (express + app.use(express.json())) before the webhook handler example so the snippet is runnable. PR #54 — integration-tutorial.mdx - Added missing `import { eq } from 'drizzle-orm';`. - Fixed spelling "succesfully" → "successfully". PR #55 — create-requests.mdx - v2 pay endpoint takes requestId, not paymentReference (mermaid + code sample updated to `${requestId}/pay`). PR #56 + #87 — crosschain-payments.mdx - Boundary wording: "under \$1" → "of \$1 or less" to align with the "greater than 1 USD" half of the sentence. - viem snippet now imports createPublicClient + http and instantiates publicClient so `publicClient.waitForTransactionReceipt(...)` works. PR #57 — batch-payments.mdx - Code samples now use x-client-id (consistent with rest of docs), dropped legacy x-platform-id, added `if (!response.ok)` error handling on both examples. PR #59 — crypto-to-fiat-payments.mdx - "I**mportant:" → "**Important:" - mermaid: {payerId} → {clientUserId} (twice). - Endpoint paths: /payer → /v2/payer for consistency. - mermaid: declared "Payee Bank" as a participant (was used but never declared, breaking the diagram). PR #66 — query-payments.mdx - Frontmatter description: /payments → /v2/payments. PR #67 — platform-fees.mdx - Clarified query- vs body-param scope: GET /v2/request/{id}/pay uses query params; POST /v2/payouts and /payouts/batch use body params. PR #68 — protocol-fees.mdx - Grammar: "protocol fees applies" → "protocol fee applies". - Typo: "simple reduce" → "simply reduce". - Math: payee receives 999.50 USDC (not 999.95). Added intermediate invoice/fee lines for transparency. PR #77 — faq.mdx - On-ramp question now explicitly answered: "Fiat-to-crypto (on-ramp) payments are not currently supported by the API." PR #86 — payouts.mdx - "ERC-712" → "EIP-712" (correct EIP designation). PR #86 — api-reference/secure-payments.mdx - expiresAt example: 15 minutes → 7 days, matching the documented default expiry. PR #87 — payouts.mdx - Added "500" row to error-handling table. mintlify broken-links: zero.
Uh oh!
There was an error while loading. Please reload this page.
MantisClone
left a comment
There was a problem hiding this comment.
Reviewed the cumulative 40-PR stack against 6 source repos (request-api, request-auth-api, request-secure-payment, request-dashboard, request-token-list, request-infrastructure) plus the live preview at requestnetwork-docs-revamp-greptile-fixes.mintlify.app.
Two must-fix items below. Non-blocking observations will be filed as separate issues after deploy.
Must-fix #1 — SIWE example doesn't match server output
File: api-reference/wallet-authentication.mdx:35 (not in this PR's specific diff, so flagging here instead of inline)
The current message example shows a Chain ID: 1 line, omits an Expiration Time: line, and is missing the period after Sign in to Request Network. The actual server template at request-auth-api/src/auth/auth.service.ts:187-196 emits no Chain ID, always emits Expiration Time: (5 min after Issued At), and ends Sign in to Request Network. with a period.
Three edits:
- Drop the
Chain ID: 1line - Add
Expiration Time: <iso8601>(5 minutes afterIssued At) - Add the period:
Sign in to Request Network.
Corrected example:
auth.request.network wants you to sign in with your Ethereum account:
0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7
Sign in to Request Network.
URI: https://auth.request.network
Version: 1
Nonce: a1b2c3d4e5f6
Issued At: 2026-03-15T10:00:00.000Z
Expiration Time: 2026-03-15T10:05:00.000Z
Why it matters: signature verification is byte-exact. Anyone typing the example verbatim to test will get Invalid challenge and have no way to figure out why.
Must-fix #2 — Client ID Generation flow doesn't match Dashboard UI
See inline comment on api-setup/getting-started.mdx.
Already handled
- bassgeta's CHANGES_REQUESTED on #54 has been dismissed
- Code Sandbox link drop on
api-setup/integration-tutorial.mdx:8is in Rodrigo's queue (theworkspaceIdquery parameter is user-scoped, so the link doesn't work for any non-author reader)
Uh oh!
There was an error while loading. Please reload this page.
Merge activity
|
Applies 16 of 18 Greptile review comments from PRs #88-95. Skipped: - PR #88 forward-links comment (resolved by Phase B in #90 — pages now exist) - PR #91 lockfile exclusion (P2 opinion; team has chosen to gitignore) PR #88 - getting-started.mdx: replaced the "API Key Generation" steps with the Client ID flow on the Dashboard. PR #89 - secure-payment-supported-networks-and-currencies.mdx: qualified the cross-chain note — Tron payments are same-chain; Li.Fi swap-to-pay is EVM-source only. - release-notes/request-api.mdx: distinguished the four "2026-Q1" Update blocks with topical sub-labels (Payouts, Tron, Accounting, Calldata). PR #90 - docs.json: removed the duplicate tools/dashboard entry from the API Setup group. The Tools group in Resources is the canonical home. - programmatic-payment-links.mdx: TS/Python/cURL switched from <Tabs> to <CodeGroup> per AGENTS.md style. Other Tabs blocks (EVM-vs-Tron variants) stay as Tabs since they are alternative content. - programmatic-payment-links.mdx: fixed the timingSafeEqual signature check to compare decoded buffer lengths instead of raw hex string lengths. PR #91 - package.json: dropped @playwright/test (only `playwright` is used). - scripts/capture-screenshots.ts: switched waitUntil from "networkidle" to "load". Vite HMR keeps a persistent WebSocket open so networkidle always timed out against dev servers. PR #92 - integration-tutorial.mdx: changed the webhook-section .env placeholder from <YOUR_API_KEY> to <YOUR_CLIENT_ID> for consistency. PR #93 - secure-payments.mdx: rewrote the redirectUrl description to remove the self-contradiction ("redirected" vs "no auto-redirect"). - programmatic-payment-links.mdx: the "send back to your site" code example now captures the response and uses securePaymentUrl. PR #94 - payee-destinations.mdx: accessPolicy sub-fields restructured from a Markdown table to <Expandable> with nested <ParamField> entries. - compliance-gated-payments.mdx: "How it works" numbered list switched to <Steps> with <Step> components. PR #95 - multi-chain-checkout.mdx: "you decide of the destination" → "you decide on the destination" (grammar). - batch-payouts.mdx: removed the duplicate "hosted" in the Mode 1 description. - welcome.mdx: dropped the SDK framing — the Dashboard and Secure Payment Page are no-code hosted tools, not SDK consumers.
Bundles two passes of Greptile feedback: (A) PR #96 follow-up — the fixes PR itself attracted two new comments: - use-cases/programmatic-payment-links.mdx: cURL language tag bash → curl - RN_API_KEY → RN_CLIENT_ID and X-Api-Key → x-client-id renamed across api-setup/integration-tutorial.mdx, api-setup/getting-started.mdx, api-features/create-requests.mdx for stack-wide consistency. Zero RN_API_KEY / X-Api-Key references remain. (B) Older PRs (51-87) — 23 still-applicable comments out of 51 total. The other 28 are stale (resolved by the revamp rewriting or removing the relevant sections/files); those will be resolved on GitHub with a note explaining staleness. PR #53 — getting-started.mdx - Added Express setup (express + app.use(express.json())) before the webhook handler example so the snippet is runnable. PR #54 — integration-tutorial.mdx - Added missing `import { eq } from 'drizzle-orm';`. - Fixed spelling "succesfully" → "successfully". PR #55 — create-requests.mdx - v2 pay endpoint takes requestId, not paymentReference (mermaid + code sample updated to `${requestId}/pay`). PR #56 + #87 — crosschain-payments.mdx - Boundary wording: "under \$1" → "of \$1 or less" to align with the "greater than 1 USD" half of the sentence. - viem snippet now imports createPublicClient + http and instantiates publicClient so `publicClient.waitForTransactionReceipt(...)` works. PR #57 — batch-payments.mdx - Code samples now use x-client-id (consistent with rest of docs), dropped legacy x-platform-id, added `if (!response.ok)` error handling on both examples. PR #59 — crypto-to-fiat-payments.mdx - "I**mportant:" → "**Important:" - mermaid: {payerId} → {clientUserId} (twice). - Endpoint paths: /payer → /v2/payer for consistency. - mermaid: declared "Payee Bank" as a participant (was used but never declared, breaking the diagram). PR #66 — query-payments.mdx - Frontmatter description: /payments → /v2/payments. PR #67 — platform-fees.mdx - Clarified query- vs body-param scope: GET /v2/request/{id}/pay uses query params; POST /v2/payouts and /payouts/batch use body params. PR #68 — protocol-fees.mdx - Grammar: "protocol fees applies" → "protocol fee applies". - Typo: "simple reduce" → "simply reduce". - Math: payee receives 999.50 USDC (not 999.95). Added intermediate invoice/fee lines for transparency. PR #77 — faq.mdx - On-ramp question now explicitly answered: "Fiat-to-crypto (on-ramp) payments are not currently supported by the API." PR #86 — payouts.mdx - "ERC-712" → "EIP-712" (correct EIP designation). PR #86 — api-reference/secure-payments.mdx - expiresAt example: 15 minutes → 7 days, matching the documented default expiry. PR #87 — payouts.mdx - Added "500" row to error-handling table. mintlify broken-links: zero.
Greptile follow-up on api-features/crypto-to-fiat-payments.mdx:127-129. The earlier fix added the /v2/ prefix to POST /v2/payer but missed the sibling GET and PATCH entries on the next lines — fixed now. All relative /payer/... references on the page use the versioned path.
a3a72c9 to
a7af9e7CompareUh oh!
There was an error while loading. Please reload this page.

Applies 16 of 18 Greptile review comments from PRs #88-95. Skipped:
exist)
PR #88
Client ID flow on the Dashboard.
PR #89
cross-chain note — Tron payments are same-chain; Li.Fi swap-to-pay
is EVM-source only.
Update blocks with topical sub-labels (Payouts, Tron, Accounting,
Calldata).
PR #90
Setup group. The Tools group in Resources is the canonical home.
to per AGENTS.md style. Other Tabs blocks (EVM-vs-Tron
variants) stay as Tabs since they are alternative content.
check to compare decoded buffer lengths instead of raw hex string
lengths.
PR #91
playwrightis used).to "load". Vite HMR keeps a persistent WebSocket open so networkidle
always timed out against dev servers.
PR #92
from <YOUR_API_KEY> to <YOUR_CLIENT_ID> for consistency.
PR #93
the self-contradiction ("redirected" vs "no auto-redirect").
example now captures the response and uses securePaymentUrl.
PR #94
Markdown table to with nested entries.
to with components.
PR #95
"you decide on the destination" (grammar).
description.
Payment Page are no-code hosted tools, not SDK consumers.