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

# Retrieve a customer deposit

> Retrieve a customer deposit session for the current merchant by its ID. Returns 404 if the resource does not exist or belongs to another merchant.

Returns `404 resource_not_found` if the deposit session does not exist or belongs to another merchant.



## OpenAPI

````yaml /en/api/customer-deposits.openapi.json get /api/v1/customer-deposits/{deposit_session_id}
openapi: 3.1.0
info:
  title: StablePay Customer Deposits API
  version: '2026-10-13'
  summary: API for creating and retrieving customer deposit sessions.
  description: >-
    OpenAPI specification for StablePay customer deposits.


    Notes:

    - Base URL: https://api.stablepay.co

    - Authentication: Bearer API Key + `X-StablePay-Timestamp` +
    `X-StablePay-Nonce` + `X-StablePay-Signature`

    - Signature payload: `{timestamp}.{nonce}.{requestBody}`

    - Signature algorithm: HMAC-SHA256, lowercase hex

    - For GET requests, `requestBody` is an empty string

    - StablePay automatically identifies or creates customers within the current
    merchant using `external_customer_id`

    - Merchant identity is injected by the authentication gateway; do not pass
    `merchant_id` in request parameters
servers:
  - url: https://api.stablepay.co
    description: Production
security:
  - bearerAuth: []
    stablepayTimestamp: []
    stablepayNonce: []
    stablepaySignature: []
tags:
  - name: Customer Deposits
    description: Create and retrieve customer deposit sessions and hosted checkout links.
paths:
  /api/v1/customer-deposits/{deposit_session_id}:
    get:
      tags:
        - Customer Deposits
      summary: Retrieve a customer deposit
      description: >-
        Retrieve a customer deposit session for the current merchant by its ID.
        Returns 404 if the resource does not exist or belongs to another
        merchant.


        Returns `404 resource_not_found` if the deposit session does not exist
        or belongs to another merchant.
      operationId: getCustomerDeposit
      parameters:
        - $ref: '#/components/parameters/XStablePayTimestamp'
        - $ref: '#/components/parameters/XStablePayNonce'
        - $ref: '#/components/parameters/XStablePaySignature'
        - name: deposit_session_id
          in: path
          required: true
          description: Deposit session ID.
          schema:
            type: string
            minLength: 1
          example: '20261013110310801082920000001001'
      responses:
        '200':
          description: Query successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDepositSession'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            The deposit session does not exist or does not belong to the current
            merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    XStablePayTimestamp:
      name: X-StablePay-Timestamp
      in: header
      required: true
      description: Unix timestamp in seconds. Must be within 5 minutes of the server time.
      schema:
        type: string
      example: '1791878400'
    XStablePayNonce:
      name: X-StablePay-Nonce
      in: header
      required: true
      description: >-
        Random string for replay protection, 16–64 characters. A new UUID is
        recommended for each request.
      schema:
        type: string
        minLength: 16
        maxLength: 64
      example: 550e8400-e29b-41d4-a716-446655440000
    XStablePaySignature:
      name: X-StablePay-Signature
      in: header
      required: true
      description: >-
        Compute HMAC-SHA256 over `{timestamp}.{nonce}.{requestBody}` using the
        merchant API Secret and encode the result as lowercase hex. For GET
        requests, `requestBody` is an empty string.
      schema:
        type: string
      example: a1b2c3d4e5f6...
  schemas:
    CustomerDepositSession:
      type: object
      required:
        - deposit_session_id
        - customer_id
        - status
        - allow_multiple_deposits
        - expires_at
        - url
        - metadata
        - created
      properties:
        deposit_session_id:
          type: string
          description: Deposit session ID.
        customer_id:
          type: string
          description: StablePay customer ID.
        status:
          type: string
          enum:
            - active
            - closed
            - expired
          description: Deposit session status.
        allow_multiple_deposits:
          type: boolean
          description: Whether multiple deposits are allowed using the same link.
        expires_at:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Expiration time in Unix seconds. Always null when the link never
            expires.
        url:
          type: string
          format: uri
          description: Hosted checkout URL.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Merchant-defined metadata.
        created:
          type: integer
          format: int64
          description: Creation time in Unix seconds.
    ErrorResponse:
      type: object
      required:
        - code
        - message
        - errorCode
        - data
      description: Error response.
      properties:
        code:
          type: integer
          description: HTTP status code.
        message:
          type: string
          description: Error message.
        errorCode:
          type: string
          description: Stable business error code.
        data:
          type: 'null'
          description: Always null in error responses.
  responses:
    Unauthorized:
      description: Authentication failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer API Key, for example `Bearer sk_live_xxx`.
    stablepayTimestamp:
      type: apiKey
      in: header
      name: X-StablePay-Timestamp
      description: Unix timestamp in seconds. Must be within 5 minutes of the server time.
    stablepayNonce:
      type: apiKey
      in: header
      name: X-StablePay-Nonce
      description: Random string for replay protection, 16–64 characters.
    stablepaySignature:
      type: apiKey
      in: header
      name: X-StablePay-Signature
      description: >-
        HMAC-SHA256 signature computed using the merchant API Secret, encoded as
        lowercase hex.

````

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