Skip to content

docs(content): add use-case pages, Dashboard + Secure Payment tools pages#90

Open
rodrigopavezi wants to merge 1 commit intodocs/revamp-refresh-contentfrom
docs/revamp-new-pages
Open

docs(content): add use-case pages, Dashboard + Secure Payment tools pages#90
rodrigopavezi wants to merge 1 commit intodocs/revamp-refresh-contentfrom
docs/revamp-new-pages

Conversation

@rodrigopavezi
Copy link
Copy Markdown
Member

Build out the new Use Cases tab and Tools section around the actual product
surface (Dashboard, Secure Payment, v2 API).

New use-case pages:

  • quickstart.mdx — canonical end-to-end walkthrough adapted from the
    payment-destinations-and-payment-links reference; spine of the tab
  • no-code-payment-links.mdx — Dashboard-only flow for freelancers/SMBs
  • programmatic-payment-links.mdx — server-side flow with TS/Python/cURL
    side-by-side EVM and Tron examples
  • multi-chain-checkout.mdx — Li.Fi cross-chain payer story
  • batch-payouts.mdx — EVM-only mass payouts with worked examples
    (marketplace, refund, payroll) and explicit Tron exclusion
  • webhook-reconciliation.mdx — production-ready handler with HMAC
    verification, idempotency, retry-aware error handling, and event routing
    for all 12 event types
  • welcome.mdx rewritten as a three-card hero (Dashboard / Secure Payment /
    API) with refreshed Get Started cards

New tools/ pages:

  • tools/dashboard.mdx — feature reference for dashboard.request.network
    with EVM and Tron sign-in tabs side by side, destinations, Client IDs,
    Get Paid, Pay
  • tools/secure-payments.mdx — feature reference for pay.request.network
    with payer flow, wallet support (EVM + Tron columns), Li.Fi cross-chain,
    defense-in-depth, error states

docs.json:

  • Added "Use Cases" group with 5 new pages
  • Added "Tools" group in Resources tab
  • Added tools/dashboard to API Setup group

…ages

Build out the new Use Cases tab and Tools section around the actual product
surface (Dashboard, Secure Payment, v2 API).

New use-case pages:
- quickstart.mdx — canonical end-to-end walkthrough adapted from the
  payment-destinations-and-payment-links reference; spine of the tab
- no-code-payment-links.mdx — Dashboard-only flow for freelancers/SMBs
- programmatic-payment-links.mdx — server-side flow with TS/Python/cURL
  side-by-side EVM and Tron examples
- multi-chain-checkout.mdx — Li.Fi cross-chain payer story
- batch-payouts.mdx — EVM-only mass payouts with worked examples
  (marketplace, refund, payroll) and explicit Tron exclusion
- webhook-reconciliation.mdx — production-ready handler with HMAC
  verification, idempotency, retry-aware error handling, and event routing
  for all 12 event types
- welcome.mdx rewritten as a three-card hero (Dashboard / Secure Payment /
  API) with refreshed Get Started cards

New tools/ pages:
- tools/dashboard.mdx — feature reference for dashboard.request.network
  with EVM and Tron sign-in tabs side by side, destinations, Client IDs,
  Get Paid, Pay
- tools/secure-payments.mdx — feature reference for pay.request.network
  with payer flow, wallet support (EVM + Tron columns), Li.Fi cross-chain,
  defense-in-depth, error states

docs.json:
- Added "Use Cases" group with 5 new pages
- Added "Tools" group in Resources tab
- Added tools/dashboard to API Setup group
This was referenced May 8, 2026
Copy link
Copy Markdown
Member Author

rodrigopavezi commented May 8, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 8, 2026

Greptile Summary

This PR adds a full Use Cases tab (quickstart, no-code links, programmatic links, multi-chain checkout, batch payouts, webhook reconciliation) and two new Tools reference pages (Dashboard, Secure Payment), wiring them together with consistent cross-links and a refreshed landing page.

  • docs.json registers all new pages and adds a "\ud83d\udee0\ufe0f Tools" group, but tools/dashboard is listed both in the "API Setup" group and in the new "Tools" group, which will render as two sidebar entries pointing to the same page.
  • use-cases/programmatic-payment-links.mdx uses <Tabs> for TypeScript/Python/cURL examples where the style guide requires <CodeGroup>, and the inline HMAC snippet compares string lengths rather than buffer lengths before calling timingSafeEqual.

Confidence Score: 4/5

Safe to merge after confirming whether the duplicate tools/dashboard entry in docs.json is intentional.

All new pages are well-structured and internally consistent. The duplicate tools/dashboard entry in docs.json will produce two sidebar links to the same page unless the cross-listing is deliberate. The inline HMAC snippet in programmatic-payment-links has a subtle string-vs-buffer length check inconsistency, and the multi-language code block uses the wrong Mintlify component — both are documentation quality issues rather than functional blockers.

docs.json (duplicate dashboard entry) and use-cases/programmatic-payment-links.mdx (component choice and HMAC snippet)

Important Files Changed

Filename Overview
docs.json Adds Use Cases and Tools nav groups; tools/dashboard is listed twice (API Setup group + Tools group), which may create duplicate sidebar entries.
use-cases/programmatic-payment-links.mdx New page with TypeScript/Python/cURL examples; uses <Tabs> where <CodeGroup> is required per style guide, and the HMAC verify snippet checks string length rather than buffer length before timingSafeEqual.
use-cases/webhook-reconciliation.mdx New page with a production-ready webhook handler; correctly uses buffer-length comparison before timingSafeEqual, Redis idempotency key, and covers all 12 event types.
use-cases/quickstart.mdx New comprehensive end-to-end walkthrough; well-structured with troubleshooting table, full chain/token reference, and consistent cross-links to other use-case pages.
tools/dashboard.mdx New Dashboard feature reference page; EVM/Tron Tabs usage is appropriate (platform-specific content), images properly wrapped in <Frame>, clear limitations section.
tools/secure-payments.mdx New Secure Payment feature reference; thorough coverage of wallet support, cross-chain Li.Fi routing, Tron limitations, and error states.

Sequence Diagram

sequenceDiagram
    participant U as User / Developer
    participant D as Dashboard
    participant A as Auth API
    participant R as Request API
    participant SP as Secure Payment
    participant W as Webhook Handler

    U->>D: Step 1 — Sign in with EVM/Tron wallet
    D-->>U: session_token cookie (15 min idle TTL)
    U->>D: Step 2 — Create payment destination
    D-->>U: destinationId (ERC-7828 format)
    U->>D: Step 3 — Generate Client ID
    D->>A: POST /v1/client-ids
    A-->>U: clientId
    U->>A: Step 4 — POST /v1/webhook (x-client-id)
    A-->>U: webhookId + secret (shown once)
    U->>R: Step 5 — POST /v2/secure-payments
    R-->>U: securePaymentUrl + requestIds
    U->>SP: Share securePaymentUrl with payer
    SP->>SP: Payer connects wallet, picks chain/token
    SP->>SP: Li.Fi cross-chain swap (if needed)
    SP-->>W: payment.confirmed webhook (HMAC-SHA256)
    W-->>SP: 200 OK (idempotent, deduped on delivery ID)
Loading

Reviews (1): Last reviewed commit: "docs(content): add use-case pages, Dashb..." | Re-trigger Greptile

Comment thread docs.json
Comment on lines 62 to +65
"pages": [
"api-setup/getting-started",
"api-setup/integration-tutorial",
"tools/dashboard",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Duplicate nav entry for tools/dashboard

tools/dashboard appears twice in docs.json: once inside the "API Setup" group and again in the new "🛠️ Tools" group. If this is intentional cross-listing, it will render as two separate sidebar links pointing to the same page, which can confuse readers and signal a navigation design inconsistency. If cross-listing is desired, consider using a relative link/alias rather than duplicating the page path — or confirm this duplication is intended and add a comment.

Comment on lines +34 to +108
<Tabs>
<Tab title="TypeScript / Node.js">
```typescript
const response = await fetch("https://api.request.network/v2/secure-payments", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-client-id": process.env.RN_CLIENT_ID!,
},
body: JSON.stringify({
requests: [
{
destinationId:
"0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7@eip155:8453#ABCD1234:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
amount: "100",
},
],
reference: order.id,
payerIdentifier: customer.email,
}),
});

const { securePaymentUrl, requestIds, token } = await response.json();
// Send securePaymentUrl to the customer (redirect, email, etc.)
```
</Tab>
<Tab title="Python">
```python
import os
import requests

response = requests.post(
"https://api.request.network/v2/secure-payments",
headers={
"Content-Type": "application/json",
"x-client-id": os.environ["RN_CLIENT_ID"],
},
json={
"requests": [
{
"destinationId": (
"0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7"
"@eip155:8453#ABCD1234:"
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
),
"amount": "100",
}
],
"reference": order.id,
"payerIdentifier": customer.email,
},
)

data = response.json()
secure_payment_url = data["securePaymentUrl"]
```
</Tab>
<Tab title="cURL">
```bash
curl -X POST "https://api.request.network/v2/secure-payments" \
-H "Content-Type: application/json" \
-H "x-client-id: $RN_CLIENT_ID" \
-d '{
"requests": [
{
"destinationId": "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7@eip155:8453#ABCD1234:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "100"
}
],
"reference": "ORDER-2026-042",
"payerIdentifier": "alice@example.com"
}'
```
</Tab>
</Tabs>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Use <CodeGroup> for multi-language code examples — the AGENTS.md style guide states to use <CodeGroup> when showing the same concept in multiple programming languages, and <Tabs> for platform-specific alternative approaches. TypeScript/Python/cURL for the same POST /v2/secure-payments call is a multi-language example and should use <CodeGroup>.

Suggested change
<Tabs>
<Tab title="TypeScript / Node.js">
```typescript
const response = await fetch("https://api.request.network/v2/secure-payments", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-client-id": process.env.RN_CLIENT_ID!,
},
body: JSON.stringify({
requests: [
{
destinationId:
"0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7@eip155:8453#ABCD1234:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
amount: "100",
},
],
reference: order.id,
payerIdentifier: customer.email,
}),
});
const { securePaymentUrl, requestIds, token } = await response.json();
// Send securePaymentUrl to the customer (redirect, email, etc.)
```
</Tab>
<Tab title="Python">
```python
import os
import requests
response = requests.post(
"https://api.request.network/v2/secure-payments",
headers={
"Content-Type": "application/json",
"x-client-id": os.environ["RN_CLIENT_ID"],
},
json={
"requests": [
{
"destinationId": (
"0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7"
"@eip155:8453#ABCD1234:"
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
),
"amount": "100",
}
],
"reference": order.id,
"payerIdentifier": customer.email,
},
)
data = response.json()
secure_payment_url = data["securePaymentUrl"]
```
</Tab>
<Tab title="cURL">
```bash
curl -X POST "https://api.request.network/v2/secure-payments" \
-H "Content-Type: application/json" \
-H "x-client-id: $RN_CLIENT_ID" \
-d '{
"requests": [
{
"destinationId": "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7@eip155:8453#ABCD1234:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "100"
}
],
"reference": "ORDER-2026-042",
"payerIdentifier": "alice@example.com"
}'
```
</Tab>
</Tabs>
<CodeGroup>

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +222 to +224
const ok =
signature.length === expected.length &&
timingSafeEqual(Buffer.from(signature, "hex"), Buffer.from(expected, "hex"));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 String-length check instead of buffer-length check before timingSafeEqualsignature.length === expected.length compares the raw hex string lengths, not the decoded buffer lengths. If signature contains non-hex characters, Buffer.from(signature, "hex") silently drops them and produces a shorter buffer, causing timingSafeEqual to throw a TypeError instead of returning false. The authoritative reference implementation in webhook-reconciliation.mdx correctly creates buffers first and compares their .length properties.

Suggested change
const ok =
signature.length === expected.length &&
timingSafeEqual(Buffer.from(signature, "hex"), Buffer.from(expected, "hex"));
const sigBuf = Buffer.from(signature, "hex");
const expBuf = Buffer.from(expected, "hex");
const ok =
sigBuf.length === expBuf.length &&
timingSafeEqual(sigBuf, expBuf);

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.

1 participant