Skip to content

docs(create-requests): rewrite with workflows, examples, and remove AI warning#55

Open
aimensahnoun wants to merge 1 commit into03-01-docs_api-setup_migrate_integration_tutorial_with_localized_images_migrate_complete_integration_tutorial_from_legacy_gitbook_to_mintlify_converting_all_19_external_image_urls_to_local_webp_assets_for_improved_performance_and_relifrom
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
Open

docs(create-requests): rewrite with workflows, examples, and remove AI warning#55
aimensahnoun wants to merge 1 commit into03-01-docs_api-setup_migrate_integration_tutorial_with_localized_images_migrate_complete_integration_tutorial_from_legacy_gitbook_to_mintlify_converting_all_19_external_image_urls_to_local_webp_assets_for_improved_performance_and_relifrom
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

Conversation

@aimensahnoun
Copy link
Member

@aimensahnoun aimensahnoun commented Mar 2, 2026

TL;DR

Completely rewrote the Create Requests documentation page to provide clearer explanations, practical examples, and better organization of request creation workflows.

What changed?

  • Removed AI-generated content warning and replaced with comprehensive documentation
  • Added "What You Can Do" section explaining core API capabilities including partial payment support
  • Introduced two distinct workflows: Invoice-first and Payment-first with clear use cases
  • Replaced simple flowchart with detailed sequence diagram showing API interactions
  • Streamlined Request Properties section with clearer explanations of required vs optional fields
  • Added practical JavaScript code examples for creating requests and getting payment calldata
  • Reorganized "Used In" section to include more relevant use cases like Checkout and Integration Tutorial
  • Added Key Features section highlighting human-readable amounts, automatic tracking, and flexible currencies
  • Updated API reference link to point to OpenAPI specs instead of specific endpoint documentation

How to test?

  • Review the documentation for clarity and accuracy
  • Verify all code examples are syntactically correct
  • Check that all internal links reference valid pages
  • Ensure the sequence diagram renders properly in the documentation system
  • Validate that the token list and supported chains references are current

Why make this change?

The previous documentation was marked as AI-generated and potentially inaccurate. This rewrite provides developers with clear, actionable guidance on request creation workflows, includes practical code examples, and better explains the different approaches available through the API. The new structure makes it easier for developers to understand both the conceptual flow and implementation details.

…vior

Refactor the Create Requests docs to keep the Mintlify layout while replacing AI-generated/uncertain content with verified guidance from legacy docs.
- Removed inaccurate sections and fields (`Due Date`, `Customer Info`, `Reference`, and generic “Content Data” block)
- Reworked “Request Types” into clearer workflow-based guidance (invoice-first vs payment-first)
- Updated the flow diagram and examples to reflect actual request/payment flow
- Cleaned up links and removed references to hidden/unsupported pages
- Pointed API reference to the canonical OpenAPI URL: https://api.request.network/open-api
Result: the page now preserves the current Mintlify structure, but the content is tighter and aligned with real API usage.
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 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. - Removed inaccurate sections a docs(create-requests): rewrite with workflows, examples, and remove AI warning Mar 2, 2026
@aimensahnoun aimensahnoun marked this pull request as ready for review March 2, 2026 12:03
@greptile-apps
Copy link

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Changes

This PR completely rewrites the Create Requests documentation, removing the AI-generated warning and providing comprehensive guidance on request creation workflows.

Improvements:

  • Clear separation of Invoice-first and Payment-first workflows with use cases
  • Detailed sequence diagram showing complete API interaction flow
  • Practical JavaScript code examples for creating requests and getting payment calldata
  • Better organization of request properties with human-readable explanations
  • Updated references to verified documentation pages

Critical Issue:

  • Uses incorrect API parameter (paymentReference instead of requestId) in the v2 pay endpoint, both in the diagram and code example. This will cause API calls to fail.

Verification:

  • All internal links reference valid, visible pages in the navigation
  • Mermaid diagram syntax is correct and will render properly
  • Code examples are syntactically valid JavaScript (aside from the parameter issue)

Confidence Score: 2/5

  • Contains a critical API parameter bug that will cause runtime errors
  • While the documentation rewrite is well-structured with good examples and workflows, it uses the wrong parameter (paymentReference instead of requestId) in the v2 pay endpoint. This is a critical bug that will cause API calls to fail when developers follow the documentation. The error appears in both the sequence diagram and the code example, making it likely to mislead users.
  • Fix the requestId vs paymentReference issue in api-features/create-requests.mdx before merging

Important Files Changed

Filename Overview
api-features/create-requests.mdx Major rewrite removing AI warning and adding workflows/examples, but contains critical endpoint parameter bug (uses paymentReference instead of requestId in v2 API)

Last reviewed commit: 7a351c3

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, 2 comments

Edit Code Review Agent Settings | Greptile

Request Network API-->>App: 201 Created {requestId, paymentReference}

User->>App: Pay Request
App->>Request Network API: GET /request/{paymentReference}/pay {apiKey}
Copy link

Choose a reason for hiding this comment

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

Incorrect parameter in v2 API endpoint. According to the v2 migration docs, the v2 pay endpoint uses {requestId}, not {paymentReference}.

Suggested change
App->>Request Network API: GET /request/{paymentReference}/pay {apiKey}
App->>Request Network API: GET /request/{requestId}/pay {apiKey}

Comment on lines +129 to +135
```javascript
const payResponse = await fetch(
`https://api.request.network/v2/request/${paymentReference}/pay`,
{
headers: { 'X-Api-Key': process.env.RN_API_KEY }
}
);
Copy link

Choose a reason for hiding this comment

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

Incorrect parameter in v2 API endpoint. The v2 pay endpoint requires requestId (not paymentReference). Update both the URL and the destructured variable.

Suggested change
```javascript
const payResponse = await fetch(
`https://api.request.network/v2/request/${paymentReference}/pay`,
{
headers: { 'X-Api-Key': process.env.RN_API_KEY }
}
);
const payResponse = await fetch(
`https://api.request.network/v2/request/${requestId}/pay`,
{
headers: { 'X-Api-Key': process.env.RN_API_KEY }
}
);

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