# Payout request batch created

`POST payout-request-batch-created`

> This is a subset of the full specification, limited to the `POST payout-request-batch-created` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `POST payout-request-batch-created` operation.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: Transactions
    description: |-
      Use these operations to:
        - set up payment instruments for payments
        - authorize and hold funds
        - capture funds
        - make payments
        - make payouts
        - refund transactions.
x-tagGroups:
  - name: Payments
    tags:
      - Transactions
paths: {}
webhooks:
  payout-request-batch-created:
    post:
      summary: Payout request batch created
      operationId: payout-request-batch-created
      x-products:
        - Core
      tags:
        - Transactions
      requestBody:
        $ref: '#/components/requestBodies/PayoutRequestBatchWebhook'
      responses:
        2xx:
          description: Returns any 2xx status to indicate that data is received.
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  schemas:
    CreatedTime:
      type: string
      description: |-
        Date and time when the resource is created.
        This value is set automatically when the resource is created.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Creation Time
    UpdatedTime:
      type: string
      description: |-
        Date and time when the resource is updated.
        This value is set automatically when the resource is updated.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Last Update Time
    OrganizationId:
      type: string
      description: |-
        Unique organization identifier.
        An organization is an entity that represents a company.
        For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: org_0YVDM8RC7GDADADSBSMW124JA8
    CurrencyCode:
      type: string
      description: Currency code in ISO 4217 format.
      minLength: 3
      maxLength: 3
      example: USD
      x-label: Currency
    PayoutRequestBatch:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the batch.
          maxLength: 50
          example: prb_0YVDMDE2BMC6KBB5MX76RF6T80
        organizationId:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/OrganizationId'
        userId:
          type: string
          readOnly: true
          description: ID of the user who created the batch.
          maxLength: 50
          example: usr_0YVCEENYJ3D7Q9EN6BN16HA0G4
        user:
          description: Creator of the batch.
          readOnly: true
          type: object
          required:
            - id
            - name
          properties:
            id:
              description: User ID of the creator.
              type: string
              maxLength: 50
              example: usr_0YVCEENYJ3D7Q9EN6BN16HA0G4
            name:
              description: First and last name of the creator.
              type: string
              example: John Doe
        totalCount:
          description: Total number of payout requests in the batch.
          type: integer
          readOnly: true
          minimum: 0
          example: 10
        customerCount:
          description: Number of unique customers in the batch.
          type: integer
          readOnly: true
          minimum: 0
          example: 3
        totalAmountByCurrency:
          description: Total payout amount grouped by currency in the batch.
          type: array
          readOnly: true
          items:
            type: object
            additionalProperties: false
            required:
              - currency
              - amount
            properties:
              currency:
                $ref: '#/components/schemas/CurrencyCode'
              amount:
                type: number
        name:
          description: |-
            Name that is used to identify the batch.
            This value is `null` if the batch has no name.
          type:
            - string
            - 'null'
          maxLength: 255
          example: Weekly CAD payouts
        description:
          description: Optional description of the batch.
          type:
            - string
            - 'null'
          maxLength: 255
          example: Batch processed on 2024-01-15
        allocationOrder:
          description: |-
            Order for auto-allocation of payout requests in this batch.
            When set, this field overrides the organization-level allocation order during batch auto-allocation.
            Must contain `selected-payment-instrument` exactly once.
            Valid values: `payment-card` (payment cards), `alternative-payment-methods` (catch-all for alternative payment methods), `selected-payment-instrument` (customer-requested instrument), or any payment method API name (for example, `paypal`, `Interac-eTransfer`).
          type:
            - array
            - 'null'
          items:
            type: string
          minItems: 2
          maxItems: 25
          uniqueItems: true
          example:
            - paypal
            - Interac-eTransfer
            - payment-card
            - alternative-payment-methods
            - selected-payment-instrument
        createdTime:
          description: Date and time when the batch was created.
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          description: Date and time when the batch was last updated.
          $ref: '#/components/schemas/UpdatedTime'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - payoutRequests
  requestBodies:
    PayoutRequestBatchWebhook:
      content:
        application/json:
          schema:
            type: object
            required:
              - batchId
              - eventType
              - occurredTime
              - _embedded
              - _links
            properties:
              batchId:
                description: ID of the batch of payout requests.
                type: string
                maxLength: 50
                example: preq_batch_0YVDMDE2BMC6KBB5MX76RF6T80
              eventType:
                description: Type of event that triggered the webhook.
                type: string
                enum:
                  - payout-request-batch-created
                  - payout-request-batch-modified
              occurredTime:
                description: Date and time when the batch change occurred.
                type: string
                format: date-time
              _embedded:
                type: object
                description: Embedded objects related to the batch event for payout requests.
                required:
                  - payoutRequestBatch
                properties:
                  payoutRequestBatch:
                    $ref: '#/components/schemas/PayoutRequestBatch'
              _links:
                type: array
                description: Links to related resources.
                items:
                  type: object
                  required:
                    - href
                    - rel
                  properties:
                    href:
                      description: URL of the link.
                      type: string
                    rel:
                      description: Type of relationship for the link.
                      type: string
                      enum:
                        - payoutRequestBatch
      description: Payload of a webhook event for a batch of payout requests.
```
