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

# Validate Absorbed Charges Route

> Answer whether these outstanding charges can be merged into a checkout,
without collecting anything.

Checkout needs this the moment staff add a charge, not at payment time.
Some blockers — a package redeemed against another charge, a realized
inventory drawdown, a membership log — live in tables the client never
fetches, so the UI offers a merge it cannot know is refused. Until this
endpoint existed the only answer came from payin-config setup, which fires
on a debounced effect: the charge would sit in the ticket as a merged line
and then convert to a paid-separately charge at some unpredictable later
moment, or not until settlement.

Read-only: same rules as ``archive_absorbed_charges``, nothing mutated.
204 means mergeable; 409 carries the blocking reason.



## OpenAPI

````yaml post /billing/payment-terminal/validate-absorbed-charges
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/payment-terminal/validate-absorbed-charges:
    post:
      tags:
        - Payment Terminals
      summary: Validate Absorbed Charges Route
      description: >-
        Answer whether these outstanding charges can be merged into a checkout,

        without collecting anything.


        Checkout needs this the moment staff add a charge, not at payment time.

        Some blockers — a package redeemed against another charge, a realized

        inventory drawdown, a membership log — live in tables the client never

        fetches, so the UI offers a merge it cannot know is refused. Until this

        endpoint existed the only answer came from payin-config setup, which
        fires

        on a debounced effect: the charge would sit in the ticket as a merged
        line

        and then convert to a paid-separately charge at some unpredictable later

        moment, or not until settlement.


        Read-only: same rules as ``archive_absorbed_charges``, nothing mutated.

        204 means mergeable; 409 carries the blocking reason.
      operationId: >-
        validate_absorbed_charges_route_billing_payment_terminal_validate_absorbed_charges_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AbsorbedChargeValidationRequest'
        required: true
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AbsorbedChargeValidationRequest:
      properties:
        sourceChargeIds:
          items:
            type: string
          type: array
          title: Sourcechargeids
          description: Outstanding charges the checkout wants to absorb.
        targetPatientId:
          type: string
          title: Targetpatientid
          description: Patient the merged charge belongs to; sources must match.
      type: object
      required:
        - sourceChargeIds
        - targetPatientId
      title: AbsorbedChargeValidationRequest
      description: >-
        Ask whether outstanding charges can be merged into a checkout.


        Used by checkout the moment staff add one, so a charge the server will

        refuse is routed to "pay it separately" immediately rather than sitting
        in

        the ticket as a merged line until payment.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````