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

# Unqueue deposit from invoice

> Takes a queued deposit back off its invoice, so it lands as an unapplied payment
instead. Does nothing, and returns `200`, when nothing is queued.

A deposit already applied is refused. Unapplying a payment reverses it on the
invoice, and that is done in the Streamlined app.




## OpenAPI

````yaml /api-reference/openapi.yaml delete /deposit_links/{uuid}/invoice
openapi: 3.0.3
info:
  title: Streamlined API
  description: >
    Access customers, customer applications, customer groups, products, payouts,
    invoices, transactions, and deposit links programmatically through this API,
    and receive webhooks when deposit links change. All requests must be
    authenticated with an API key.
  version: 1.6.0
  license:
    name: Proprietary
    url: https://streamlinedpayments.com/terms
servers:
  - url: https://api.staging.streamlinedpayments.com/api/v1
    description: Sandbox
  - url: https://api.streamlinedpayments.com/api/v1
    description: Production
security:
  - AppIdAuth: []
    ApiKeyAuth: []
tags:
  - name: Customers
    description: Create, update and delete the businesses you sell to.
  - name: Customer applications
    description: >-
      List the applications your customers submit, and approve them. Approving
      can also set net terms and export the customer to Shopify. See [Approve
      customer applications](/guides/customer-applications).
  - name: Customer groups
    description: >-
      Organize customers into groups and manage who's in each one. A group can
      be linked to a Shopify B2B company.
  - name: Customer files
    description: Upload and manage files attached to a customer.
  - name: Customer addresses
    description: Manage a customer's addresses and choose their default billing address.
  - name: Orders
    description: Create orders, add and remove line items, and schedule them.
  - name: Invoices
    description: Create invoices from orders, then list, look up and update them.
  - name: Transactions
    description: List transactions and look one up.
  - name: Payouts
    description: List payouts, including pending ones, and look one up.
  - name: Products
    description: >-
      Create and update the products and services you sell, import them in bulk,
      and merge duplicates.
  - name: Deposit links
    description: Collect money from a customer before an invoice exists.
  - name: Webhooks
    description: >-
      Register HTTPS endpoints to receive events when something changes. See
      [Webhooks](/guides/webhooks) for signatures, retries and delivery
      guarantees.
paths:
  /deposit_links/{uuid}/invoice:
    delete:
      tags:
        - Deposit links
      summary: Unqueue deposit from invoice
      description: >
        Takes a queued deposit back off its invoice, so it lands as an unapplied
        payment

        instead. Does nothing, and returns `200`, when nothing is queued.


        A deposit already applied is refused. Unapplying a payment reverses it
        on the

        invoice, and that is done in the Streamlined app.
      operationId: unqueueDepositLinkFromInvoice
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Returns the link with `apply_to_invoice_uuid` null.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositLink'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: The deposit is already applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: already_applied
                message: This deposit is already applied to an invoice.
components:
  schemas:
    DepositLink:
      type: object
      description: >
        A request for money from a customer before any invoice exists.


        The customer pays the URL by card or bank debit. The money lands as an
        unapplied

        payment and posts to no accounting system until someone applies it to an
        invoice,

        at which point `applied` turns true.
      properties:
        uuid:
          type: string
          description: Identifies the link everywhere in this API.
        status:
          $ref: '#/components/schemas/DepositLinkStatus'
        amount:
          type: integer
          description: Amount requested, in cents.
        currency:
          $ref: '#/components/schemas/DepositLinkCurrency'
        url:
          type: string
          description: The payable URL. Always present and always works.
        short_url:
          type: string
          nullable: true
          description: >
            Shortened form of the same URL. Null when the shortener was
            unreachable at

            creation, so fall back to `url` rather than treating null as an
            error.
        expires_at:
          type: string
          format: date-time
        description:
          type: string
          nullable: true
          description: Shown to the payer.
        reference:
          type: string
          nullable: true
          description: Your own reference.
        metadata:
          type: object
          nullable: true
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        paid_at:
          type: string
          format: date-time
          nullable: true
        customer:
          $ref: '#/components/schemas/DepositLinkCustomer'
        applied:
          type: boolean
          description: >
            Whether the money has been applied to an invoice.


            Separate from `status`, and not a problem state: `paid` with
            `applied: false` is

            where a deposit sits until someone maps it to an invoice. When the
            deposit was

            collected the invoice did not exist, so nothing picks one on its
            own. Apply it with

            `PUT /deposit_links/{uuid}/invoice`, or in the Streamlined app.
        apply_to_invoice_uuid:
          type: string
          nullable: true
          description: >
            The invoice a `processing` deposit is queued against, via

            `PUT /deposit_links/{uuid}/invoice`. It is applied there when the
            money lands, at

            which point this goes null and `applied` turns true. Null when
            nothing is queued.
        payment:
          type: object
          allOf:
            - $ref: '#/components/schemas/DepositLinkPayment'
          nullable: true
      example:
        uuid: 3b8e5f21-7a44-4c19-9e02-1d5c7b3a6f08
        status: open
        amount: 250000
        currency: USD
        url: https://app.streamlinedpayments.com/d/dep_7K3M9QP2ATX4
        short_url: https://s9d.cc/dep_7K3M9QP2ATX4
        expires_at: '2026-09-15T00:00:00Z'
        description: 50% deposit
        reference: PO-4821
        metadata:
          deal_id: '148003921'
        created_at: '2026-08-16T14:22:05Z'
        paid_at: null
        customer:
          uuid: c1f0a92b-4d63-4e88-b0a7-2f9e4c6d1b35
          display_name: Northwind Traders
        applied: false
        apply_to_invoice_uuid: null
        payment: null
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    DepositLinkStatus:
      type: string
      description: >
        Where the link is in its life.


        `processing` means a bank debit was taken and is still settling, 2 to 4
        business

        days. The money has not arrived; it becomes `paid` on its own.


        `failed` is terminal. The customer cannot retry the same link and you
        issue a new one.


        A lapsed link reports `expired` even before the sweeper rewrites it, so
        this always

        agrees with whether the URL still works.
      enum:
        - open
        - processing
        - paid
        - failed
        - expired
        - canceled
        - refunded
    DepositLinkCurrency:
      type: string
      description: >
        Currency to collect in. Defaults to the customer's, then the company's,
        then USD.


        Narrower than the currencies elsewhere in this API: a deposit must be
        payable by

        card or bank debit, and every one of these is two-decimal.
      enum:
        - USD
        - CAD
        - EUR
        - GBP
        - AUD
    DepositLinkCustomer:
      type: object
      properties:
        uuid:
          type: string
        display_name:
          type: string
    DepositLinkPayment:
      type: object
      description: The money that settled this link. Null until it has been paid.
      properties:
        uuid:
          type: string
          description: The payment's uuid. Also appears in the Transaction API.
        amount:
          type: integer
          description: Amount received, in cents. May differ from the link's amount.
        source:
          type: string
          description: How the money arrived.
          example: wire
        invoice_identifier:
          type: string
          nullable: true
          description: >
            The invoice this money has been applied to, once someone applies it.

            Null while the deposit is still unapplied, which is the normal state
            after

            payment and before an invoice exists.
        attached_by:
          type: string
          nullable: true
          description: >
            How the link came to hold this money, which is how much to trust it
            saying paid.


            `null` — the customer paid through the link's own checkout. Nothing
            was inferred.


            `auto_match` — an incoming wire, ACH credit or cheque was matched to
            this link on

            exact amount, customer and currency. **This is an inference and can
            be wrong.**

            Treat it as weaker evidence than the other two.


            `merchant` — somebody attached the payment deliberately.
          enum:
            - auto_match
            - merchant
        amount_matches_link:
          type: boolean
          description: >
            Whether the amount received equals the amount asked for. False is
            normal for a

            wire that arrived short by the sending bank's fee.
      example:
        uuid: 8f2a1c34-9d21-4b7e-a0f5-6c1d8e3b7a92
        amount: 249988
        source: wire
        invoice_identifier: null
        attached_by: auto_match
        amount_matches_link: false
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            AuthenticationRequired:
              value:
                error: Authentication required
                message: >-
                  API endpoint requires authentication. Please provide valid
                  X-App-Id and X-Api-Key headers.
            InvalidCredentials:
              value:
                error: Invalid credentials
                message: >-
                  The provided API credentials are invalid. Please check your
                  X-App-Id and X-Api-Key values.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: X-App-Id
      description: App ID for authentication
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API Key for authentication

````

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