DotsDocs
Payout batches

Create a Payout Batch

Create a batch of payouts to multiple users. Each payout in the batch is processed independently with its own idempotency key. The batch itself can also have an idempotency key to prevent duplicate batch submissions. All payouts in a batch must have `fund=true`.

POST
/v2/payout-batches

Create a batch of payouts to multiple users. Each payout in the batch is processed independently with its own idempotency key. The batch itself can also have an idempotency key to prevent duplicate batch submissions. All payouts in a batch must have fund=true.

Authorization

api_key
headerAuthorizationBasic <token>

Request Body

application/json
  1. body

Request to create a batch of payouts

items*array<>

List of individual payouts to create in the batch.

Items1 <= items <= 500
idempotency_key?string

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

Formatuuid
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 Body

OK

application/json
  1. response

The created payout batch.

id*string

Unique identifier for the payout batch.

Formatuuid
created*string

Timestamp when the batch was created.

Formatdate-time
idempotency_key?string

The idempotency key provided when creating the batch.

Formatuuid
status*string

Current status of the batch processing.

Value in"created""processing""paying_out""completed""failed"
metadata?|

The metadata attached to the batch.

Example Request
curl -X POST 'https://api.dots.dev/api/v2/payout-batches' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",      "amount": 1000,      "platform": "paypal",      "idempotency_key": "b2c3d4e5-f6a7-48b9-80c1-d2e3f4a5b6c7",      "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-a7b8-49c0-91d2-e3f4a5b6c7d8",      "fund": true,      "tax_exempt": false    }  ],  "metadata": {    "batch_type": "weekly_payouts",    "week": "2024-01"  }}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "created": "2019-08-24T14:15:22Z",  "idempotency_key": "0cd90e5a-2c03-4ab6-81a8-d48818026e58",  "status": "created",  "metadata": "string"}