> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ebury.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch mass payments

Fetch the mass payments of a client, optionally filtered

The MassPaymentStatus field will provide the latest status whether processing is complete or still running. API consumers can retrieve a mass payment using an external\_reference\_id provided at the time of the mass payment submission.


## OpenAPI

````yaml https://api.ebury.io/openapi.json get /mass-payments
openapi: 3.0.0
info:
  description: |
    Ebury API allows customers:
      to retrieve accounts, balances, beneficiaries, and transactions;
      to get buy/sell estimates and quotes, book trades and retrieve trade history;
      to allocate payments to a trade and beneficiary, and to submit payments in bulk;
      to download documents such as trade receipt, payment instruction and payment receipt;
      to manage the authorised persons on their account.
    The Metadata API allows applications to clarify some parts of the Ebury API
      that are impractical to express schematically.
  termsOfService: https://docs.ebury.io/#terms-of-use
  title: Ebury API
  version: '0.1'
servers:
  - url: https://{environment}.ebury.io
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox
security: []
paths:
  /mass-payments:
    get:
      tags:
        - Multi Payments
      summary: Fetch mass payments
      description: Fetch the mass payments of a client, optionally filtered
      parameters:
        - $ref: '#/components/parameters/ClientId'
        - $ref: '#/components/parameters/Authorization'
        - description: Filter by mass payment ID
          in: query
          name: mass_payment_id
          required: false
          schema:
            type: string
            format: uuid
        - description: Filter by the external reference of the mass payment
          in: query
          name: external_reference_id
          required: false
          schema:
            type: string
            minLength: 1
        - description: Filter by the sell currency of the mass payment
          in: query
          name: sell_currency
          required: false
          schema:
            type: string
            pattern: ^[A-Z]{3}$
        - description: The desired page number for pagination. By default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
            format: int32
        - description: The number of items per page for pagination. By default is 50.
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: List of mass payments
          headers:
            x-total-count:
              description: Total number of mass payments available
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMassPaymentsResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Invalid mass payment id
        '429':
          description: Too many requests
        '502':
          $ref: '#/components/responses/IntegrationError'
components:
  parameters:
    ClientId:
      description: The identifier of a client.
      in: query
      name: client_id
      required: true
      schema:
        type: string
    Authorization:
      description: The access token.
      in: header
      name: Authorization
      required: true
      schema:
        type: string
  schemas:
    GetMassPaymentsResponse:
      items:
        $ref: '#/components/schemas/GetMassPaymentItem'
      type: array
    GetMassPaymentItem:
      properties:
        mass_payment_id:
          description: The UUID of the MassPayment
          type: string
          format: uuid
        external_reference_id:
          description: External reference of the mass payment
          type: string
        error:
          $ref: '#/components/schemas/ErrorMessage'
        mass_payment_status:
          $ref: '#/components/schemas/EnumMassPaymentStatus'
        sell_currency:
          description: Sell currency
          type: string
        trades_created:
          description: Number of trades created
          type: number
        payments_summary:
          $ref: '#/components/schemas/PaymentsSummaryGetMassPaymentItem'
        links:
          $ref: '#/components/schemas/LinksGetMassPaymentItem'
      type: object
    ErrorMessage:
      description: An error message.
      properties:
        code:
          type: string
          description: The code for the error.
        details:
          description: Error details
          type: string
        message:
          type: string
          description: A short description of the cause of the error.
      required:
        - code
        - message
        - details
      type: object
    EnumMassPaymentStatus:
      description: This is an enumeration of the status of a MassPayment
      enum:
        - Queued for processing
        - Processing
        - Processed
        - Queued for creating
        - Creating
        - Created
        - Cancelled
        - Failed
      type: string
    PaymentsSummaryGetMassPaymentItem:
      properties:
        payments_received:
          description: Payments received count
          type: number
        payments_processed:
          description: Payments processed count
          type: number
        payments_errored:
          description: Payment errored count
          type: number
        payments_created:
          description: Funding created count
          type: number
      type: object
    LinksGetMassPaymentItem:
      properties:
        payments_errored_href:
          description: Payments errored URL
          type: string
        payments_created_href:
          description: Payments created URL
          type: string
        trades_href:
          description: Payment trades URL
          type: string
        funding_account_href:
          description: Funding account URL
          type: string
      type: object
  responses:
    ValidationError:
      description: >-
        Formatting, parameter or schema validation error. See error message for
        further details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    Unauthorized:
      description: Access denied due to authentication failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    Forbidden:
      description: >-
        Could not complete action due to data constraints. Refer to error
        message for additional details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    IntegrationError:
      description: Internal integration error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'

````