Skip to content

docs(crosschain-payments): replace AI-generated content with comprehensive implementation guide - #56

Merged
rodrigopavezi merged 1 commit into
mainfrom
03-02-docs_api-features_align_crosschain-payments_page_with_legacy_docs_flow_update_api-features_crosschain-payments.mdx_to_follow_legacy_content_structure_and_sequencing_while_keeping_mintlify-compatible_formatting._-_replaced_mixed_
May 12, 2026
Merged

docs(crosschain-payments): replace AI-generated content with comprehensive implementation guide#56
rodrigopavezi merged 1 commit into
mainfrom
03-02-docs_api-features_align_crosschain-payments_page_with_legacy_docs_flow_update_api-features_crosschain-payments.mdx_to_follow_legacy_content_structure_and_sequencing_while_keeping_mintlify-compatible_formatting._-_replaced_mixed_

Conversation

@aimen74

@aimen74aimen74 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Replaced AI-generated placeholder content with comprehensive documentation for crosschain payments functionality, including detailed implementation steps and supported networks.

What changed?

  • Removed AI-generated content warning and placeholder information
  • Added detailed overview explaining crosschain payments capability (paying requests with different currencies/networks)
  • Documented supported chains (Ethereum, Arbitrum One, Base, OP Mainnet) and stablecoins (USDC, USDT, DAI)
  • Included step-by-step implementation guide covering request creation, route fetching, payment calldata generation, signing, and execution
  • Added TypeScript code example showing EIP-2612 permit handling and payment intent signing
  • Added reference to custom fee configuration via Platform Fees

How to test?

  1. Create a request using the POST /v2/request endpoint with supported stablecoins and networks
  2. Fetch available payment routes using GET /v2/request/{requestId}/routes
  3. Generate payment calldata with GET /v2/request/{requestId}/pay
  4. Test the signing flow using the provided TypeScript example
  5. Submit signed payment data via POST /v2/request/payment-intents/{paymentIntentId}
  6. Verify webhook lifecycle updates are received

Why make this change?

The previous content was AI-generated placeholder material that lacked specific implementation details. This change provides developers with accurate, actionable documentation including supported networks, currencies, step-by-step integration instructions, and working code examples needed to implement crosschain payments functionality.

@aimen74Graphite App

aimen74 commented Mar 2, 2026

Copy link
Copy Markdown
ContributorAuthor

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

@aimen74aimen74 self-assigned this Mar 2, 2026
@aimen74aimen74 changed the title docs(api-features): align crosschain-payments page with legacy docs flow Update api-features/crosschain-payments.mdx to follow legacy content structure and sequencing while keeping Mintlify-compatible formatting. - Replaced mixed/rewritten content with docs(crosschain-payments): replace AI-generated content with comprehensive implementation guideMar 2, 2026
@aimen74
aimen74 marked this pull request as ready for review March 2, 2026 12:04
@greptile-apps

greptile-appsBot commented Mar 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces AI-generated placeholder content in api-features/crosschain-payments.mdx with a real implementation guide covering supported chains, currencies, and a step-by-step signing flow. The change is a net positive for developer experience but has one gap that would block implementors mid-flow.

  • Supported networks and currencies (Ethereum, Arbitrum One, Base, OP Mainnet; USDC/USDT/DAI) are now clearly documented with a mainnet-only warning.
  • Five sequential steps walk through request creation, route fetching, calldata retrieval, signing, and submission using a TypeScript example.
  • Step 5's POST URL uses {paymentIntentId} but no prior step tells the developer where to find this value in the API response, leaving the integration flow incomplete.

Confidence Score: 4/5

Safe to merge with a small fix: the paymentIntentId handoff between Step 3 and Step 5 needs to be documented before developers can complete the integration end-to-end.

The guide walks developers through five sequential steps, but Step 5 references a paymentIntentId that is never shown as part of the Step 3 API response. A developer following the guide top-to-bottom will hit a dead end at the submission call with no indication of which response field to use.

api-features/crosschain-payments.mdx — specifically the handoff between the "Getting payment calldata" step and the "Sending the signed data" step.

Important Files Changed

FilenameOverview
api-features/crosschain-payments.mdxReplaces AI-generated placeholder with a full implementation guide; the paymentIntentId's origin is not documented in the signing-to-submission handoff step, which will block developers at Step 5.

Sequence Diagram

sequenceDiagram
participant Dev as Developer
participant API as Request Network API
participant Wallet as Payer Wallet
Dev->>API: "POST /v2/request (paymentCurrency, amount > 1)"
API-->>Dev: requestId
Dev->>API: "GET /v2/request/{requestId}/routes"
API-->>Dev: Ranked routes (gas fees, service fees)
Dev->>API: "GET /v2/request/{requestId}/pay (selected route)"
API-->>Dev: paymentData (paymentIntent, approvalPermitPayload/calldata, paymentIntentId)
alt Token supports EIP-2612
Dev->>Wallet: signTypedData(approvalPermitPayload)
Wallet-->>Dev: approvalSignature
else Token does not support EIP-2612
Dev->>Wallet: sendTransaction(approvalCalldata)
Wallet-->>Dev: tx receipt
end
Dev->>Wallet: signTypedData(paymentIntent)
Wallet-->>Dev: paymentIntentSignature
Dev->>API: "POST /v2/request/payment-intents/{paymentIntentId} (signedData)"
API-->>Dev: Webhook lifecycle updates (completion event)
Loading

Reviews (2): Last reviewed commit: "docs(api-features): align crosschain-pay..." | Re-trigger Greptile

@greptile-appsgreptile-appsBot 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.

1 file reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Comment threadapi-features/crosschain-payments.mdx
Comment threadapi-features/crosschain-payments.mdx
Comment threadapi-features/crosschain-payments.mdx
Comment threadapi-features/crosschain-payments.mdx
rodrigopavezi added a commit that referenced this pull request May 11, 2026
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.
@rodrigopaveziGraphite App

rodrigopavezi commented May 12, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • May 12, 4:02 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 12, 4:11 PM UTC: Graphite rebased this pull request as part of a merge.
  • May 12, 4:12 PM UTC: @rodrigopavezi merged this pull request with Graphite.

@rodrigopavezi
rodrigopavezi changed the base branch from 03-02-docs_api-features_align_create-requests_page_with_verified_api_behavior_refactor_the_create_requests_docs_to_keep_the_mintlify_layout_while_replacing_ai-generated_uncertain_content_with_verified_guidance_from_legacy_docs._-_remo to graphite-base/56May 12, 2026 16:09
@rodrigopavezi
rodrigopavezi changed the base branch from graphite-base/56 to mainMay 12, 2026 16:10
Update `api-features/crosschain-payments.mdx` to follow legacy content structure and sequencing while keeping Mintlify-compatible formatting.
- Replaced mixed/rewritten content with legacy-aligned section flow
- Removed non-legacy “get in touch” block
- Kept supported chains/currencies explicitly on-page (crosschain-specific)
- Converted “How It Works” to step-based structure using Mintlify `Steps`
- Kept endpoint links directly inside the relevant steps (legacy-style placement)
- Restored signing code example in step 4
- Removed extra “Used In” section
- Removed separate endpoint dump section that made the page noisy
- Updated custom fee note to reflect current availability and link to `/api-features/platform-fees` (instead of “in development”)
@rodrigopavezi
rodrigopaveziforce-pushed the 03-02-docs_api-features_align_crosschain-payments_page_with_legacy_docs_flow_update_api-features_crosschain-payments.mdx_to_follow_legacy_content_structure_and_sequencing_while_keeping_mintlify-compatible_formatting._-_replaced_mixed_ branch from 76e5cbc to 18d648cCompareMay 12, 2026 16:11
@rodrigopavezi
rodrigopavezi merged commit c2c869a into mainMay 12, 2026
3 checks passed
@rodrigopavezi
rodrigopavezi deleted the 03-02-docs_api-features_align_crosschain-payments_page_with_legacy_docs_flow_update_api-features_crosschain-payments.mdx_to_follow_legacy_content_structure_and_sequencing_while_keeping_mintlify-compatible_formatting._-_replaced_mixed_ branch May 12, 2026 16:12
Comment on lines +132 to +136
<Step title="Sending the signed data">
Send signed payment data with [POST /v2/request/payment-intents/{paymentIntentId}](https://api.request.network/open-api/#tag/v2request/POST/v2/request/payment-intents/{paymentIntentId}).

The API processes the payment and sends webhook lifecycle updates, including completion events.
</Step>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1Missing paymentIntentId derivation

The POST URL in Step 5 requires a paymentIntentId, but nowhere in the guide is it explained where this value comes from. Step 3 says the GET /v2/request/{requestId}/pay endpoint returns a "payment intent", and the code in Step 4 does JSON.parse(paymentData.paymentIntent), so paymentIntentId presumably lives as a top-level field in the paymentData response. Without explicitly naming it, a developer reaching Step 5 has no idea which field to use to construct the submission URL.

rodrigopavezi added a commit that referenced this pull request May 12, 2026
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.
Sign up for freeto 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

@aimen74@rodrigopavezi