Skip to content

docs(batch-payments): add comprehensive implementation guide with examples, workflow diagrams, and demo videos#57

Open
aimensahnoun wants to merge 1 commit into03-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_from
03-02-docs_api-features_migrate_batch-payments_page_from_legacy_docs_replace_ai-generated_placeholder_content_in_api-features_batch-payments.mdx_with_legacy_batch_payments_documentation_while_keeping_mintlify-compatible_formatting._-_
Open

docs(batch-payments): add comprehensive implementation guide with examples, workflow diagrams, and demo videos#57
aimensahnoun wants to merge 1 commit into03-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_from
03-02-docs_api-features_migrate_batch-payments_page_from_legacy_docs_replace_ai-generated_placeholder_content_in_api-features_batch-payments.mdx_with_legacy_batch_payments_documentation_while_keeping_mintlify-compatible_formatting._-_

Conversation

@aimensahnoun
Copy link
Member

@aimensahnoun aimensahnoun commented Mar 2, 2026

TL;DR

Completely rewrote the batch payments documentation with comprehensive implementation guides, code examples, and video demonstrations.

What changed?

  • Replaced AI-generated placeholder content with detailed documentation covering batch payment types, workflows, and implementation
  • Added two distinct batch payment methods: Batch Pay Invoices (for existing requests) and Batch Payouts (for new requests)
  • Included complete TypeScript code examples showing API calls and blockchain transaction execution
  • Added sequence diagram illustrating the batch payment workflow
  • Documented processing limits (100-200 payments per transaction), supported payment types, and best practices
  • Embedded two demo videos from EasyInvoice application showing batch payments in action
  • Added comprehensive error handling guidance and implementation notes

How to test?

  • Review the code examples to ensure they accurately reflect the API endpoints
  • Verify the sequence diagram matches the actual batch payment flow
  • Test the embedded YouTube videos to confirm they load properly
  • Validate that the endpoint reference link points to the correct API documentation

Why make this change?

The previous content was AI-generated placeholder text that provided minimal value to developers. This rewrite provides actionable documentation with real code examples, clear workflows, and practical guidance needed for implementing batch payments in production applications.

Replace AI-generated placeholder content in `api-features/batch-payments.mdx` with legacy batch payments documentation while keeping Mintlify-compatible formatting.
- removed AI warning and outdated placeholder sections
- migrated legacy structure: overview, batch types, benefits, limits, workflow, endpoint, implementation examples, and operational notes
- kept endpoint reference inline for `POST /v2/payouts/batch` with OpenAPI link
- updated conversion reference to internal payment-types path (`/api-features/conversion-payments`)
- removed hidden/invalid use-case dependencies (`payouts`, `payroll`) and legacy-domain links
- preserved demo resources via embedded EasyInvoice videos and source link
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): migrate batch-payments page from legacy docs Replace AI-generated placeholder content in api-features/batch-payments.mdx with legacy batch payments documentation while keeping Mintlify-compatible formatting. - removed AI warning and docs(batch-payments): add comprehensive implementation guide with examples, workflow diagrams, and demo videos Mar 2, 2026
@aimensahnoun aimensahnoun marked this pull request as ready for review March 2, 2026 12:05
@greptile-apps
Copy link

greptile-apps bot commented Mar 2, 2026

Greptile Summary

This PR successfully migrates batch payments documentation from legacy docs to Mintlify format, replacing placeholder content with comprehensive, production-ready documentation.

Key improvements:

  • Clear distinction between Batch Pay Invoices (existing requests) and Batch Payouts (new requests)
  • Complete TypeScript implementation examples with ethers.js integration
  • Mermaid sequence diagram illustrating the full payment workflow
  • Detailed documentation of processing limits (100-200 payments), supported payment types, and best practices
  • Embedded demo videos from EasyInvoice application
  • Proper use of Mintlify components (Warning, iframe) following AGENTS.md guidelines

Minor improvements needed:

  • Code examples should include error handling for API responses to match other documentation examples and follow the "show proper error handling" guideline from AGENTS.md

Confidence Score: 4/5

  • Safe to merge with minor improvements recommended for code example completeness
  • Documentation is well-structured, technically accurate, and follows Mintlify formatting standards. Code examples are syntactically correct and demonstrate proper API usage. Only minor style improvement needed for error handling to align with technical writing guidelines.
  • No files require special attention - the batch-payments.mdx changes are comprehensive and ready for merge after considering the error handling suggestions

Important Files Changed

Filename Overview
api-features/batch-payments.mdx Complete rewrite replacing AI-generated placeholder with comprehensive batch payments documentation including workflow diagrams, TypeScript examples, and demo videos. Code examples lack error handling but are otherwise syntactically correct.

Last reviewed commit: 3ad2520

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

Comment on lines +88 to +104
const batchPayResponse = await fetch('https://api.request.network/v2/payouts/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key',
'x-platform-id': 'your-platform-id'
},
body: JSON.stringify({
requestIds: [
"01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
"02f384fdd39e5c627e04b1f2e6fd60593783b8863c3c789197f5bd381527b8ecd"
],
payer: "0x2e2E5C79F571ef1658d4C2d3684a1FE97DD30570"
})
});

const { batchPaymentTransaction, ERC20ApprovalTransactions } = await batchPayResponse.json();
Copy link

Choose a reason for hiding this comment

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

Add error handling for the API fetch call. The current example doesn't check if the response was successful before destructuring the JSON.

Suggested change
const batchPayResponse = await fetch('https://api.request.network/v2/payouts/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key',
'x-platform-id': 'your-platform-id'
},
body: JSON.stringify({
requestIds: [
"01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
"02f384fdd39e5c627e04b1f2e6fd60593783b8863c3c789197f5bd381527b8ecd"
],
payer: "0x2e2E5C79F571ef1658d4C2d3684a1FE97DD30570"
})
});
const { batchPaymentTransaction, ERC20ApprovalTransactions } = await batchPayResponse.json();
const batchPayResponse = await fetch('https://api.request.network/v2/payouts/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key',
'x-platform-id': 'your-platform-id'
},
body: JSON.stringify({
requestIds: [
"01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
"02f384fdd39e5c627e04b1f2e6fd60593783b8863c3c789197f5bd381527b8ecd"
],
payer: "0x2e2E5C79F571ef1658d4C2d3684a1FE97DD30570"
})
});
if (!batchPayResponse.ok) {
throw new Error(`API error: ${batchPayResponse.status}`);
}
const { batchPaymentTransaction, ERC20ApprovalTransactions } = await batchPayResponse.json();

Comment on lines +125 to +151
const batchPayResponse = await fetch('https://api.request.network/v2/payouts/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key',
'x-platform-id': 'your-platform-id'
},
body: JSON.stringify({
requests: [
{
payee: "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
amount: "10",
invoiceCurrency: "USD",
paymentCurrency: "USDC-sepolia"
},
{
payee: "0xb07D2398d2004378cad234DA0EF14f1c94A530e4",
amount: "25.50",
invoiceCurrency: "EUR",
paymentCurrency: "DAI-sepolia"
}
],
payer: "0x2e2E5C79F571ef1658d4C2d3684a1FE97DD30570"
})
});

const { batchPaymentTransaction, ERC20ApprovalTransactions } = await batchPayResponse.json();
Copy link

Choose a reason for hiding this comment

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

Add error handling for the API fetch call (same issue as Batch Pay Invoices example).

Suggested change
const batchPayResponse = await fetch('https://api.request.network/v2/payouts/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key',
'x-platform-id': 'your-platform-id'
},
body: JSON.stringify({
requests: [
{
payee: "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
amount: "10",
invoiceCurrency: "USD",
paymentCurrency: "USDC-sepolia"
},
{
payee: "0xb07D2398d2004378cad234DA0EF14f1c94A530e4",
amount: "25.50",
invoiceCurrency: "EUR",
paymentCurrency: "DAI-sepolia"
}
],
payer: "0x2e2E5C79F571ef1658d4C2d3684a1FE97DD30570"
})
});
const { batchPaymentTransaction, ERC20ApprovalTransactions } = await batchPayResponse.json();
const batchPayResponse = await fetch('https://api.request.network/v2/payouts/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key',
'x-platform-id': 'your-platform-id'
},
body: JSON.stringify({
requests: [
{
payee: "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
amount: "10",
invoiceCurrency: "USD",
paymentCurrency: "USDC-sepolia"
},
{
payee: "0xb07D2398d2004378cad234DA0EF14f1c94A530e4",
amount: "25.50",
invoiceCurrency: "EUR",
paymentCurrency: "DAI-sepolia"
}
],
payer: "0x2e2E5C79F571ef1658d4C2d3684a1FE97DD30570"
})
});
if (!batchPayResponse.ok) {
throw new Error(`API error: ${batchPayResponse.status}`);
}
const { batchPaymentTransaction, ERC20ApprovalTransactions } = await batchPayResponse.json();

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