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

# Reconcile Expected Payment

> Attempts to reconcile an expected payment with reconciliation data such as reference code, amount, and currency.



## OpenAPI

````yaml service-openapi POST /v1/service/payment/reconcile
openapi: 3.0.0
info:
  title: Service API
  version: 0.0.0
servers:
  - url: https://api.nxos.io
    description: single server endpoint
    variables: {}
security: []
tags: []
paths:
  /v1/service/payment/reconcile:
    post:
      summary: Reconcile an expected Payment
      description: >-
        Attempts to reconcile an expected payment with reconciliation data such
        as reference code, amount, and currency.
      operationId: Payments_reconcilePayment
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReconcilePaymentRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
components:
  schemas:
    ReconcilePaymentRequest:
      type: object
      required:
        - amount
        - asset_code
        - external_tracking_id
        - transfer_reference
      properties:
        amount:
          type: string
          description: >-
            The amount of the payment, in string representation. All amounts
            should be passed in full subunits, e.g. 1000 for 10.00
        asset_code:
          type: string
          description: >-
            The asset_code of the payment. The asset must've been created in the
            system before it can be used in payments
        external_tracking_id:
          type: string
          description: >-
            The ID of the payment in the external system. This ID will guarantee
            the idempotency of the operation
        transfer_reference:
          type: string
          description: >-
            The transfer reference used by the sender to reconcile the payment.
            Typically, this is a reference code that is included by the sender
            in bank-transfers
    Payment:
      type: object
      required:
        - payment_id
        - amount
        - asset_code
        - source_account_id
        - payment_destinations
        - status
      properties:
        payment_id:
          type: string
          description: The unique ID of the payment
        amount:
          type: string
          description: >-
            The amount of the payment, in string representation. All amounts
            should be passed in full subunits, e.g. 1000 for 10.00
        asset_code:
          type: string
          description: >-
            The asset_code of the payment. The asset must've been created in the
            system before it can be used in payments
        source_account_id:
          type: string
          description: The source account ID of the payment
        payment_destinations:
          type: array
          items:
            $ref: '#/components/schemas/PaymentDestination'
          description: >-
            The destinations for a payment, such as recipients or revenue
            accounts
        external_tracking_id:
          type: string
          description: >-
            The unique ID of the payment in the external system. This ID will
            guarantee the idempotency of the operation
        transfer_reference:
          type: string
          description: >-
            The transfer reference used by the sender to reconcile the payment.
            Typically, this is a reference code that is included by the the
            sender in bank-transfers
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: The current status of the payment
    PaymentDestination:
      type: object
      required:
        - amount
        - asset_code
        - destination_account_id
        - type
      properties:
        amount:
          type: string
          description: >-
            The amount of the payment, in string representation. All amounts
            should be passed in full subunits, e.g. 1000 for 10.00
        asset_code:
          type: string
          description: >-
            The asset_code of the payment. The asset must've been created in the
            system before it can be used in payments
        destination_account_id:
          type: string
          description: The destination account ID of the expected payment
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Additional metadata for the destination. This can be any key-value
            pair that is relevant to the destination.

            This metadata field will map to the corresponding asset-moves and
            will be available by fetching the asset moves via the corresponding
            transaction.
        type:
          type: string
          description: >-
            The type of the destination transaction, such as a FEE or TRANSFER.
            The type must've been created in the system before it can be used in
            payments
    PaymentStatus:
      type: string
      enum:
        - EXEPCTED
        - SETTLED

````