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

# Retry Transaction

> Retry a returned transaction by sending it to a worker bank account.

Sends a returned transaction to a worker bank account. The response is the new transaction. The original transaction is marked `resent`.

> [!NOTE]
>
> The transaction must belong to `companyID`, be in `returned` status, and must not already have been retried. `bankAccountID` cannot be the same account that received the returned transaction, unless that transaction's latest return code is `R23`. Transaction retry must be enabled for the company.


## OpenAPI

````yaml openapi/zeal-api.json post /transactions/retry
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /transactions/retry:
    post:
      summary: Retry Transaction
      description: >-
        Retry a returned transaction by sending it to a worker bank account. The
        response is the new transaction. The original transaction is marked
        resent.
      operationId: retry-transaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - companyID
                - transactionID
                - bankAccountID
              properties:
                companyID:
                  type: string
                  description: Company ID. 32-character hex ID.
                  pattern: ^[0-9a-f]{32}$
                transactionID:
                  type: string
                  description: ID of the returned transaction to retry.
                bankAccountID:
                  type: string
                  description: >-
                    ID of the worker bank account that should receive the
                    retried payment.
            examples:
              Request Example:
                value:
                  companyID: 24b5b29f05234840b119c34c1358940c
                  transactionID: 4c9e1a7b2d6f8c3a5e1b9d7f2c6a8e4d
                  bankAccountID: 6f2a9c4e1b7d3a8f5c2e9b1d4a7c3f8e
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
                    testMode: false
                    data:
                      transactionID: b7e1c4a29f6d4e3a8c1b5d7f0a2e6c48
                      companyID: 24b5b29f05234840b119c34c1358940c
                      employeeID: 65f1a2b3c4d5e6f708192a3b
                      amount: 1018.05
                      status: processing
                      method: next_day_ach
                      transaction_type: net_pay_credit
                      owner_type: company
                      retry: false
                      source_instrument:
                        owner_type: zeal
                      destination_instrument:
                        owner_type: worker
                        bankAccountDetails:
                          type: checking
                          bankAccountID: 6f2a9c4e1b7d3a8f5c2e9b1d4a7c3f8e
                          last_four: '0089'
                          destinationID: c4a81e2b7d9f4a6c8e1b3d5f7a9c2e4b
                      transaction_events: []
                      connectionID: d010afab12674659ac89705920c8a06d
                      connection_type: employee_check
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  testMode:
                    type: boolean
                    example: false
                  data:
                    type: object
                    required:
                      - amount
                      - companyID
                      - connectionID
                      - connection_type
                      - destination_instrument
                      - method
                      - owner_type
                      - retry
                      - source_instrument
                      - status
                      - transactionID
                      - transaction_events
                      - transaction_type
                    properties:
                      amount:
                        type: number
                        description: Transaction amount in dollars.
                        example: 1018.05
                      chargeID:
                        type: string
                        description: Charge ID, when the original transaction has one.
                      companyID:
                        type: string
                        description: Company ID.
                        example: 24b5b29f05234840b119c34c1358940c
                      connectionID:
                        type: string
                        description: >-
                          ID of the employee check, contractor payment, or other
                          record this transaction pays.
                        example: d010afab12674659ac89705920c8a06d
                      connection_type:
                        type: string
                        enum:
                          - employer_check
                          - contractor_payment_group
                          - employee_check
                          - contractor_payment
                          - direct_pay
                          - order
                          - top_up
                          - payout
                          - invoice
                        description: Kind of record connectionID points at.
                        example: employee_check
                      contractorID:
                        type: string
                        description: >-
                          Contractor ID, when the original transaction pays a
                          contractor.
                      correlationID:
                        type: string
                        description: >-
                          Correlation ID copied from the original transaction,
                          when present.
                      customerAccountID:
                        type: string
                        description: >-
                          Customer account ID, when the original transaction has
                          one.
                      destination_instrument:
                        type: object
                        description: Bank account the retried payment is sent to.
                        required:
                          - owner_type
                          - bankAccountDetails
                        properties:
                          owner_type:
                            type: string
                            enum:
                              - worker
                            description: Always worker for a retry.
                            example: worker
                          bankAccountDetails:
                            type: object
                            required:
                              - type
                              - bankAccountID
                              - last_four
                              - destinationID
                            properties:
                              type:
                                type: string
                                enum:
                                  - checking
                                  - savings
                                description: Bank account type.
                                example: checking
                              bankAccountID:
                                type: string
                                description: Worker bank account ID.
                                example: 6f2a9c4e1b7d3a8f5c2e9b1d4a7c3f8e
                              last_four:
                                type: string
                                description: Last four digits of the account number.
                                example: '0089'
                              destinationID:
                                type: string
                                description: Payment destination ID for this bank account.
                                example: c4a81e2b7d9f4a6c8e1b3d5f7a9c2e4b
                      employeeID:
                        type: string
                        description: >-
                          Employee ID, when the original transaction pays an
                          employee.
                        example: 65f1a2b3c4d5e6f708192a3b
                      external_note:
                        type: string
                        nullable: true
                        description: >-
                          External note copied from the original transaction,
                          when present.
                      method:
                        type: string
                        enum:
                          - instant_pay
                          - next_day_ach
                          - paycard
                          - same_day_ach
                          - wire
                          - download_check
                          - physical_check
                          - prepaid
                        description: Payment method copied from the original transaction.
                        example: next_day_ach
                      owner_type:
                        type: string
                        enum:
                          - company
                          - worker
                        description: >-
                          Whether the transaction is owned by the company or the
                          worker.
                        example: company
                      retry:
                        type: boolean
                        description: Always false on the new transaction.
                        example: false
                      source_instrument:
                        type: object
                        description: >-
                          Source instrument copied from the original
                          transaction.
                        required:
                          - owner_type
                        properties:
                          bankAccountID:
                            type: string
                          card_details:
                            type: object
                            additionalProperties: true
                          last_four:
                            type: string
                          owner_type:
                            type: string
                            enum:
                              - company
                              - worker
                              - zeal
                              - customer_account
                            example: zeal
                          paycardID:
                            type: string
                          walletID:
                            type: string
                          wire_details:
                            type: object
                            additionalProperties: true
                      status:
                        type: string
                        enum:
                          - processing
                        description: Always processing for a successful retry.
                        example: processing
                      traceID:
                        type: string
                        description: >-
                          Trace ID copied from the original transaction, when
                          present.
                      transaction_events:
                        type: array
                        description: Always empty on a successful retry.
                        items:
                          type: object
                          properties:
                            return_code:
                              type: string
                            status:
                              type: string
                              enum:
                                - pending
                                - processing
                                - settled
                                - returned
                                - canceled
                                - recorded
                                - submitted
                                - reported
                                - resent
                            status_detail:
                              type: string
                            transactionEventID:
                              type: string
                            odo_transaction_event_id:
                              type: string
                            timestamp:
                              type: string
                              format: date-time
                        example: []
                      transaction_type:
                        type: string
                        enum:
                          - business_card
                          - clawback
                          - company_debit
                          - direct_pay
                          - ewa_transaction
                          - invoice_bank_transfer
                          - net_pay_credit
                          - payout
                          - refund
                          - topup
                          - wallet_transaction
                        description: Transaction type copied from the original transaction.
                        example: net_pay_credit
                      transactionID:
                        type: string
                        description: ID of the new transaction.
                        example: b7e1c4a29f6d4e3a8c1b5d7f0a2e6c48
                      transfer_type:
                        type: string
                        enum:
                          - wallet_credit
                          - wallet_debit_card
                          - wallet_debit_bank
                          - charge_transfer
                          - charges_payout
                          - company_fees_payout
                          - company_tax_penalty
                          - faster_pay
                          - fund_employer_custody
                          - fund_employer_reserve
                          - fund_tax_node
                          - one_day
                          - one_day_debit
                          - one_day_paycard_transfer
                          - one_day_tax_transfer
                          - order
                          - invoice
                          - pay_employee
                          - pay_state
                          - paycard_direct_pay
                          - paycard_disbursement
                          - prefunded_batch_disbursement
                          - prefunded_employee_disbursement
                          - push_deductions
                          - push_to_card
                          - push_two_percent
                          - refund_customer_account_payroll
                          - refund_payroll
                          - refund_reserve_payroll
                          - refund_tax
                          - reserve_paycard_disbursement
                          - same_day_faster_reserve_top_up
                          - same_day_reserve_top_up
                          - tax_penalty
                          - two_day_deductions_transfer
                          - two_day_download_check_transfer
                          - two_day_paycard_transfer
                          - two_day_physical_check_transfer
                          - two_day_tax_transfer
                          - >-
                            two_day_two_percent_shareholder_healthcare_reimbursement_transfer
                          - wallet
                          - wallet_direct_pay
                          - wallet_bank_transfer
                          - invoice_bank_transfer
                          - invoice_payout
                          - order_payout
                          - worker_fees_payout
                        description: >-
                          Transfer type copied from the original transaction,
                          when present.
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    testMode: false
                    errors:
                      - message: Transaction has already been retried
                        code: 13
                        status: 400
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  testMode:
                    type: boolean
                    example: false
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        code:
                          type: integer
                        status:
                          type: integer
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    testMode: false
                    errors:
                      - message: >-
                          Transaction not found for transactionID:
                          4c9e1a7b2d6f8c3a5e1b9d7f2c6a8e4d
                        code: 135
                        status: 404
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  testMode:
                    type: boolean
                    example: false
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        code:
                          type: integer
                        status:
                          type: integer
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.