---
updatedAt: 2026-04-20T19:14:03.000Z
agentTools:
  projectIndex: https://docs.paymentlabs.io/llms.txt
---

# Create Batch

Creates a batch: a named group of payments that share a payment category, a tax jurisdiction and payout rules.

Create a batch before you create payments, with Create Payment or an import. A batch has no status of its own; you send its
payments with Submit Batch, Submit Payments or Submit Payment. Its totals fill in shortly after its payments change.

Requires the **Write** permission.

**Duplicates.** This operation is not idempotent and `referenceId` is not unique: a retried request creates a second batch. If
a request times out, look for your `referenceId` with Search Batches before retrying.

**Side effects.** The `batch-created` webhook fires.

**Errors**
- `400 VALIDATION_ERROR` on `taxJurisdiction`: it is not enabled on your account, or it is missing and your account has several jurisdictions.
- `400 VALIDATION_ERROR` on `deniedCountries`: a value is not an ISO 3166-1 alpha-2 country code.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payout API Specification",
    "version": "0.0.1",
    "description": "Describes the operations a Payor can do to manage payments"
  },
  "paths": {
    "/batches": {
      "post": {
        "operationId": "Create Batch Endpoint",
        "tags": [
          "Batch"
        ],
        "description": "Creates a batch: a named group of payments that share a payment category, a tax jurisdiction and payout rules.\n\nCreate a batch before you create payments, with Create Payment or an import. A batch has no status of its own; you send its\npayments with Submit Batch, Submit Payments or Submit Payment. Its totals fill in shortly after its payments change.\n\nRequires the **Write** permission.\n\n**Duplicates.** This operation is not idempotent and `referenceId` is not unique: a retried request creates a second batch. If\na request times out, look for your `referenceId` with Search Batches before retrying.\n\n**Side effects.** The `batch-created` webhook fires.\n\n**Errors**\n- `400 VALIDATION_ERROR` on `taxJurisdiction`: it is not enabled on your account, or it is missing and your account has several jurisdictions.\n- `400 VALIDATION_ERROR` on `deniedCountries`: a value is not an ISO 3166-1 alpha-2 country code.",
        "summary": "Create Batch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Body of Create Batch.",
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Name of the batch. Payees see it as the default message on its payments.",
                    "example": "October tournament prizes",
                    "type": "string",
                    "title": "name"
                  },
                  "referenceId": {
                    "description": "Your own identifier for the batch, such as the payout run ID in your system. Free text. It is not unique: Payment Labs accepts\na second batch with the same value, so it does not protect you from duplicates.",
                    "example": "run-2026-10",
                    "type": "string",
                    "title": "referenceId"
                  },
                  "defaultPaymentCategory": {
                    "$ref": "#/components/schemas/CustomerPaymentType",
                    "description": "Category given to payments created in the batch when they do not set their own. It decides the tax treatment together with the jurisdiction.",
                    "title": "defaultPaymentCategory"
                  },
                  "taxJurisdiction": {
                    "$ref": "#/components/schemas/TaxJurisdiction",
                    "description": "Tax jurisdiction for the batch's payments. Must be one enabled on your account, or `none`. Required when your account has\nseveral jurisdictions; otherwise it defaults to your only jurisdiction, or to `none` when you have none. It cannot be changed\nafter the batch is created.",
                    "title": "taxJurisdiction"
                  },
                  "allowedPaymentMethods": {
                    "description": "Payout methods the batch's payees may receive its payments on. Omit it to allow every method enabled on your account.",
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PaymentMethodType"
                    },
                    "title": "allowedPaymentMethods"
                  },
                  "deniedCountries": {
                    "description": "Countries the batch must not pay into, as ISO 3166-1 alpha-2 codes. A payment whose payee lives in one of them becomes\n`RESTRICTED` and is not sent.",
                    "example": [
                      "CU",
                      "IR"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "deniedCountries"
                  },
                  "archived": {
                    "description": "Create the batch already archived.",
                    "default": false,
                    "type": "boolean",
                    "title": "archived"
                  }
                },
                "required": [
                  "defaultPaymentCategory",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The batch was created. The `Location` header holds its path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchDto"
                }
              }
            }
          },
          "400": {
            "description": "One or more fields in the request are missing or invalid. `details` maps each failing field (a dotted path for nested\nfields) to the list of rules it broke. Fix every listed field before retrying.\n\nExample: `{\"code\": \"VALIDATION_ERROR\", \"message\": \"There have been validation errors\", \"details\": {\"email\": [{\"code\": \"MISSING_REQUIRED_FIELD\", \"message\": \"email is required\"}]}}`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ],
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable summary.",
                      "type": "string",
                      "title": "message"
                    },
                    "details": {
                      "description": "Failing fields, each with the list of rules it broke.",
                      "type": "object",
                      "title": "details"
                    }
                  },
                  "required": [
                    "code",
                    "details",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The request has no valid access token. Get a new token from `POST /login` and send it as `Authorization: Bearer <token>`.\n\nCodes: `UNAUTHORIZED_NO_TOKEN` (no `Authorization` header), `UNAUTHORIZED_INVALID_TOKEN` (expired or malformed token),\n`UNAUTHORIZED_NO_CONTEXT` (the token does not belong to a payor or merchant), `UNAUTHORIZED_NO_PAYOR` (the token gives access\nto more than one payor and the request did not send `x-payor-id`). A few endpoints answer from the API gateway instead and\nreturn only `{\"message\": \"Unauthorized\"}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Machine-readable reason. Absent when the API gateway rejects the request.",
                      "enum": [
                        "UNAUTHORIZED_INVALID_TOKEN",
                        "UNAUTHORIZED_NO_CONTEXT",
                        "UNAUTHORIZED_NO_PAYOR",
                        "UNAUTHORIZED_NO_TOKEN"
                      ],
                      "type": "string",
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but is not allowed to perform this operation.\n\nCodes: `FORBIDDEN_INSUFFICIENT_TAGS` (your credential's role does not allow this operation), `FORBIDDEN_CONDITION_NOT_MET`\n(the payment amount is above your approval limit). Some endpoints add their own codes; they are listed in the endpoint\ndescription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Machine-readable reason.",
                      "type": "string",
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "The request body is not valid JSON, or is not a JSON object. Send `Content-Type: application/json` with a JSON object body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "INVALID_BODY"
                      ],
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.paymentlabs.io",
      "description": "Sandbox Server"
    },
    {
      "url": "https://api.paymentlabs.io",
      "description": "Production Server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerToken": {
        "scheme": "bearer",
        "type": "http",
        "bearerFormat": "JWT",
        "description": "Bearer Token using JWT"
      }
    },
    "schemas": {
      "CustomerPaymentType": {
        "description": "Category of a payment: what the payee is paid for. Together with the tax jurisdiction it decides tax withholding and reporting. Categories ending in `-prize` are prizes, split by online or in-person events; `remote-contractors` and `in-person-contractors` are contractor fees; `reimbursement` repays expenses; `royalties` are royalties.",
        "title": "CustomerPaymentType",
        "enum": [
          "athlete-prize",
          "in-person-contest-prize",
          "in-person-contractors",
          "in-person-esport-prize",
          "in-person-esport-prize-out-of-jurisdiction",
          "in-person-misc-prize",
          "online-contest-prize",
          "online-esport-prize",
          "online-misc-prize",
          "reimbursement",
          "remote-contractors",
          "royalties"
        ],
        "type": "string"
      },
      "TaxJurisdiction": {
        "title": "TaxJurisdiction",
        "enum": [
          "de",
          "fi",
          "gb",
          "my",
          "none",
          "pl",
          "sa",
          "se",
          "us"
        ],
        "type": "string",
        "description": "Tax jurisdiction whose rules apply to a payment, as a lower-case country code: `us`, `gb`, `de`, `fi`, `pl`, `se`, `sa`, `my`; or `none` for no tax treatment. Only jurisdictions enabled on your account are accepted."
      },
      "PaymentMethodType": {
        "title": "PaymentMethodType",
        "enum": [
          "bank-transfer-1",
          "bank-transfer-2",
          "bank-transfer-3",
          "bank-transfer-4",
          "bank-transfer-5",
          "e-gift-card-1",
          "paper-check-1",
          "paypal",
          "prepaid-debit-card-1",
          "push-to-debit-card-1",
          "venmo",
          "virtual-payment-1",
          "wallet-1-astrapay",
          "wallet-1-bigpay",
          "wallet-1-bkash",
          "wallet-1-dana",
          "wallet-1-daviplata",
          "wallet-1-easypaisa",
          "wallet-1-finja",
          "wallet-1-gcash",
          "wallet-1-gopay",
          "wallet-1-grabpay",
          "wallet-1-hellocash",
          "wallet-1-imkas",
          "wallet-1-jazzcash",
          "wallet-1-linkaja",
          "wallet-1-momo",
          "wallet-1-mpesa",
          "wallet-1-nagad",
          "wallet-1-nayapay",
          "wallet-1-nequi",
          "wallet-1-ovo",
          "wallet-1-paymaya",
          "wallet-1-sadapay",
          "wallet-1-shopeepay",
          "wallet-1-smartcash-airtel",
          "wallet-1-telebirr",
          "wallet-1-tng-digital",
          "wallet-1-vnpay",
          "wallet-1-vnpt-pay",
          "wallet-1-zalopay"
        ],
        "type": "string",
        "description": "Type of payout method a payee receives money on: `bank-transfer-1` to `bank-transfer-5` (bank transfers on different networks and regions), `paypal`, `venmo`, `push-to-debit-card-1` (instant transfer to a debit card), `prepaid-debit-card-1`, `e-gift-card-1`, `wallet-1-<name>` (a mobile wallet in the payee's country, such as `wallet-1-gcash`), and `virtual-payment-1` (used only by virtual payments). Handle values you do not know: new methods are added over time."
      },
      "BatchDto": {
        "title": "BatchDto",
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the batch: `B-` followed by 26 characters.",
            "type": "string",
            "title": "id"
          },
          "payorId": {
            "description": "Your payor ID.",
            "type": "string",
            "title": "payorId"
          },
          "referenceId": {
            "description": "Your own identifier for the batch, as you sent it. Not unique.",
            "type": "string",
            "title": "referenceId"
          },
          "name": {
            "description": "Name of the batch. Payees see it as the default message on its payments.",
            "type": "string",
            "title": "name"
          },
          "taxJurisdiction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxJurisdiction"
              }
            ],
            "description": "Tax jurisdiction of the batch's payments. Set at creation; cannot be changed."
          },
          "defaultPaymentCategory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerPaymentType"
              }
            ],
            "description": "Category given to new payments in the batch that do not set their own."
          },
          "archived": {
            "description": "`true` when the batch is archived: it accepts no new payments, submissions or changes until unarchived.",
            "type": "boolean",
            "title": "archived"
          },
          "auditInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AuditInfo"
              }
            ],
            "description": "Who created and last changed the batch, and when."
          },
          "onboarded": {
            "description": "Share of the batch's payees who can be paid, from `0` to `1`.",
            "type": "number",
            "title": "onboarded"
          },
          "totalAmount": {
            "description": "Sum of all payments in the batch, one entry per currency.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Money"
            },
            "title": "totalAmount"
          },
          "totalPaid": {
            "description": "Sum of the batch's paid payments, one entry per currency.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Money"
            },
            "title": "totalPaid"
          },
          "totalCancelled": {
            "description": "Sum of the batch's cancelled payments, one entry per currency.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Money"
            },
            "title": "totalCancelled"
          },
          "totalUnpaid": {
            "description": "Sum of the batch's payments not yet paid, one entry per currency.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Money"
            },
            "title": "totalUnpaid"
          },
          "totalPayableNow": {
            "description": "Sum of the batch's unpaid payments whose payee can be paid now, one entry per currency.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Money"
            },
            "title": "totalPayableNow"
          },
          "numberOfPayments": {
            "description": "Number of payments in the batch.",
            "type": "number",
            "title": "numberOfPayments"
          },
          "numberOfPayableNowPayments": {
            "description": "Number of unpaid payments whose payee can be paid now.",
            "type": "number",
            "title": "numberOfPayableNowPayments"
          },
          "numberOfPaidPayments": {
            "description": "Number of paid payments.",
            "type": "number",
            "title": "numberOfPaidPayments"
          },
          "numberOfUnpaidPayments": {
            "description": "Number of payments not yet paid.",
            "type": "number",
            "title": "numberOfUnpaidPayments"
          },
          "numberOfCancelledPayments": {
            "description": "Number of cancelled payments.",
            "type": "number",
            "title": "numberOfCancelledPayments"
          },
          "allowedPaymentMethods": {
            "description": "Payout methods the batch's payees may receive its payments on. Absent when every method enabled on your account is allowed.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodType"
            },
            "title": "allowedPaymentMethods"
          },
          "deniedCountries": {
            "description": "Countries the batch must not pay into, as ISO 3166-1 alpha-2 codes. Payments to payees in them are `RESTRICTED`.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "deniedCountries"
          },
          "paymentsSummary": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BatchPaymentsSummary"
              }
            ],
            "description": "Amounts and counts of the batch's payments, grouped by state and currency."
          }
        },
        "required": [
          "auditInfo",
          "defaultPaymentCategory",
          "name"
        ],
        "description": "A batch: a named group of payments that share a payment category, a tax jurisdiction and payout rules."
      },
      "AuditInfo": {
        "description": "Who created and last changed the record, and when.",
        "title": "AuditInfo",
        "type": "object",
        "properties": {
          "createdBy": {
            "description": "ID of the user or API credential that created the record.",
            "type": "string",
            "title": "createdBy"
          },
          "updatedBy": {
            "description": "ID of the user or API credential that last changed the record.",
            "type": "string",
            "title": "updatedBy"
          },
          "updatedAt": {
            "description": "When the record was last changed, in ISO 8601 UTC.",
            "format": "date-time",
            "type": "string",
            "title": "updatedAt"
          },
          "createdAt": {
            "description": "When the record was created, in ISO 8601 UTC.",
            "format": "date-time",
            "type": "string",
            "title": "createdAt"
          }
        }
      },
      "Money": {
        "description": "An amount of money in one currency, given both as a decimal and in minor units.",
        "title": "Money",
        "type": "object",
        "properties": {
          "value": {
            "description": "Amount as a decimal number in the currency's major unit: `12.5` is twelve and a half US dollars. Use `wholeValue` when you need exact arithmetic.",
            "type": "number",
            "title": "value"
          },
          "currency": {
            "description": "Currency, as an ISO 4217 code such as `USD`.",
            "type": "string",
            "title": "currency"
          },
          "formattedValue": {
            "description": "Amount formatted for display with its currency symbol, for example `$12.50`. For display only; do not parse it.",
            "type": "string",
            "title": "formattedValue"
          },
          "digits": {
            "description": "Number of decimal digits the currency uses: `2` for USD, `0` for JPY.",
            "type": "number",
            "title": "digits"
          },
          "wholeValue": {
            "description": "Amount as an integer in the currency's minor unit, for example cents for USD: `1250` is 12.50 USD. Equals `value` × 10^`digits`.",
            "type": "number",
            "title": "wholeValue"
          }
        },
        "required": [
          "currency",
          "digits",
          "formattedValue",
          "value",
          "wholeValue"
        ]
      },
      "BatchPaymentsSummary": {
        "title": "BatchPaymentsSummary",
        "type": "object",
        "properties": {
          "total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusSummary"
              }
            ],
            "description": "All payments in the batch."
          },
          "paid": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusSummary"
              }
            ],
            "description": "Payments that reached the payee."
          },
          "unpaid": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusSummary"
              }
            ],
            "description": "Payments not yet paid and not cancelled."
          },
          "payableNow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusSummary"
              }
            ],
            "description": "Unpaid payments whose payee can be paid now."
          },
          "cancelled": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusSummary"
              }
            ],
            "description": "Cancelled payments."
          },
          "onboardedPercentage": {
            "type": "number",
            "title": "onboardedPercentage",
            "description": "Share of the batch's payees who can be paid, from `0` to `1`."
          }
        },
        "required": [
          "cancelled",
          "onboardedPercentage",
          "paid",
          "payableNow",
          "total",
          "unpaid"
        ],
        "description": "Amounts and counts of a batch's payments, grouped by state. Updated a few seconds after payments change."
      },
      "PaymentStatusSummary": {
        "title": "PaymentStatusSummary",
        "type": "object",
        "properties": {
          "amount": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Money"
            },
            "title": "amount",
            "description": "Total amount of the payments, one entry per currency."
          },
          "count": {
            "type": "number",
            "title": "count",
            "description": "Number of payments."
          },
          "byCurrency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencySummary"
            },
            "title": "byCurrency",
            "description": "Amount and number of payments, per currency."
          }
        },
        "required": [
          "amount",
          "count"
        ],
        "description": "Amount and number of payments in one group."
      },
      "CurrencySummary": {
        "title": "CurrencySummary",
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "title": "currency",
            "description": "Currency, as an ISO 4217 code."
          },
          "totalAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Sum of the payments in this currency."
          },
          "count": {
            "type": "number",
            "title": "count",
            "description": "Number of payments in this currency."
          }
        },
        "required": [
          "count",
          "currency",
          "totalAmount"
        ],
        "description": "Amount and number of payments in one currency."
      }
    }
  }
}
```