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

# Preview Charge Reversal Endpoint

> Return which side-effect categories apply to this charge and how many units each would restore.

Shared by the refund flow (full-refund reversal options) and the delete/archive
flow, so it accepts either billing:payments:refund or billing:payments:delete.



## OpenAPI

````yaml get /billing/charge/{charge_id}/reversal-preview
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/charge/{charge_id}/reversal-preview:
    get:
      tags:
        - Charges
      summary: Preview Charge Reversal Endpoint
      description: >-
        Return which side-effect categories apply to this charge and how many
        units each would restore.


        Shared by the refund flow (full-refund reversal options) and the
        delete/archive

        flow, so it accepts either billing:payments:refund or
        billing:payments:delete.
      operationId: >-
        preview_charge_reversal_endpoint_billing_charge__charge_id__reversal_preview_get
      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
        - name: charge_id
          in: path
          required: true
          schema:
            type: string
            title: Charge Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReversalPreview'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ReversalPreview:
      properties:
        chargeId:
          type: string
          title: Chargeid
        inventory:
          $ref: '#/components/schemas/ReversalCategoryPreview'
        memberDiscounts:
          $ref: '#/components/schemas/ReversalCategoryPreview'
        savedItems:
          $ref: '#/components/schemas/ReversalCategoryPreview'
        packagePurchases:
          $ref: '#/components/schemas/ReversalPackagesPreview'
        packageRedemptions:
          $ref: '#/components/schemas/ReversalPackagesPreview'
        membership:
          $ref: '#/components/schemas/ReversalMembershipPreview'
        patientCreditRedemptions:
          $ref: '#/components/schemas/ReversalPatientCreditRedemptionsPreview'
      type: object
      required:
        - chargeId
        - inventory
        - memberDiscounts
        - savedItems
        - packagePurchases
        - packageRedemptions
        - membership
        - patientCreditRedemptions
      title: ReversalPreview
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReversalCategoryPreview:
      properties:
        applicable:
          type: boolean
          title: Applicable
        count:
          type: integer
          title: Count
      type: object
      required:
        - applicable
        - count
      title: ReversalCategoryPreview
    ReversalPackagesPreview:
      properties:
        applicable:
          type: boolean
          title: Applicable
        count:
          type: integer
          title: Count
        packageNames:
          items:
            type: string
          type: array
          title: Packagenames
          default: []
      type: object
      required:
        - applicable
        - count
      title: ReversalPackagesPreview
    ReversalMembershipPreview:
      properties:
        applicable:
          type: boolean
          title: Applicable
        count:
          type: integer
          title: Count
        membershipName:
          anyOf:
            - type: string
            - type: 'null'
          title: Membershipname
        creditAmountCents:
          type: integer
          title: Creditamountcents
          default: 0
      type: object
      required:
        - applicable
        - count
      title: ReversalMembershipPreview
    ReversalPatientCreditRedemptionsPreview:
      properties:
        applicable:
          type: boolean
          title: Applicable
        count:
          type: integer
          title: Count
        amountCents:
          type: integer
          title: Amountcents
          default: 0
      type: object
      required:
        - applicable
        - count
      title: ReversalPatientCreditRedemptionsPreview
    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

````