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

# Update a mass payment

> Update the status of a deferred mass payment to control its processing lifecycle. Set status to `pending` to trigger processing and begin fund transfers, or `cancelled` to permanently cancel the mass payment before processing begins. Only applies to mass payments created with deferred status. Returns the updated mass payment resource with the new status.



## OpenAPI

````yaml post /mass-payments/{id}
openapi: 3.1.0
info:
  title: Dwolla API
  description: Dwolla API Documentation
  contact:
    name: Dwolla Developer Relations Team
    url: https://developers.dwolla.com
    email: api@dwolla.com
  version: '2.0'
  termsOfService: https://www.dwolla.com/legal/tos/
  license:
    name: MIT
    url: https://github.com/Dwolla/dwolla-openapi/blob/master/LICENSE
servers:
  - url: https://api.dwolla.com
    description: Production server
  - url: https://api-sandbox.dwolla.com
    description: Sandbox server
security:
  - clientCredentials: []
tags:
  - name: tokens
    description: Operations related to Application Access Tokens
  - name: root
    description: Root API operations
  - name: accounts
    description: Operations related to Accounts
  - name: customers
    description: Operations related to Customers
  - name: kba
    description: Operations related to Knowledge-Based Authentication
  - name: beneficial owners
    description: Operations related to Beneficial Owners
  - name: documents
    description: Operations related to Documents
  - name: exchanges
    description: Operations related to Exchanges
  - name: exchange sessions
    description: Operations related to Exchange Sessions
  - name: funding sources
    description: Operations related to Funding Sources
  - name: transfers
    description: Operations related to Transfers
  - name: labels
    description: Operations related to Labels
  - name: mass payments
    description: Operations related to Mass Payments
  - name: events
    description: Operations related to Events
  - name: webhook subscriptions
    description: Operations related to Webhook Subscriptions
  - name: webhooks
    description: Operations related to Webhooks
  - name: client tokens
    description: Operations related to Client Tokens
  - name: sandbox simulations
    description: Sandbox-only operations for simulating processing of bank transfers
paths:
  /mass-payments/{id}:
    post:
      tags:
        - mass payments
      summary: Update a mass payment
      description: >-
        Update the status of a deferred mass payment to control its processing
        lifecycle. Set status to `pending` to trigger processing and begin fund
        transfers, or `cancelled` to permanently cancel the mass payment before
        processing begins. Only applies to mass payments created with deferred
        status. Returns the updated mass payment resource with the new status.
      operationId: updateMassPayment
      parameters:
        - name: id
          in: path
          description: ID of mass payment to update
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/Accept'
      requestBody:
        required: true
        description: Parameters for updating a mass payment
        content:
          application/json:
            schema:
              required:
                - status
              type: object
              properties:
                status:
                  type: string
                  example: pending
      responses:
        '200':
          description: successful operation
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                $ref: '#/components/schemas/MassPayment'
        '400':
          description: Bad Request
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '403':
          description: Forbidden
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: Not authorized to update mass payment
        '404':
          description: Not Found
          headers: {}
          content:
            application/vnd.dwolla.v1.hal+json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NotFound
                  message:
                    type: string
                    example: Mass payment not found
      x-codeSamples:
        - lang: bash
          source: >
            POST
            https://api-sandbox.dwolla.com/mass-payments/692486f8-29f6-4516-a6a5-c69fd2ce854c

            Accept: application/vnd.dwolla.v1.hal+json

            Content-Type: application/vnd.dwolla.v1.hal+json

            Authorization: Bearer
            pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY


            {
              "status": "pending"
            }
        - lang: javascript
          source: >
            // Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node

            var massPaymentUrl =
              "https://api-sandbox.dwolla.com/mass-payments/692486f8-29f6-4516-a6a5-c69fd2ce854c";
            var requestBody = {
              status: "pending",
            };


            dwolla.post(massPaymentUrl, requestBody).then((res) =>
            res.body.status); // => "pending"
        - lang: python
          source: >
            # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python

            mass_payment_url =
            'https://api-sandbox.dwolla.com/mass-payments/692486f8-29f6-4516-a6a5-c69fd2ce854c'

            request_body = {
              'status': 'pending'
            }


            mass_payments = app_token.post('mass-payments', request_body)

            mass_payments.body['status'] # => 'pending'
        - lang: php
          source: |
            /**
             *  No example for this language yet. Coming soon.
             **/
        - lang: ruby
          source: >
            # Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby

            mass_payment_url =
            'https://api-sandbox.dwolla.com/mass-payments/692486f8-29f6-4516-a6a5-c69fd2ce854c'

            request_body = {
                  "status" => "pending",
            }


            mass_payment = app_token.post "#{mass_payment_url}", request_body

            mass_payment.status # => "pending"
components:
  parameters:
    Accept:
      name: Accept
      in: header
      required: true
      description: >-
        The media type of the response. Must be
        application/vnd.dwolla.v1.hal+json
      schema:
        type: string
        enum:
          - application/vnd.dwolla.v1.hal+json
        default: application/vnd.dwolla.v1.hal+json
  schemas:
    MassPayment:
      title: MassPayment
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/HalLink'
        id:
          type: string
          example: 11ac4051-7b76-44fc-87ab-ae23012393f0
        status:
          type: string
          example: complete
        created:
          type: string
          format: date-time
          example: '2022-01-20T17:41:41.000Z'
        metaData:
          type: object
        total:
          $ref: '#/components/schemas/TransferAmount'
        totalFees:
          $ref: '#/components/schemas/TransferAmount'
        correlationId:
          type: string
          example: CID-8a2cdc8d-629d-4a24-98ac-40b735229fe2
    BadRequestError:
      title: BadRequestError
      description: Error response schema for 400 Bad Request
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: BadRequest
        message:
          type: string
          example: The request body contains bad syntax or is incomplete.
    HalLink:
      title: HalLink
      type: object
      properties:
        href:
          type: string
          example: https://api.dwolla.com
        type:
          type: string
          example: application/vnd.dwolla.v1.hal+json
        resource-type:
          type: string
          example: resource-type
    TransferAmount:
      title: TransferAmount
      type: object
      required:
        - value
        - currency
      properties:
        value:
          type: string
          example: '5.00'
        currency:
          type: string
          example: USD
  securitySchemes:
    clientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /token
          x-speakeasy-token-endpoint-authentication: client_secret_basic
          scopes: {}

````