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

# Create Insurance Payment

> Record an insurance payment against a charge.



## OpenAPI

````yaml post /billing/insurance-payment/create
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/insurance-payment/create:
    post:
      tags:
        - provider
        - billing
      summary: Create Insurance Payment
      operationId: create_insurance_payment_billing_insurance_payment_create_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/InsurancePaymentCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsurancePaymentSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InsurancePaymentCreate:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the insurance payment.
        insurer:
          type: string
          title: Insurer
          description: Name of the insurer.
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
          description: Optional comment about the payment.
        amount:
          type: integer
          title: Amount
          description: Amount of the payment.
        currency:
          type: string
          title: Currency
          description: Currency of the payment.
          default: USD
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: Location of the payment.
        creatorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorid
          description: ID of the provider who created this payment.
      type: object
      required:
        - id
        - insurer
        - amount
      title: InsurancePaymentCreate
    InsurancePaymentSummary:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the insurance payment.
        insurer:
          type: string
          title: Insurer
          description: Name of the insurer.
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
          description: Optional comment about the payment.
        amount:
          type: integer
          title: Amount
          description: Amount of the payment.
        currency:
          type: string
          title: Currency
          description: Currency of the payment.
        status:
          $ref: '#/components/schemas/PaymentStatus'
          description: Status of the payment.
        payinId:
          type: string
          title: Payinid
          description: Unique identifier for the payin.
        payinConfigId:
          type: string
          title: Payinconfigid
          description: Unique identifier for the payin configuration.
        paymentMedium:
          $ref: '#/components/schemas/PaymentMedium'
          description: Medium of the payment.
        fee:
          type: integer
          title: Fee
          description: Fee associated with the payment.
        paymentMethod:
          anyOf:
            - $ref: '#/components/schemas/PaymentMethodSummary'
            - type: 'null'
          description: Summary of the payment method used.
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: The date when the payment was created.
        creatorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorid
          description: ID of the provider who created this payment.
      type: object
      required:
        - id
        - insurer
        - amount
        - currency
        - status
        - payinId
        - payinConfigId
        - paymentMedium
        - fee
        - createdDate
      title: InsurancePaymentSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PaymentStatus:
      type: string
      enum:
        - CANCELED
        - CREATED
        - FAILED
        - IN_REVIEW
        - PRESENTING
        - PROCESSING
        - SUCCEEDED
      title: PaymentStatus
    PaymentMedium:
      type: string
      enum:
        - POS
        - VIRTUAL_TERMINAL
        - PAYMENT_LINK
        - PAYMENT_PLAN
        - SUBSCRIPTION
        - SAVED_PAYMENT_METHOD
        - MEMBERSHIP
        - CASH
        - CHECK
        - CARE_CREDIT
        - PATIENT_CREDIT
      title: PaymentMedium
      description: >-
        Payment medium types supported by the system.


        These fall into two categories:

        1. Payment Processor Mediums: Require Rainforest/Stripe payin (card
        processing)

        2. External Settlement Mediums: Settled outside the system (cash, check,
        etc.)
    PaymentMethodSummary:
      properties:
        id:
          type: string
          title: Id
        patientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientid
        rainforestPaymentMethodId:
          type: string
          title: Rainforestpaymentmethodid
        brand:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand
        last4:
          anyOf:
            - type: string
            - type: 'null'
          title: Last4
        expMonth:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expmonth
        expYear:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expyear
        accountHolderType:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholdertype
        accountNumberLast4:
          anyOf:
            - type: integer
            - type: 'null'
          title: Accountnumberlast4
        bankName:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankname
        routingNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Routingnumber
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        type:
          anyOf:
            - $ref: '#/components/schemas/PaymentMethodType'
            - type: 'null'
        isDefault:
          type: boolean
          title: Isdefault
          default: false
        isArchived:
          type: boolean
          title: Isarchived
          default: false
      type: object
      required:
        - id
        - patientId
        - rainforestPaymentMethodId
        - brand
        - last4
        - expMonth
        - expYear
        - accountHolderType
        - accountNumberLast4
        - bankName
        - routingNumber
        - description
        - type
      title: PaymentMethodSummary
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PaymentMethodType:
      type: string
      enum:
        - CARD
        - ACH
        - APPLE_PAY
      title: PaymentMethodType

````