> ## 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.

# Create deposit link

> Creates a deposit link and returns the payable URL to send the customer.

Surface `short_url` where you can and fall back to `url`. `short_url` is null when
the shortener was unreachable at creation; `url` always works.

**Send an `Idempotency-Key`.** A retried request returns the original link with
`200` instead of minting a second payable URL for the same money.




## OpenAPI

````yaml /api-reference/openapi.yaml post /deposit_links
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:
    post:
      tags:
        - Deposit links
      summary: Create deposit link
      description: >
        Creates a deposit link and returns the payable URL to send the customer.


        Surface `short_url` where you can and fall back to `url`. `short_url` is
        null when

        the shortener was unreachable at creation; `url` always works.


        **Send an `Idempotency-Key`.** A retried request returns the original
        link with

        `200` instead of minting a second payable URL for the same money.
      operationId: createDepositLink
      parameters:
        - name: Idempotency-Key
          in: header
          description: >
            Your own unique value for this create. Retrying with the same key
            returns the

            link the first call made, rather than creating another. Keys are
            remembered

            for 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer_uuid
                - amount
              properties:
                customer_uuid:
                  type: string
                  description: The customer being asked to pay.
                amount:
                  type: integer
                  description: Amount to collect, in cents. Must be greater than zero.
                  example: 250000
                currency:
                  $ref: '#/components/schemas/DepositLinkCurrency'
                expires_at:
                  type: string
                  format: date-time
                  description: |
                    When the link stops being payable. Must be in the future.
                    Defaults to 30 days from creation.
                description:
                  type: string
                  description: Shown to the payer on the checkout page.
                  example: 50% deposit
                reference:
                  type: string
                  description: >-
                    Your own reference. Returned on the link and filterable on
                    the list.
                  example: PO-4821
                metadata:
                  type: object
                  description: >
                    Arbitrary key/value pairs, returned unchanged. Maximum 20
                    keys and 4KB.
                  additionalProperties: true
      responses:
        '200':
          description: >
            A previous request with this `Idempotency-Key` already created this
            link.

            No second link was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositLink'
        '201':
          description: Deposit link created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositLink'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: customer_not_found
                message: Customer not found
        '409':
          description: >
            Another request with this `Idempotency-Key` is still running. Wait
            and retry

            with the same key rather than creating a new one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: request_in_flight
                message: A request with this Idempotency-Key is still being processed.
        '422':
          description: The link could not be created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NoPaymentMethod:
                  summary: The customer could not have paid it
                  value:
                    error: no_payment_method
                    message: >-
                      This customer has no enabled payment method for that
                      currency
                InvalidAmount:
                  value:
                    error: invalid_amount
                    message: Enter a deposit amount greater than $0
                UnsupportedCurrency:
                  value:
                    error: unsupported_currency
                    message: JPY is not a supported currency
                InvalidExpiry:
                  value:
                    error: invalid_expiry
                    message: Expiry must be in the future
        '429':
          description: Rate limit exceeded. No more than 100 deposit links per hour.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Rate limit exceeded
                message: No more than 100 deposit links per hour.
components:
  schemas:
    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
    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
    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.
  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.