Create a Payout Batch
curl --request POST \
  --url https://api.dots.dev/api/v2/payout-batches \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
    {
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "amount": 1000,
      "platform": "paypal",
      "idempotency_key": "b2c3d4e5-f6g7-h8i9-j0k1-l2m3n4o5p6q7",
      "fund": true,
      "tax_exempt": false,
      "metadata": {
        "invoice_id": "INV-123"
      }
    },
    {
      "user_id": "b269451c-9625-5452-c9db-171ee559b2b6",
      "amount": 2500,
      "platform": "ach",
      "account_id": "c369451c-a725-6552-d0ec-272ff669c3c7",
      "idempotency_key": "c3d4e5f6-g7h8-i9j0-k1l2-m3n4o5p6q7r8",
      "fund": true,
      "tax_exempt": false
    }
  ],
  "metadata": {
    "batch_type": "weekly_payouts",
    "week": "2024-01"
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "2023-11-07T05:31:56Z",
  "idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "metadata": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request to create a batch of payouts

items
payout-batch-request-item · object[]
required

List of individual payouts to create in the batch.

Required array length: 1 - 5000 elements
idempotency_key
string<uuid>

UUID that will be used to idempotently handle the batch request. Batches with existing idempotency keys will be rejected.

metadata

Set of key-value pairs that you can attach to the batch. This can be useful for storing additional information about the batch in a structured format.

Response

200 - application/json

OK

The created payout batch.

id
string<uuid>
required

Unique identifier for the payout batch.

created
string<date-time>
required

Timestamp when the batch was created.

status
enum<string>
required

Current status of the batch processing.

Available options:
pending,
processing,
completed
idempotency_key
string<uuid>

The idempotency key provided when creating the batch.

metadata

The metadata attached to the batch.