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

# Accept a deposit charge

> Accept the deposit charge with the given ID.



## OpenAPI

````yaml openapi-leasing.json POST /v1/deposits/{id}/charges/{chargeId}/accept
openapi: 3.1.0
info:
  title: Yorlet Leasing API
  description: >-
    APIs for managing applications, deposits, guarantors, references, and
    tenancies.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/deposits/{id}/charges/{chargeId}/accept:
    post:
      tags:
        - Deposit Charges
      summary: Accept a deposit charge
      description: Accept the deposit charge with the given ID.
      operationId: deposit_charges_accept
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
        - schema:
            type: string
            description: The chargeId identifier.
          required: true
          description: The chargeId identifier.
          name: chargeId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_declaration:
                  type: object
                  properties:
                    date:
                      type: integer
                      description: The date of the customer declaration.
                    ip:
                      type: string
                      description: The IP address of the customer declaration.
                  required:
                    - date
                    - ip
                  description: The customer declaration hash.
              required:
                - customer_declaration
      responses:
        '200':
          description: The updated deposit charge. Otherwise, this call throws an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - deposit_charge
                  accepted:
                    type: boolean
                    default: false
                    description: >-
                      Whether the deposit charge has been accepted by the
                      customer.
                  accepted_at:
                    type:
                      - number
                      - 'null'
                    description: The time at which the deposit charge was accepted.
                  amount:
                    type: number
                    description: >-
                      The amount of the deposit charge, in the smallest currency
                      unit.
                  canceled:
                    type: boolean
                    default: false
                    description: Whether the deposit charge has been canceled.
                  canceled_at:
                    type:
                      - number
                      - 'null'
                    description: The time at which the deposit charge was canceled.
                  currency:
                    type: string
                    description: The three-letter ISO currency code of the deposit charge.
                  customer_declaration:
                    type:
                      - object
                      - 'null'
                    properties:
                      date:
                        type: integer
                        description: The date of the customer declaration.
                      ip:
                        type: string
                        description: The IP address of the customer declaration.
                    required:
                      - date
                      - ip
                    description: >-
                      The customer declaration captured when accepting the
                      deposit charge.
                  deposit:
                    type:
                      - string
                      - 'null'
                    description: The ID of the deposit the charge is associated with.
                  description:
                    type:
                      - string
                      - 'null'
                    description: An arbitrary description attached to the deposit charge.
                  destination:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: >-
                      The owner the funds from the deposit charge will be
                      allocated to.
                  dispute:
                    type:
                      - object
                      - 'null'
                    properties:
                      comments:
                        type:
                          - string
                          - 'null'
                        description: Comments explaining the reason for the dispute.
                      counter_amount:
                        type: integer
                        minimum: 0
                        description: >-
                          The counter amount, in the smallest currency unit, the
                          customer is willing to accept.
                    required:
                      - comments
                      - counter_amount
                    description: Details of any dispute raised against the deposit charge.
                  disputed:
                    type: boolean
                    default: false
                    description: >-
                      Whether the deposit charge has been disputed by the
                      customer.
                  disputed_at:
                    type:
                      - number
                      - 'null'
                    description: The time at which the deposit charge was disputed.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                  original_amount:
                    type: number
                    default: 0
                    description: >-
                      The original amount of the deposit charge, in the smallest
                      currency unit, before any adjustments.
                  status:
                    type:
                      - string
                      - 'null'
                    enum:
                      - pending
                      - accepted
                      - canceled
                      - disputed
                      - null
                    description: The status of the deposit charge.
                  type:
                    type:
                      - string
                      - 'null'
                    enum:
                      - arrears
                      - charge
                      - dilapidation
                      - other
                      - null
                    description: The type of the deposit charge.
                required:
                  - id
                  - created
                  - object
                  - accepted_at
                  - amount
                  - canceled_at
                  - currency
                  - customer_declaration
                  - deposit
                  - description
                  - destination
                  - dispute
                  - disputed_at
                  - status
                  - type
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````