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

# Update payment configuration for an organisation



## OpenAPI

````yaml /api-reference/specs/payment.yaml put /config/{payrollConfigId}
openapi: 3.0.3
info:
  title: FlowPayroll Payment API
  description: >-
    Payment Service API for FlowPayroll. Generates and serves BACS (Standard 18,
    Barclays CSV/TXT, Allica) payment files for completed pay runs, manages
    per-organisation payment configuration, and handles retry of failed
    payment-file generation.
  version: 0.1.0
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/payment
security:
  - XAuthToken: []
    XOrgId: []
tags:
  - name: PaymentFile
    description: >-
      Generated BACS payment file for a completed pay run. Status transitions:
      GENERATED | PARTIAL_SUCCESS | FAILED → (admin retries) RETRYING →
      GENERATED | PARTIAL_SUCCESS | FAILED. PARTIAL_SUCCESS means the file was
      generated for the employees that passed BACS validation AND
      `failure.affectedEmployees` lists the ones that need attention. When
      status is FAILED, no file was generated; `failure.affectedEmployees` lists
      every employee blocking the file. The UI can render affected employees
      with anchors to their profiles in both PARTIAL_SUCCESS and FAILED states.
  - name: AvailablePaymentConfig
    description: >-
      List of BACS payment methods and formats available for an organisation to
      configure.
  - name: OrganisationPaymentConfig
    description: >-
      Per-organisation payment configuration. Stores the BACS source bank
      account, service user number, and which (method, format, file-format)
      combination drives payment file generation for that org's completed pay
      runs.
paths:
  /config/{payrollConfigId}:
    put:
      tags:
        - OrganisationPaymentConfig
      summary: Update payment configuration for an organisation
      operationId: updateOrganisationPaymentConfig
      parameters:
        - name: payrollConfigId
          in: path
          required: true
          schema:
            type: string
          example: org-payroll-123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePaymentConfigRequest'
      responses:
        '200':
          description: Payment Configuration Updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResponseBody'
                  - type: object
                    properties:
                      content:
                        type: object
                        properties:
                          data:
                            $ref: '#/components/schemas/PaymentConfigResponse'
                          metadata:
                            $ref: '#/components/schemas/ContentMetadataResponse'
              example:
                message:
                  text: Payment configuration updated successfully
                  token: updateOrganisationPaymentConfigSuccess
                  tokenArguments: []
                content:
                  data:
                    method: BACS
                    format: Barclays
                    fileFormat: txt
                    reference: Updated Payroll June 2024
                    referenceDateFormat: DMY_COMPACT
                    payrollConfigId: org-payroll-123
                    bacs:
                      sortCode: 12-34-56
                      accountNumber: '87654321'
                      serviceUserNumber: SUN123
                    createdDate: '2024-05-01T12:00:00Z'
                    createdBy: user-123
                    updatedDate: '2024-06-10T12:00:00Z'
                    updatedBy: user-789
                  metadata:
                    dateFormat: yyyy-MM-dd
                    dateTimeFormat: yyyy-MM-ddTHH:mm:ss.fffZ
                    paginationToken: null
                validationIssues: []
                messageToken: updateOrganisationPaymentConfigSuccess
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
components:
  schemas:
    UpdatePaymentConfigRequest:
      type: object
      properties:
        method:
          type: string
          example: BACS
        format:
          type: string
          example: Barclays
        fileFormat:
          type: string
          description: >-
            Optional. Omit to keep the current stored value. When set, must be
            txt or csv (if csv is supported for this method/format).
          default: txt
          example: csv
        reference:
          type: string
          nullable: true
          description: >-
            Single reference expression. Supports static text and tokens in any
            order: {payDate}, {payPeriodStart}, {payPeriodEnd}, {year},
            {period}, {frequency}, {separator:space}, {separator:dash},
            {separator:underscore}, {separator:slash},
            {separator:custom:<value>}.
          example: Payroll May 2024
        referenceDateFormat:
          type: string
          nullable: true
          default: DMY_SLASH
          enum:
            - DMY_COMPACT
            - DMY_SLASH
            - YMD_DASH
            - MDY_SLASH
            - DMY_DASH
            - DMY_DOT
          description: >-
            Optional date format enum applied to date tokens ({payDate},
            {payPeriodStart}, {payPeriodEnd}). If omitted, the system defaults
            to DMY_SLASH(01/02/2026). Supported values: DMY_COMPACT(01022026),
            DMY_SLASH(01/02/2026), YMD_DASH(2026-02-01), MDY_SLASH(02/01/2026),
            DMY_DASH(01-02-2026), DMY_DOT(01.02.2026).
          example: DMY_SLASH
        bacs:
          $ref: '#/components/schemas/BACSPaymentConfigRequest'
      required:
        - method
        - format
      example:
        method: BACS
        format: Barclays
        reference: Salary{separator:space}{payDate}{separator:dash}{period}
        referenceDateFormat: DMY_COMPACT
        bacs:
          sortCode: 12-34-56
          accountNumber: '87654321'
          serviceUserNumber: SUN123
    ResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          type: object
          properties:
            data:
              type: object
              nullable: true
            metadata:
              type: object
              nullable: true
              properties:
                dateFormat:
                  type: string
                  default: yyyy-MM-dd
                dateTimeFormat:
                  type: string
                  default: yyyy-MM-ddTHH:mm:ss.fffZ
                paginationToken:
                  type: string
                  nullable: true
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
        messageToken:
          type: string
    PaymentConfigResponse:
      type: object
      properties:
        method:
          type: string
          example: BACS
        format:
          type: string
          example: Barclays
        fileFormat:
          type: string
          description: >-
            Always present on read. txt (fixed-width) or csv when supported for
            this method/format.
          example: txt
        reference:
          type: string
          nullable: true
          description: >-
            Single reference expression. Supports static text and tokens in any
            order: {payDate}, {payPeriodStart}, {payPeriodEnd}, {year},
            {period}, {frequency}, {separator:space}, {separator:dash},
            {separator:underscore}, {separator:slash},
            {separator:custom:<value>}.
          example: Payroll May 2024
        referenceDateFormat:
          type: string
          nullable: true
          default: DMY_SLASH
          enum:
            - DMY_COMPACT
            - DMY_SLASH
            - YMD_DASH
            - MDY_SLASH
            - DMY_DASH
            - DMY_DOT
          description: >-
            Optional date format enum applied to date tokens ({payDate},
            {payPeriodStart}, {payPeriodEnd}). If omitted, the system defaults
            to DMY_SLASH(01/02/2026). Supported values: DMY_COMPACT(01022026),
            DMY_SLASH(01/02/2026), YMD_DASH(2026-02-01), MDY_SLASH(02/01/2026),
            DMY_DASH(01-02-2026), DMY_DOT(01.02.2026).
          example: DMY_SLASH
        payrollConfigId:
          type: string
          nullable: true
          example: org-payroll-123
        bacs:
          $ref: '#/components/schemas/BACSPaymentConfigResponse'
        createdDate:
          type: string
          format: date-time
          example: '2024-05-01T12:00:00Z'
        createdBy:
          type: string
          example: user-123
        updatedDate:
          type: string
          format: date-time
          nullable: true
          example: '2024-05-10T12:00:00Z'
        updatedBy:
          type: string
          nullable: true
          example: user-456
      required:
        - method
        - format
        - fileFormat
        - createdDate
        - createdBy
      example:
        method: BACS
        format: Barclays
        fileFormat: txt
        reference: Payroll May 2024
        referenceDateFormat: DMY_COMPACT
        payrollConfigId: org-payroll-123
        bacs:
          sortCode: 12-34-56
          accountNumber: '12345678'
          serviceUserNumber: SUN123
        createdDate: '2024-05-01T12:00:00Z'
        createdBy: user-123
        updatedDate: '2024-05-10T12:00:00Z'
        updatedBy: user-456
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
          default: yyyy-MM-dd
          example: yyyy-MM-dd
        dateTimeFormat:
          type: string
          default: yyyy-MM-ddTHH:mm:ss.fffZ
          example: yyyy-MM-ddTHH:mm:ss.fffZ
        paginationToken:
          type: string
          nullable: true
          example: null
      example:
        dateFormat: yyyy-MM-dd
        dateTimeFormat: yyyy-MM-ddTHH:mm:ss.fffZ
        paginationToken: null
    BACSPaymentConfigRequest:
      type: object
      properties:
        sortCode:
          type: string
          example: 12-34-56
        accountNumber:
          type: string
          example: '12345678'
        serviceUserNumber:
          type: string
          nullable: true
          example: SUN123
        accountName:
          type: string
          nullable: true
          description: >-
            Originating account name for Bacs Standard 18 files. Populates field
            9 (positions 47-64) in payment records. Max 18 characters. Optional.
          example: ACME CORP LTD
      required:
        - sortCode
        - accountNumber
      example:
        sortCode: 12-34-56
        accountNumber: '12345678'
        serviceUserNumber: SUN123
        accountName: ACME CORP LTD
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
    ValidationIssue:
      type: object
      description: >
        Field validation item. `reasonToken` is a stable snake_case key for i18n
        or custom client messages; `reason` is the default English text from the
        API.
      properties:
        field:
          type: string
          description: Dot-path of the field (e.g. name.firstName, address.line1).
        reason:
          type: string
          description: Default human-readable message.
        reasonToken:
          type: string
          description: Machine-readable error identifier (snake_case).
        reasonTokenArguments:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
    BACSPaymentConfigResponse:
      type: object
      properties:
        sortCode:
          type: string
          example: 12-34-56
        accountNumber:
          type: string
          example: '12345678'
        serviceUserNumber:
          type: string
          nullable: true
          example: SUN123
        accountName:
          type: string
          nullable: true
          description: >-
            Originating account name for Bacs Standard 18 files. Populates field
            9 (positions 47-64) in payment records. Max 18 characters. Optional.
          example: ACME CORP LTD
      required:
        - sortCode
        - accountNumber
      example:
        sortCode: 12-34-56
        accountNumber: '12345678'
        serviceUserNumber: SUN123
        accountName: ACME CORP LTD
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Access token obtained from OAuth2 client credentials flow
    XOrgId:
      type: apiKey
      in: header
      name: X-Org-Id
      description: >-
        Organisation to scope the request to. Required when the principal can
        access more than one organisation; optional for single-organisation
        principals (the authorizer resolves it automatically).

````