Skip to content

docs(crypto-to-fiat): expand comprehensive guide with sandbox access, compliance flows, and implementation details - #59

Merged
rodrigopavezi merged 1 commit into
mainfrom
03-02-docs_api-features_migrate_crypto-to-fiat_page_to_legacy-aligned_content_replace_the_ai-generated_crypto-to-fiat_page_with_legacy_documentation_content_and_preserve_the_original_flow_wording_while_adapting_to_valid_mintlify_mdx_s
May 12, 2026
Merged

docs(crypto-to-fiat): expand comprehensive guide with sandbox access, compliance flows, and implementation details#59
rodrigopavezi merged 1 commit into
mainfrom
03-02-docs_api-features_migrate_crypto-to-fiat_page_to_legacy-aligned_content_replace_the_ai-generated_crypto-to-fiat_page_with_legacy_documentation_content_and_preserve_the_original_flow_wording_while_adapting_to_valid_mintlify_mdx_s

Conversation

@aimen74

@aimen74aimen74 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Completely rewrote the crypto-to-fiat payments documentation to provide comprehensive implementation guidance with detailed flows, endpoint references, and practical examples.

What changed?

  • Replaced AI-generated placeholder content with detailed implementation documentation
  • Added comprehensive getting started section with sandbox and production access instructions
  • Introduced clientUserId concept and explanation for user management
  • Added detailed compliance and payer onboarding flow with sequence diagrams
  • Documented payment details setup process for payees with bank account registration
  • Included complete payment flow documentation with webhook event references
  • Added endpoint references for all crypto-to-fiat related API calls
  • Provided design rationale and UX considerations for implementation decisions
  • Added support information for USDC on Ethereum, Polygon, Arbitrum One, and Sepolia
  • Included crosschain payment integration guidance for non-USDC currencies

How to test?

  1. Create an account on the Request Network API Portal
  2. Generate a Sandbox API key with crypto-to-fiat sandbox access
  3. Test the complete flow using Sepolia testnet USDC and mock KYC documents
  4. Follow the sequence diagrams for compliance, payment details, and payment flows
  5. Use the EasyInvoice reference implementation to see the integration in action

Why make this change?

The previous documentation was AI-generated placeholder content that lacked practical implementation details. This rewrite provides developers with actionable guidance, complete API references, and clear flow diagrams needed to successfully integrate crypto-to-fiat payments into their applications.

@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): replace legacy domain links in crypto-to-fiat page Update api-features/crypto-to-fiat-payments.mdx to remove hardcoded docs.request.network URLs and use Mintlify internal routes instead. - replaced EasyInvoice reference with `/requdocs(crypto-to-fiat): expand comprehensive guide with sandbox access, compliance flows, and implementation detailsMar 2, 2026
@aimen74
aimen74 marked this pull request as ready for review March 2, 2026 12:06
@greptile-apps

greptile-appsBot commented Mar 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces AI-generated placeholder content in the crypto-to-fiat payments docs with a thorough, developer-focused guide covering sandbox/production access, clientUserId semantics, compliance and KYC flows, bank account registration, payment execution, and a webhook event reference table.

  • Three sequence diagrams walk through the compliance, payment-details, and payment execution flows with participant labels and webhook event names.
  • Endpoint reference sections link every flow step to the corresponding OpenAPI entry, but one diagram step (POST /request) is missing the /v2/ version prefix used everywhere else on the page.
  • An H1 heading in the document body duplicates the frontmatter title, which Mintlify already renders as the page H1, breaking the heading hierarchy per AGENTS.md guidelines.

Confidence Score: 5/5

Documentation-only change with no executable code; safe to merge.

All changes are prose and Mermaid diagrams. The two findings are a missing /v2/ prefix in one diagram step and a duplicate H1 heading — neither blocks understanding of the integration or causes incorrect behavior at runtime.

api-features/crypto-to-fiat-payments.mdx — the Payment Details sequence diagram and the document's opening heading line.

Important Files Changed

FilenameOverview
api-features/crypto-to-fiat-payments.mdxComplete rewrite replacing AI-generated placeholder content with detailed implementation docs covering sandbox access, compliance flows, payment detail registration, and webhook events. Two minor issues found: a missing /v2/ prefix on POST /request in the Payment Details sequence diagram, and a redundant H1 heading in the document body that conflicts with the frontmatter title.

Sequence Diagram

sequenceDiagram
participant Payer
participant Payee
participant Platform
participant RequestAPI
participant RequestTech
participant Blockchain
Note over Payer,RequestTech: 1. Compliance & KYC Flow
Payer->>Platform: Submit KYC data
Platform->>RequestAPI: POST /v2/payer
RequestAPI-->>Platform: webhook: compliance.updated (kycStatus)
Platform->>Payer: Show agreement iframe
Platform->>RequestAPI: "PATCH /v2/payer/{clientUserId}"
Note over Payee,RequestTech: 2. Payment Details Flow
Payee->>Platform: Submit bank account info
Platform->>RequestAPI: "POST /v2/payer/{clientUserId}/payment-details"
RequestAPI-->>Platform: webhook: payment_detail.updated (approved)
Platform->>RequestAPI: "POST /v2/request (isCryptoToFiatAllowed=true)"
Note over Payer,RequestTech: 3. Payment Execution Flow
Platform->>RequestAPI: "GET /v2/request/{requestId}/pay (calldata)"
Payer->>Blockchain: Send USDC to Request Tech
Blockchain-->>RequestTech: Payment received
RequestTech-->>RequestAPI: offramp_update
RequestAPI-->>Platform: webhook: payment.processing (subStatus)
RequestTech->>Payee: Fiat deposited to bank
RequestAPI-->>Platform: webhook: payment.confirmed
Loading

Reviews (2): Last reviewed commit: "docs(api-features): replace legacy domai..." | 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, 5 comments

Edit Code Review Agent Settings | Greptile

Comment threadapi-features/crypto-to-fiat-payments.mdx
Comment threadapi-features/crypto-to-fiat-payments.mdx
Comment threadapi-features/crypto-to-fiat-payments.mdx
Comment threadapi-features/crypto-to-fiat-payments.mdx
Comment threadapi-features/crypto-to-fiat-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:17 PM UTC: Graphite rebased this pull request as part of a merge.
  • May 12, 4:18 PM UTC: @rodrigopavezi merged this pull request with Graphite.

@rodrigopavezi
rodrigopavezi changed the base branch from 03-02-docs_api-features_migrate_recurring-payments_page_from_legacy_docs_replace_the_ai-generated_recurring_payments_page_with_legacy-aligned_content_while_preserving_mintlify_structure_and_readability._-_removed_ai_warning_and_placeh to graphite-base/59May 12, 2026 16:15
@rodrigopavezi
rodrigopavezi changed the base branch from graphite-base/59 to mainMay 12, 2026 16:16
Update `api-features/crypto-to-fiat-payments.mdx` to remove hardcoded
`docs.request.network` URLs and use Mintlify internal routes instead.
- replaced EasyInvoice reference with `/request-network-api/easyinvoice-api-demo-app`
- replaced crosschain reference with `/api-features/crosschain-payments`
- ensures the page stays self-contained for cutover from legacy docs
@rodrigopavezi
rodrigopaveziforce-pushed the 03-02-docs_api-features_migrate_crypto-to-fiat_page_to_legacy-aligned_content_replace_the_ai-generated_crypto-to-fiat_page_with_legacy_documentation_content_and_preserve_the_original_flow_wording_while_adapting_to_valid_mintlify_mdx_s branch from 46ae1bb to d2c4928CompareMay 12, 2026 16:17
@rodrigopavezi
rodrigopavezi merged commit 5ab6237 into mainMay 12, 2026
1 check passed
@rodrigopavezi
rodrigopavezi deleted the 03-02-docs_api-features_migrate_crypto-to-fiat_page_to_legacy-aligned_content_replace_the_ai-generated_crypto-to-fiat_page_with_legacy_documentation_content_and_preserve_the_original_flow_wording_while_adapting_to_valid_mintlify_mdx_s branch May 12, 2026 16:18
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