---
title: "Dequeue one"
method: PATCH
path: "/v1/banking/bank_transactions/{bank_transaction_id}/dequeue"
tags: ["Bank transaction"]
---

# Dequeue one

`PATCH /v1/banking/bank_transactions/{bank_transaction_id}/dequeue`

Dequeues a bank transaction

## Parameters

- `#/paths/~1v1~1banking~1bank_keys/get/parameters/0` — unresolved $ref
- `#/paths/~1v1~1banking~1bank_transactions~1%7Bbank_transaction_id%7D/get/parameters/1` — unresolved $ref

## Request body

- object
  - `bank_key_id` string, required — The id of the bank key to be used.
  - `decline_motive` string, required — motive to destroy/dequeue the transaction
  - `sender_id` string, uuid — The id of the bank account involved

## Response `200`

The dequeue was accepted. If the transaction still exists (it was
already sent to the bank), the dequeued transaction is returned. If the
transaction was only queued and got removed as part of the dequeue, the
body is instead `{"message": "Transaction deleted"}`.

- union
  - BankTransaction
    - `id` string, uuid, required — Unique identifier for the transaction
    - `external_id` string — The ID assigned to the transaction in the bank systems
    - `sender_id` string, uuid, required — The ID of the bank account that will send the payment
    - `recipient_id` string, uuid, required — The ID of the bank recipient that will receive the payment
    - `bank_payroll_id` string, uuid, nullable — The ID of the payroll this transaction belongs to, if any
    - `lbtr` boolean — This attribute indicates that a transaction does not have an amount limit. Only available at Banco de Chile and Santander
    - `payroll` object, nullable — The payroll this transaction belongs to, if any
      - `id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `status` 'draft' | 'enrolled' | 'enroll_failed' | 'pending_validation' | 'preauthorized' | 'approved' | 'declined' | 'deleted' — Current status of the payroll. Mirrors `Bank_payroll.status`.
      - `transition` 'enroll' | 'preauthorize' | 'authorize' | 'delete', nullable — Async state-machine transition currently running on the payroll. Mirrors `Bank_payroll.transition`.
      - `sender_id` string, uuid
      - `name` string
      - `external_id` string, nullable — External identifier assigned by the bank. Null until the bank accepts the payroll.
      - `bank_id` string
      - `holder_id` string, uuid
      - `raw_data` object, nullable — Raw data from the bank system, can contain any data structure
      - `payment_date` string, date, nullable — Date when the payment is scheduled to be processed
      - `category` string
      - `online` boolean — Indicates whether the payroll will be paid the same day (true) or is deferred (false)
    - `sender` BankAccount
      - `id` string, uuid, required
      - `balance` integer, nullable
      - `holder_id` string, uuid, nullable — UUID of the Person (company or counterpart) that owns the account.
      - `bank_id` string — Bank identifier, e.g. `cl_banco_de_chile`, `mx_stp`, `us_mercury`.
      - `type` string — STI subclass, bank-specific (e.g. `Banking::Cl::BancoDeChile::Account`).
      - `number` string, required
      - `rut` string, required
      - `email` string
      - `name` string
      - `account_type` 'corriente' | 'vista' | 'ahorro' | 'clabe', nullable — Chilean account types are the following: > * 'corriente' > * 'vista' > * 'ahorro' Mexican account types are the following: > * 'clabe' For more details check the [guide](https://docs.cardda.com/docs).
      - `bank_errors` object[]
        - `id` string, uuid
        - `banking_entity_id` string, uuid
        - `banking_entity_type` string
        - `error_code` 'auth/wrong-credentials' | 'auth/invalid-body' | 'recipient/create/invalid-body' | 'recipient/create/unknown-bank-name' | 'recipient/create/unknown-account-type' | 'recipient/get/unknown-bank-name' | 'recipient/get/unknown-account-type' | 'recipient/authorization/not-found' | 'recipient/authorization/invalid-data' | 'transaction/enqueue/invalid-body' | 'transaction/enqueue/first-transaction-max-amount' | 'transaction/enqueue/transaction-daily-max-amount' | 'transaction/enqueue/recipient-not-registered' | 'transaction/enqueue/sender-account-not-fund' | 'transaction/enqueue/recipient-collision' | 'transaction/enqueue/sender-collision' | 'transaction/dequeue/invalid-body' | 'transaction/dequeue/not-found' | 'transaction/dequeue/dequeue-all-unsuccessful' | 'transaction/dequeue/no-queued-transactions' | 'transaction/get/unknown-status' | 'transaction/get/unknown-date-format' | 'transaction/get/invalid-body' | 'transaction/authorization/invalid-body' | 'transaction/authorization/wrong-token' | 'transaction/authorization/invalid-method' | 'transaction/authorization/no-queued-transactions' | 'transaction/authorization/insufficient-funds' | 'transaction/authorization/account-token-blocked' | 'account/get/not-found' | 'account/common/blocked-auth-devices' | 'account/common/temporary-blocked' | 'page/failed-to-load-components' | 'page/recipient-save-unsuccessful' | 'page/transaction-enqueue-unsuccessful' | 'page/transaction-authorization-unsuccessful' | 'request/expired-cookies', nullable
        - `created_at` string, date-time
        - `updated_at` string, date-time
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `recipient` BankRecipient
      - `id` string, uuid, required
      - `name` string
      - `alias` string
      - `owner_id` string, uuid, required
      - `rut` string — The rut must not contain dots or hyphens, and if it ends up with a k this letter should be capitalized
      - `email` string
      - `account_type` 'corriente' | 'vista' | 'ahorro' | 'clabe' — Chilean account types are the following: > * 'corriente' > * 'vista' > * 'ahorro' Mexican account types are the following: > * 'clabe' For more details check the [guide](https://docs.cardda.com/docs).
      - `account_number` string, required
      - `person_id` string, uuid — the id of the company that owns this recipient
      - `bank_id` 'cl_banco_de_chile' | 'cl_banco_internacional' | 'cl_banco_scotiabank' | 'cl_banco_scotiabank_azul' | 'cl_banco_bci' | 'cl_banco_bice' | 'cl_hsbc_bank' | 'cl_banco_santander_chile' | 'cl_banco_itau' | 'cl_banco_security' | 'cl_banco_falabella' | 'cl_banco_ripley' | 'cl_banco_consorcio' | 'cl_banco_btg_pactual_chile' | 'cl_banco_estado' | 'cl_banco_corpbanca' | 'cl_banco_paris' | 'cl_coopeuch' | 'cl_mercado_pago' | 'cl_prepago_los_heroes' | 'cl_tapp_caja_los_andes' | 'cl_tenpo_prepago_sa' | 'cl_banco_del_desarrollo' | 'cl_transbank' | 'cl_banco_do_brasil' | 'cl_jp_morgan_chase_bank' | 'cl_mufg_bank' | 'cl_banco_sudamericano' | 'cl_rabobank' | 'cl_china_construction_bank' | 'cl_bank_of_china' | 'cl_banco_de_la_nacion_argentina' | 'cl_banco_penta' | 'cl_abn_amro_bank' | 'mx_banxico' | 'mx_bancomext' | 'mx_banobras' | 'mx_banjercito' | 'mx_nafin' | 'mx_babien' | 'mx_hipotecaria_fed' | 'mx_banamex' | 'mx_bbva_mexico' | 'mx_santander' | 'mx_hsbc' | 'mx_bajio' | 'mx_inbursa' | 'mx_mifel' | 'mx_scotiabank' | 'mx_banregio' | 'mx_invex' | 'mx_bansi' | 'mx_afirme' | 'mx_banorte' | 'mx_bank_of_america' | 'mx_mufg' | 'mx_jp_morgan' | 'mx_bmonex' | 'mx_ve_por_mas' | 'mx_azteca' | 'mx_autofin' | 'mx_barclays' | 'mx_compartamos' | 'mx_multiva_banco' | 'mx_actinver' | 'mx_intercam_banco' | 'mx_bancoppel' | 'mx_abc_capital' | 'mx_consubanco' | 'mx_volkswagen' | 'mx_cibanco' | 'mx_bbase' | 'mx_bankaool' | 'mx_pagatodo' | 'mx_inmobiliario' | 'mx_donde' | 'mx_bancrea' | 'mx_banco_covalto' | 'mx_icbc' | 'mx_sabadell' | 'mx_shinhan' | 'mx_mizuho_bank' | 'mx_bank_of_china' | 'mx_banco_s3' | 'mx_monexcb' | 'mx_gbm' | 'mx_masari' | 'mx_value' | 'mx_vector' | 'mx_finamex' | 'mx_valmex' | 'mx_profuturo' | 'mx_cb_intercam' | 'mx_ci_bolsa' | 'mx_fincomun' | 'mx_nu_mexico' | 'mx_reforma' | 'mx_stp' | 'mx_credicapital' | 'mx_kuspit' | 'mx_unagra' | 'mx_asp_integra_opc' | 'mx_alternativos' | 'mx_libertad' | 'mx_caja_pop_mexica' | 'mx_cristobal_colon' | 'mx_caja_telefonist' | 'mx_transfer' | 'mx_fondo_fira' | 'mx_invercap' | 'mx_fomped' | 'mx_tesored' | 'mx_nvio' | 'mx_indeval' | 'mx_arcus' | 'pe_banco_bcp' | 'pe_banco_yape'
      - `bank` Bank
        - `created_at` string, date-time
        - `id` 'cl_banco_de_chile' | 'cl_banco_internacional' | 'cl_banco_scotiabank' | 'cl_banco_scotiabank_azul' | 'cl_banco_bci' | 'cl_banco_bice' | 'cl_hsbc_bank' | 'cl_banco_santander_chile' | 'cl_banco_itau' | 'cl_banco_security' | 'cl_banco_falabella' | 'cl_banco_ripley' | 'cl_banco_consorcio' | 'cl_banco_btg_pactual_chile' | 'cl_banco_estado' | 'cl_banco_corpbanca' | 'cl_banco_paris' | 'cl_coopeuch' | 'cl_mercado_pago' | 'cl_prepago_los_heroes' | 'cl_tapp_caja_los_andes' | 'cl_tenpo_prepago_sa' | 'cl_banco_del_desarrollo' | 'cl_transbank' | 'cl_banco_do_brasil' | 'cl_jp_morgan_chase_bank' | 'cl_mufg_bank' | 'cl_banco_sudamericano' | 'cl_rabobank' | 'cl_china_construction_bank' | 'cl_bank_of_china' | 'cl_banco_de_la_nacion_argentina' | 'cl_banco_penta' | 'cl_abn_amro_bank' | 'mx_banxico' | 'mx_bancomext' | 'mx_banobras' | 'mx_banjercito' | 'mx_nafin' | 'mx_babien' | 'mx_hipotecaria_fed' | 'mx_banamex' | 'mx_bbva_mexico' | 'mx_santander' | 'mx_hsbc' | 'mx_bajio' | 'mx_inbursa' | 'mx_mifel' | 'mx_scotiabank' | 'mx_banregio' | 'mx_invex' | 'mx_bansi' | 'mx_afirme' | 'mx_banorte' | 'mx_bank_of_america' | 'mx_mufg' | 'mx_jp_morgan' | 'mx_bmonex' | 'mx_ve_por_mas' | 'mx_azteca' | 'mx_autofin' | 'mx_barclays' | 'mx_compartamos' | 'mx_multiva_banco' | 'mx_actinver' | 'mx_intercam_banco' | 'mx_bancoppel' | 'mx_abc_capital' | 'mx_consubanco' | 'mx_volkswagen' | 'mx_cibanco' | 'mx_bbase' | 'mx_bankaool' | 'mx_pagatodo' | 'mx_inmobiliario' | 'mx_donde' | 'mx_bancrea' | 'mx_banco_covalto' | 'mx_icbc' | 'mx_sabadell' | 'mx_shinhan' | 'mx_mizuho_bank' | 'mx_bank_of_china' | 'mx_banco_s3' | 'mx_monexcb' | 'mx_gbm' | 'mx_masari' | 'mx_value' | 'mx_vector' | 'mx_finamex' | 'mx_valmex' | 'mx_profuturo' | 'mx_cb_intercam' | 'mx_ci_bolsa' | 'mx_fincomun' | 'mx_nu_mexico' | 'mx_reforma' | 'mx_stp' | 'mx_credicapital' | 'mx_kuspit' | 'mx_unagra' | 'mx_asp_integra_opc' | 'mx_alternativos' | 'mx_libertad' | 'mx_caja_pop_mexica' | 'mx_cristobal_colon' | 'mx_caja_telefonist' | 'mx_transfer' | 'mx_fondo_fira' | 'mx_invercap' | 'mx_fomped' | 'mx_tesored' | 'mx_nvio' | 'mx_indeval' | 'mx_arcus' | 'pe_banco_bcp' | 'pe_banco_yape'
        - `image_url` string
        - `name` string
        - `updated_at` string, date-time
      - `external_id` string, uuid
      - `bank_former_name` string
      - `status` 'draft' | 'enrolled' | 'preauthorized' | 'deleted' | 'approved'
      - `transition` 'enroll' | 'authorize' | 'preauthorize' | 'delete', nullable
      - `bank_errors` Items[] — unresolved $ref
      - `metadata` unknown
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `holder_id` string, uuid — The ID of the company that owns this bank transaction
    - `status` 'draft' | 'enqueued' | 'dequeued' | 'preauthorized' | 'declined' | 'approved', required — Current status of the transaction
    - `transition` 'enqueue' | 'dequeue' | 'authorize' | 'preauthorize' | 'remove' — Current transition being processed for the transaction
    - `description` string — Description of the transaction
    - `raw_data` string, nullable — The raw data stored from the banks
    - `metadata` object — Additional metadata for the transaction
    - `receipt` boolean — Indicates whether the transaction's receipt is available
    - `payables` object[] — List of invoices paid with this transaction (only available if pay product is activated)
    - `amount` integer, required — Amount of the transaction in cents
    - `decline_motive` string — Reason for declining the transaction if it was declined
    - `bank_errors` Items[] — List of errors returned by the bank for this transaction — unresolved $ref
    - `created_at` string, date-time — Timestamp when the transaction was created
    - `updated_at` string, date-time — Timestamp when the transaction was last updated
    - `authorized_at` string, date-time — Timestamp when the transaction was authorized
    - `enqueued_at` string, date-time — Timestamp when the transaction was enqueued
    - `idempotency_id` string, nullable — Unique identifier to prevent duplicate transactions
  - object
    - `message` string, required

## Other responses

- `400` — Bad request — the transaction is not in a dequeueable state (it must have a null transition and be `enqueued`/`preauthorized`/`draft`, and not belong to a payroll unless still `draft`). The offending transaction is returned.
- `401` — Unauthorized
- `422` — Unprocessable entity — the required `decline_motive` was not included.

---

[API](https://skmtc.dev/cardda/apis/banking-api.md) · [All operations](https://skmtc.dev/cardda/apis/banking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cardda/banking-api/revisions/ff1aeb3fda8b/schema)
