Skip to content

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

Open
aimensahnoun wants to merge 1 commit into03-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._-_remofrom
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_
Open

docs(crosschain-payments): replace AI-generated content with comprehensive implementation guide#56
aimensahnoun wants to merge 1 commit into03-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._-_remofrom
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

@aimensahnoun
Copy link
Member

@aimensahnoun aimensahnoun commented Mar 2, 2026

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.

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”)
Copy link
Member Author

aimensahnoun commented Mar 2, 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.

@aimensahnoun aimensahnoun self-assigned this Mar 2, 2026
@aimensahnoun aimensahnoun 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 guide Mar 2, 2026
@aimensahnoun aimensahnoun marked this pull request as ready for review March 2, 2026 12:04
@greptile-apps
Copy link

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Successfully replaces AI-generated placeholder content with comprehensive implementation guide for crosschain payments functionality.

Key Improvements:

  • Added clear overview explaining crosschain payment capability (paying with different currencies/networks)
  • Documented specific supported chains (Ethereum, Arbitrum One, Base, OP Mainnet) and stablecoins (USDC, USDT, DAI)
  • Converted generic content into detailed 5-step implementation guide using Mintlify Steps component
  • Included TypeScript code example for EIP-2612 permit handling and payment intent signing
  • Added API endpoint references and webhook lifecycle information
  • Linked to Platform Fees documentation for custom fee configuration

Minor Improvements Suggested:

  • Clarify "12 stablecoins" wording (actually 3 stablecoins across 4 chains = 12 pairs)
  • Clarify minimum amount requirement (> 1 vs >= 1)
  • Consider modernizing ethers v5 code to v6 or wagmi for consistency with Integration Tutorial
  • Add context for undefined variables in code example (walletProvider, paymentData)

Confidence Score: 4/5

  • Safe to merge with high confidence - documentation improvements with no runtime impact
  • Significant improvement from AI-generated placeholder to verified implementation guide. Content follows Mintlify guidelines and matches legacy documentation structure. Minor style improvements suggested (wording clarity, code modernization) but no blocking issues. This is documentation-only with no code execution impact.
  • No files require special attention - all changes are documentation improvements

Important Files Changed

Filename Overview
api-features/crosschain-payments.mdx Replaces AI-generated content with comprehensive crosschain payments guide; minor wording clarifications and code modernization opportunities identified

Last reviewed commit: 76e5cbc

Copy link

@greptile-apps greptile-apps bot left a comment

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


## Crosschain Payments Supported Chains and Currencies

For crosschain (and samechain) payments, the Request Network API supports 12 stablecoins: USDC, USDT, and DAI on 4 chains (Ethereum, Arbitrum One, Base, OP Mainnet).
Copy link

Choose a reason for hiding this comment

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

Wording could be clearer: states "12 stablecoins" but only 3 stablecoin types are listed (USDC, USDT, DAI). Consider: "3 stablecoins (USDC, USDT, and DAI) across 4 chains, totaling 12 currency-chain pairs"

To enable crosschain payments, the request must be created with:

- `paymentCurrency` in the supported stablecoins and supported networks
- `amount` greater than 1 (crosschain execution under 1 stablecoin is not allowed)
Copy link

Choose a reason for hiding this comment

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

Ambiguous amount requirement: "greater than 1" typically means > 1, but "under 1 is not allowed" suggests >= 1 is valid. Clarify whether the minimum is 1 or 1.01

Comment on lines +84 to +86
const ethersProvider = new ethers.providers.Web3Provider(
walletProvider as ethers.providers.ExternalProvider,
);
Copy link

Choose a reason for hiding this comment

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

Uses deprecated ethers v5 syntax (ethers.providers.Web3Provider). The Integration Tutorial uses wagmi. Consider updating to ethers v6 syntax or wagmi for consistency:

// Ethers v6 syntax
import { BrowserProvider } from "ethers";
const ethersProvider = new BrowserProvider(walletProvider);

Or align with the wagmi pattern from /api-setup/integration-tutorial

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 +82 to +89
import { ethers } from "ethers";

const ethersProvider = new ethers.providers.Web3Provider(
walletProvider as ethers.providers.ExternalProvider,
);
const signer = await ethersProvider.getSigner();

const paymentIntent = JSON.parse(paymentData.paymentIntent);
Copy link

Choose a reason for hiding this comment

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

Code example references undefined variables walletProvider and paymentData. Add context showing where these come from (e.g., from the /v2/request/{requestId}/pay API response)

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