Batch Payments
Process multiple payment requests or payouts efficiently in a single blockchain transaction
Last updated
Was this helpful?
Process multiple payment requests or payouts efficiently in a single blockchain transaction
Last updated
Was this helpful?
Batch payments enable you to process multiple payment requests efficiently in a single blockchain transaction, reducing gas costs and simplifying multi-recipient workflows.
Two Types of Batch Payments:
Process previously created requests using their request IDs and receive payment calldata that can be executed on-chain to pay multiple requests simultaneously.
Submit new payment requests that are immediately processed, creating requests and returning payment calldata in a single API call for instant multi-recipient payments.
Gas Efficiency: Significantly reduce transaction costs by batching multiple payments
Simplified UX: Process up to 200 payments in a single transaction
Mixed Payment Types: Support ERC20, native tokens, and conversion payments in the same batch
Atomic Execution: All payments succeed or fail together, ensuring consistency
The theoretical limit for batch payments is 100-200 payments per transaction, depending on:
Payment complexity (ERC20 vs native tokens vs conversions)
Available block gas limit on the target network
Smart contract computational requirements
For optimal performance, we recommend starting with smaller batches (10-50 payments) and scaling based on your network conditions.
The following examples demonstrate how to implement batch payment calldata execution in your application. Note: The API returns unsigned transaction calldata - your application must handle sending these transactions to the blockchain.
Batch payments support mixing different payment types in a single transaction:
ERC20 Token Payments: Standard token transfers
Native Token Payments: ETH, MATIC, etc.
API Call: Your application calls the Request Network API to get transaction data
Blockchain Execution: Your application executes the returned transaction data on the blockchain
Error Handling: Your application handles transaction failures and retries
Validate Addresses: Always validate recipient addresses before submitting batch payments
Test on Testnets: Start with small batches on test networks before production deployment
Handle Failures Gracefully: Implement proper error handling for transaction failures
Gas Estimation: Consider gas costs when determining optimal batch sizes
User Experience: Provide clear progress indicators for multi-step approval processes
Common error scenarios and their solutions:
Network Mismatch: Ensure all requests use the same blockchain network
Insufficient Funds: Verify payer has sufficient balance for all payments plus gas
Invalid Addresses: Validate all payee addresses before batch submission
Gas Limit Exceeded: Reduce batch size if hitting network gas limits
See the batch payment feature in action in our EasyInvoice demo application:
Single Network Limitation: All requests in a batch must be on the same blockchain network. Need multi-network batch payments? to discuss this feature.
: Requests denominated in one currency but paid in another (e.g., USD invoices paid with USDC)
For detailed information on all available endpoints and their parameters, please refer to the full .
For more implementation details, explore the .
Pays multiple payment requests in one transaction by either creating new requests or using existing request IDs. All requests must be on the same network. Supports mixed ERC20, Native, and conversion requests.
API key for authentication
The request IDs of the existing requests to be paid. Requests must be on the same network. Either requests
or requestIds
must be provided, but not both.
The wallet address of the payer, user to check if approval is needed or not.