Skip to content

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

StateDescription
draftBatch created, not yet reviewed
heldAwaiting release
processingPayments being processed
completedAll payments completed
failedOne 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

LimitValue
Max payments per batch1,000
Max batch amount$1,000,000

Webhook Events

Batch processing emits these events:

  • batch.created
  • batch.released
  • batch.completed
  • batch.failed

Each payment in the batch also emits individual payment events.

Released under the MIT License.