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

# Allow a held debit

> Lets the debit through: the bank accepts it on its own schedule. Only a hold still `PENDING_DECISION` can be decided, before `decideBy`. Allowing one already allowed answers it again.

With `alwaysAllowCompany`, Nickel also adds the debit's Company ID to the account's allowed companies, so later debits from that company aren't held. A debit with no `companyId` can't be always allowed.



## OpenAPI

````yaml /nickel-api-docs.yaml post /nickelBanking/heldDebits/{heldDebitId}/allow
openapi: 3.0.3
info:
  title: Nickel API
  description: >-
    This is the specification for the Nickel Rest API. The API lets you
    programmatically interact with the Nickel server. It uses resource oriented
    URLs, accepts and returns JSON encoded payloads and uses standard HTTP
    response codes. It is not a direct API to move money, but instead allows you
    to interact with Nickel as you would on a web interface.
  termsOfService: https://www.nickel.com/terms-of-service
  contact:
    email: support@nickel.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://rest.staging.nickel.com
    description: Sandbox / Staging
  - url: https://rest.nickel.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Payment
    description: Payments from your customers to you
  - name: Disbursement
    description: Payouts made from Nickel to you
  - name: Payment Link
    description: A request for payment against an invoice
  - name: Customer
    description: A customer record to request payments against
  - name: Charge Authorization
    description: >-
      An authorization for your customer to allow you to charge their payment
      method directly
  - name: Webhook
    description: Create a webhook for nickel to send updates to
  - name: File
    description: A file you can use to attach to invoices or debit authorizations
  - name: Vendor
    description: Manage vendors for accounts payable
  - name: Bill
    description: Bills from vendors and bill payments
  - name: Bill Payment Method
    description: >-
      A merchant's payment methods used to pay bills (bank accounts and cards on
      file)
  - name: Vendor Delivery Method
    description: >-
      How a vendor receives funds — bank account (ACH), check mailing address,
      or international wire (SWIFT) details
  - name: Nickel Banking
    description: Your Nickel Banking accounts, debit cards, check deposits and transactions
  - name: Sandbox
    description: >-
      Requests that make something happen in the sandbox that only another bank
      or company could make happen in production. Production answers them with
      `400`.
externalDocs:
  description: Find out more about Nickel
  url: https://nickel.com
paths:
  /nickelBanking/heldDebits/{heldDebitId}/allow:
    post:
      tags:
        - Nickel Banking
      summary: Allow a held debit
      description: >-
        Lets the debit through: the bank accepts it on its own schedule. Only a
        hold still `PENDING_DECISION` can be decided, before `decideBy`.
        Allowing one already allowed answers it again.


        With `alwaysAllowCompany`, Nickel also adds the debit's Company ID to
        the account's allowed companies, so later debits from that company
        aren't held. A debit with no `companyId` can't be always allowed.
      operationId: allowHeldDebit
      parameters:
        - name: heldDebitId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeldDebitAllowRequest'
      responses:
        '200':
          description: >-
            The hold, now `ALLOWED`, and the allowed company
            `alwaysAllowCompany` added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeldDebitDecisionResponse'
        '400':
          description: >-
            The hold was already decided, blocked at its deadline, or resolved
            by the bank; or `alwaysAllowCompany` on a debit with no Company ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          $ref: '#/components/responses/NickelBankingRefused'
        '404':
          description: No held debit with that ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    HeldDebitAllowRequest:
      type: object
      additionalProperties: false
      properties:
        alwaysAllowCompany:
          type: boolean
          description: Also allow later debits from this company without holding them.
    HeldDebitDecisionResponse:
      type: object
      properties:
        heldDebit:
          $ref: '#/components/schemas/HeldDebit'
        allowedCompany:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AllowedCompany'
          description: The allowed company `alwaysAllowCompany` added; otherwise null.
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: >-
            A human-readable error message describing what went wrong. Note that
            some 500 responses may return a plain text string instead of this
            JSON object.
        code:
          type: string
          description: >-
            A stable machine-readable code, present on the errors a client can
            act on (e.g. `SHARED_ACCOUNT` on a 409 from the ACH debit
            authorization upload, `REFERENCE_CONFLICT` on a 409 from recording
            an external payment or a debit memo, `NICKEL_BANKING_NOT_ACTIVE` or
            `MISSING_PERMISSION` on a 403 from a Nickel Banking list). Absent
            otherwise.
    HeldDebit:
      type: object
      required:
        - id
        - accountId
        - status
        - amountCents
        - companyName
        - companyId
        - entryDescription
        - secCode
        - heldAt
        - decideBy
        - decidedAt
        - decidedBy
        - allowedCompanyId
      properties:
        id:
          type: string
          example: cmhd1rv0001qz8x4k2v7c9d3e
        accountId:
          type: string
          description: The Nickel Banking account the debit pulls from.
          example: cmf1nba0001qz8x4k2v7c9d3e
        status:
          $ref: '#/components/schemas/HeldDebitStatus'
        amountCents:
          type: integer
          format: int64
          description: How much the debit pulls, in cents.
          example: 12345
        companyName:
          type: string
          description: Who is pulling the money, as the debit names them.
          example: ACME AUTOPAY
        companyId:
          type: string
          nullable: true
          description: >-
            The ACH Company ID allowed companies match on. Null when the debit
            carried none.
          example: '1234567890'
        entryDescription:
          type: string
          nullable: true
          example: AUTOPAY
        secCode:
          type: string
          nullable: true
          description: The ACH entry class, such as `CCD` or `PPD`.
          example: CCD
        heldAt:
          type: string
          format: date-time
        decideBy:
          type: string
          format: date-time
          description: When an undecided hold is blocked automatically.
        decidedAt:
          type: string
          format: date-time
          nullable: true
        decidedBy:
          type: string
          nullable: true
          description: The name of who decided, when a person did.
        allowedCompanyId:
          type: string
          nullable: true
          description: The allowed company an `AUTO_ALLOWED` debit matched.
    AllowedCompany:
      type: object
      required:
        - id
        - accountId
        - companyId
        - companyName
        - createdAt
        - createdBy
      properties:
        id:
          type: string
        accountId:
          type: string
        companyId:
          type: string
          description: The ACH Company ID, trimmed and uppercased as matched.
          example: '1234567890'
        companyName:
          type: string
          description: A label for the company. Matching uses `companyId` alone.
          example: ACME AUTOPAY
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          description: The name of who added it.
    HeldDebitStatus:
      type: string
      enum:
        - PENDING_DECISION
        - ALLOWED
        - AUTO_ALLOWED
        - BLOCKED
        - EXPIRED_BLOCKED
        - RESOLVED_EXTERNALLY
      description: >-
        `PENDING_DECISION`: waiting for you until `decideBy`. `ALLOWED` and
        `BLOCKED`: someone decided. `AUTO_ALLOWED`: the company is an allowed
        company, so it was never held. `EXPIRED_BLOCKED`: blocked automatically,
        because nobody decided by `decideBy` or it arrived with no time to
        decide. `RESOLVED_EXTERNALLY`: the bank resolved it before or against
        the decision.
  responses:
    NickelBankingRefused:
      description: >-
        Nickel Banking data this API key can't read. `code` is
        `NICKEL_BANKING_NOT_ACTIVE` when your organization has no active Nickel
        Banking account, or `MISSING_PERMISSION` when the team member the API
        key belongs to lacks the permission this list needs; the message names
        it. Also returned, without a `code`, for an API key without REST API
        access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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