Batch Processing
Process multiple payments efficiently with batch operations.
Create a Batch
bash
curl -X POST https://api.paystream.fi/api/v1/batches \
-H "Authorization: Bearer psk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Driver Payouts",
"hold": true,
"payments": [
{"recipientId": "rec_001", "amount": 50000, "description": "Week 8 payout"},
{"recipientId": "rec_002", "amount": 75000, "description": "Week 8 payout"},
{"recipientId": "rec_003", "amount": 60000, "description": "Week 8 payout"}
]
}'Batch States
| State | Description |
|---|---|
draft | Batch created, not yet reviewed |
held | Awaiting release |
processing | Payments being processed |
completed | All payments completed |
failed | One or more payments failed |
Review and Release
Review Batch
bash
curl -X GET https://api.paystream.fi/api/v1/batches/batch_123 \
-H "Authorization: Bearer psk_test_xxx"Release Batch
bash
curl -X POST https://api.paystream.fi/api/v1/batches/batch_123/release \
-H "Authorization: Bearer psk_test_xxx"Limits
| Limit | Value |
|---|---|
| Max payments per batch | 1,000 |
| Max batch amount | $1,000,000 |
Webhook Events
Batch processing emits these events:
batch.createdbatch.releasedbatch.completedbatch.failed
Each payment in the batch also emits individual payment events.