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

# Retrieve payment link

> Retrieve a payment link by secret



## OpenAPI

````yaml https://api.halth.com/v1/api-yaml get /v1/payment-links/{paymentLinkSecret}
openapi: 3.0.0
info:
  title: HaltH API
  description: The API for the HaltH platform business services
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.halth.com
    description: Production
  - url: https://api.stg.halth.com
    description: Staging
security: []
tags: []
paths:
  /v1/payment-links/{paymentLinkSecret}:
    get:
      tags:
        - Payment Link
      summary: Retrieve payment link
      description: Retrieve a payment link by secret
      operationId: PaymentLinkController_retrieve
      parameters:
        - name: paymentLinkSecret
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessTransactionReceipt'
components:
  schemas:
    BusinessTransactionReceipt:
      type: object
      properties:
        organisationId:
          type: string
          description: The ID of the organisation
          deprecated: true
        organisation:
          $ref: '#/components/schemas/Organisation'
        businessTransaction:
          $ref: '#/components/schemas/BusinessTransaction'
        business:
          $ref: '#/components/schemas/Business'
        booking:
          $ref: '#/components/schemas/Booking'
        clientPlan:
          $ref: '#/components/schemas/ClientPlan'
      required:
        - organisationId
        - organisation
        - businessTransaction
        - business
    Organisation:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the organisation
          example: org_31XEcUshz1ymodA14HALnyP48g1
        name:
          type: string
          description: Name of the organisation
          example: Acme Healthcare
        slug:
          type: string
          description: URL-friendly identifier for the organisation
          example: acme-healthcare
        createdAt:
          format: date-time
          type: string
          description: Date when the organisation was created
          example: '2023-01-15T10:30:00Z'
        brandImageUrl:
          type: string
          nullable: true
          description: URL to the organisation's brand image
          example: https://example.com/brand-image.png
        bookingsEnabled:
          type: boolean
          description: True if bookings are enabled for this organisation
          example: true
        wordmarkImageUrl:
          type: string
          nullable: true
          description: URL to the organisation's wordmark image
          example: https://example.com/wordmark-image.png
        websiteUrl:
          type: string
          nullable: true
          description: URL to the organisation's website
          example: https://example.com
          deprecated: true
      required:
        - id
        - name
        - slug
        - createdAt
        - bookingsEnabled
    BusinessTransaction:
      type: object
      properties:
        customer:
          type: object
          properties:
            name:
              type: string
          required:
            - name
        id:
          type: string
        businessId:
          type: string
        createdAt:
          format: date-time
          type: string
        reason:
          enum:
            - standard
            - late_cancellation
            - no_show
          type: string
        status:
          enum:
            - pending
            - completed
            - requires_confirmation
            - requires_payment
            - requires_review
            - reversed
            - refunded
            - failed
          type: string
        amount:
          type: number
        currency:
          type: string
        paymentTransactions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentTransaction'
        transactionItems:
          type: array
          items:
            $ref: '#/components/schemas/TransactionItem'
        confirmations:
          type: array
          items:
            $ref: '#/components/schemas/BusinessTransactionConfirmation'
        paymentMethodId:
          type: string
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        healthFundCardId:
          type: string
        healthFundCard:
          $ref: '#/components/schemas/HealthFundCard'
        medicareCardId:
          type: string
        medicareCard:
          $ref: '#/components/schemas/MedicareCard'
        bookingId:
          type: string
        clientName:
          type: string
        client:
          $ref: '#/components/schemas/Client'
        serviceProvider:
          $ref: '#/components/schemas/Provider'
        location:
          $ref: '#/components/schemas/BusinessLocation'
        clientPlanId:
          type: string
      required:
        - id
        - businessId
        - createdAt
        - reason
        - status
        - amount
        - currency
        - paymentTransactions
        - transactionItems
        - confirmations
    Business:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        taxIdentifier:
          type: string
        countryCode:
          type: string
        structure:
          enum:
            - public_corporation
            - private_corporation
            - sole_proprietorship
            - private_partnership
            - trust
            - incorporated_non_profit
            - unincorporated_association
          type: string
        merchantId:
          type: string
        capabilities:
          type: array
          items:
            $ref: '#/components/schemas/BusinessCapability'
        settings:
          $ref: '#/components/schemas/BusinessSettings'
        createdAt:
          format: date-time
          type: string
        events:
          type: object
        websiteUrl:
          type: string
        address:
          $ref: '#/components/schemas/AddressDetails'
      required:
        - id
        - name
        - settings
        - createdAt
    Booking:
      type: object
      properties:
        tags:
          type: array
          items:
            enum:
              - transaction_awaiting_payment
              - payment_method_available
              - health_fund_card_available
          description: Normalised attribute tags for the booking
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        locationId:
          type: string
        location:
          $ref: '#/components/schemas/BusinessLocation'
        status:
          enum:
            - confirmed
            - cancelled
          type: string
        arrivalStatus:
          enum:
            - did_not_arrive
            - arrived
          type: string
        providerId:
          type: string
        provider:
          $ref: '#/components/schemas/Provider'
        appointmentTypeId:
          type: string
        appointmentType:
          $ref: '#/components/schemas/AppointmentType'
        serviceDate:
          format: date-time
          type: string
        servicePrice:
          type: number
        client:
          $ref: '#/components/schemas/Client'
        clientId:
          type: string
        cancelledAt:
          format: date-time
          type: string
        source:
          enum:
            - pms
            - halth
            - unknown
          type: string
        healthFundCard:
          $ref: '#/components/schemas/HealthFundCard'
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        providerLocationLink:
          $ref: '#/components/schemas/ProviderLocationLink'
        cancellationPolicy:
          $ref: '#/components/schemas/BookingCancellationPolicy'
        paid:
          type: boolean
        invoiced:
          type: boolean
        latestTransaction:
          $ref: '#/components/schemas/BusinessTransaction'
        adjustments:
          type: array
          items:
            $ref: '#/components/schemas/BookingAdjustment'
        pmsBookingId:
          type: string
        pmsAttendeeId:
          type: string
      required:
        - id
        - createdAt
        - locationId
        - location
        - status
        - providerId
        - provider
        - appointmentTypeId
        - appointmentType
        - serviceDate
        - client
        - clientId
        - source
        - paid
        - invoiced
        - adjustments
    ClientPlan:
      type: object
      properties:
        client:
          title: Client
          description: Expandable field
          allOf:
            - $ref: '#/components/schemas/Client'
        organisation:
          title: Organisation
          description: Expandable field
          allOf:
            - $ref: '#/components/schemas/Organisation'
        billingType:
          enum:
            - one_off
            - recurring
          type: string
          description: >-
            Whether the plan is billed as a one-off or on a recurring basis.
            Recurring when the plan has a subscription.
          example: one_off
        bookingCredits:
          title: Booking credits
          description: Expandable field
          type: array
          items:
            $ref: '#/components/schemas/BookingCredit'
        charges:
          title: Charges
          description: Expandable field
          type: array
          items:
            $ref: '#/components/schemas/ClientPlanCharge'
        id:
          type: string
        createdAt:
          type: string
        clientId:
          type: string
        organisationId:
          type: string
        status:
          enum:
            - created
            - active
            - inactive
            - cancelled
            - past_due
            - completed
          type: string
        paymentTiming:
          enum:
            - pay_later
            - prepaid
          type: string
        plan:
          $ref: '#/components/schemas/ClientPlanPlan'
        subscription:
          $ref: '#/components/schemas/ClientPlanSubscription'
      required:
        - billingType
        - id
        - createdAt
        - clientId
        - status
        - paymentTiming
        - plan
    PaymentTransaction:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        source:
          type: string
        amount:
          type: number
        platformFeeAmount:
          type: number
        status:
          type: string
          enum:
            - pending
            - confirmed
            - reversed
            - refunded
            - requires_confirmation
            - requires_payment
            - requires_review
            - failed
        paymentType:
          enum:
            - cash
            - card_saved
            - card_present
            - payment_link
            - booking_credit
            - none
          type: string
        confirmationReason:
          enum:
            - payment_limit_exceeded
            - phi_claim
            - requires_consent
          type: string
        paymentId:
          type: string
        payment:
          $ref: '#/components/schemas/Payment'
        claimId:
          type: string
        claim:
          $ref: '#/components/schemas/PhiClaim'
        medicareClaimId:
          type: string
        medicareClaim:
          $ref: '#/components/schemas/MedicareClaim'
        paymentLinks:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLink'
        adjustmentTransactions:
          type: array
          items:
            $ref: '#/components/schemas/AdjustmentTransaction'
        events:
          type: array
          items:
            $ref: '#/components/schemas/PaymentTransactionEvent'
      required:
        - id
        - createdAt
        - source
        - amount
        - status
        - paymentType
        - adjustmentTransactions
    TransactionItem:
      type: object
      properties:
        id:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - charge
            - discount
            - icd_code
        chargeAmount:
          type: number
        clinicalCode:
          type: string
        itemCode:
          type: string
        billableItemId:
          type: string
        billableItem:
          $ref: '#/components/schemas/BillableItem'
        appointmentTypeId:
          type: string
      required:
        - type
        - chargeAmount
    BusinessTransactionConfirmation:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        contactType:
          enum:
            - sms
            - email
          type: string
        contactValue:
          type: string
        verificationCode:
          type: string
        verified:
          type: boolean
        verifiedAt:
          format: date-time
          type: string
        action:
          enum:
            - payment_confirmation
            - claim_confirmation
            - claim_cancellation
          type: string
        expiresAt:
          format: date-time
          type: string
      required:
        - id
        - createdAt
        - contactType
        - contactValue
        - verified
        - action
        - expiresAt
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
        brand:
          type: string
        last4:
          type: string
        customerId:
          type: string
      required:
        - id
    HealthFundCard:
      type: object
      properties:
        id:
          type: string
        status:
          enum:
            - pending
            - active
          type: string
        memberNumberLast4:
          type: string
        createdAt:
          format: date-time
          type: string
        healthFundId:
          type: string
        healthFund:
          $ref: '#/components/schemas/HealthFund'
        cardholders:
          type: array
          items:
            $ref: '#/components/schemas/HealthFundCardCardholder'
        fingerprint:
          type: string
        defaultReferenceNumber:
          type: string
        issueNumber:
          type: string
        verified:
          type: boolean
        verifiedAt:
          format: date-time
          type: string
      required:
        - id
        - status
        - memberNumberLast4
        - createdAt
        - healthFundId
        - healthFund
        - cardholders
        - fingerprint
        - verified
    MedicareCard:
      type: object
      properties:
        id:
          type: string
        memberNumberLast4:
          type: string
        referenceNumber:
          type: string
        createdAt:
          format: date-time
          type: string
        fingerprint:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        dateOfBirth:
          type: string
        secondInitial:
          type: string
        sex:
          type: string
        verified:
          type: boolean
        verifiedAt:
          format: date-time
          type: string
      required:
        - id
        - memberNumberLast4
        - referenceNumber
        - createdAt
        - fingerprint
        - firstName
        - lastName
        - dateOfBirth
        - verified
    Client:
      type: object
      properties:
        memberId:
          type: string
          description: The ID of the member if the client has joined HaltH
          example: memb_38JiySr0Z0ePjHpqvosimyLQuUC
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        dateOfBirth:
          type: string
        mobileNumber:
          type: string
        email:
          type: string
        source:
          enum:
            - pms
            - halth
            - unknown
          type: string
        pmsPatientId:
          type: string
        pmsCreatedAt:
          format: date-time
          type: string
        deleted:
          type: boolean
        createdAt:
          format: date-time
          type: string
        profileImageUrl:
          type: string
      required:
        - id
        - deleted
        - createdAt
    Provider:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        mobileNumber:
          type: string
        email:
          type: string
        firstName:
          type: string
        middleName:
          type: string
        lastName:
          type: string
        title:
          enum:
            - Dr
            - Mr
            - Mrs
            - Ms
            - Miss
          type: string
        profileImageUrl:
          type: string
        locationIds:
          type: array
          items:
            type: string
        deleted:
          type: boolean
        bookingsEnabled:
          type: boolean
        locationLinks:
          type: array
          items:
            $ref: '#/components/schemas/ProviderLocationLink'
        locations:
          type: array
          items:
            $ref: '#/components/schemas/BusinessLocation'
        registrations:
          type: array
          items:
            $ref: '#/components/schemas/ProviderRegistration'
      required:
        - id
        - createdAt
        - locationIds
        - deleted
        - bookingsEnabled
    BusinessLocation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        displayName:
          type: string
        createdAt:
          format: date-time
          type: string
        timeZone:
          type: string
        suggestedTaxIdentifier:
          type: string
        address:
          $ref: '#/components/schemas/AddressDetails'
        bookingCustomText:
          type: string
        businessId:
          type: string
        business:
          $ref: '#/components/schemas/Business'
        email:
          type: string
        registrations:
          type: array
          items:
            $ref: '#/components/schemas/LocationRegistration'
        organisationId:
          type: string
        organisation:
          $ref: '#/components/schemas/Organisation'
        isBookable:
          type: boolean
      required:
        - id
        - name
        - createdAt
        - timeZone
        - address
    BusinessCapability:
      type: object
      properties:
        id:
          enum:
            - bookings_client_funding_phi
            - payments
            - payouts
            - phi_funding
            - medicare_funding_onboarding
            - medicare_funding
            - client_invite
          type: string
        status:
          enum:
            - inactive
            - pending
            - active
            - paused
          type: string
      required:
        - id
        - status
    BusinessSettings:
      type: object
      properties:
        autoReconciliationEnabled:
          type: boolean
        autoInviteClientsEnabled:
          type: boolean
      required:
        - autoReconciliationEnabled
        - autoInviteClientsEnabled
    AddressDetails:
      type: object
      properties:
        line1:
          type: string
          nullable: true
        line2:
          type: string
          nullable: true
        suburb:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        postcode:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        countryCode:
          type: string
          nullable: true
    AppointmentType:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        durationMinutes:
          type: number
        price:
          type: number
        type:
          type: string
          enum:
            - individual
            - group
        category:
          type: string
        providers:
          type: array
          items:
            type: string
        locations:
          type: array
          items:
            type: string
        createdAt:
          type: string
        deleted:
          type: boolean
        maxAttendees:
          type: number
        billableItems:
          type: array
          items:
            $ref: '#/components/schemas/BillableItem'
      required:
        - id
        - name
        - durationMinutes
        - price
        - type
        - providers
        - locations
        - createdAt
        - deleted
        - maxAttendees
    ProviderLocationLink:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        providerId:
          type: string
        locationId:
          type: string
        deleted:
          type: boolean
        serviceTypeCode:
          enum:
            - F
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - P
            - M
            - '1'
            - E
            - U
            - C
            - S
            - B
            - 'N'
            - H
            - Z
            - '0'
            - '2'
            - V
            - T
            - O
            - A
            - L
            - R
            - G
            - Q
            - X
            - W
            - I
            - K
            - 'Y'
            - D
          type: string
        categoryCode:
          type: string
        medicare:
          $ref: '#/components/schemas/ProviderLocationLinkMedicare'
        association:
          $ref: '#/components/schemas/ProviderLocationLinkAssociation'
        acceptedTerms:
          type: boolean
        registrationStatus:
          enum:
            - not_started
            - registered
          type: string
        applicationStatus:
          enum:
            - not_started
            - pending
            - approved
          type: string
      required:
        - id
        - createdAt
        - providerId
        - locationId
        - deleted
        - acceptedTerms
        - registrationStatus
        - applicationStatus
    BookingCancellationPolicy:
      type: object
      properties:
        enabled:
          type: boolean
          description: True if the cancellation policy is enabled
        rules:
          description: Cancellation policy rules
          allOf:
            - $ref: '#/components/schemas/CancellationPolicyRules'
        fee:
          description: Cancellation fee evaluation
          allOf:
            - $ref: '#/components/schemas/CancellationFee'
      required:
        - enabled
        - rules
    BookingAdjustment:
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        balanceEffectIndicator:
          type: number
        type:
          type: string
          enum:
            - provider_funding
        description:
          type: string
      required:
        - id
        - amount
        - balanceEffectIndicator
        - type
    BookingCredit:
      type: object
      properties:
        id:
          type: string
        status:
          enum:
            - available
            - booked
            - redeemed
            - voided
          type: string
        clientPlanId:
          type: string
        clientPlanItemId:
          type: string
        appointmentTypeId:
          type: string
          nullable: true
        price:
          type: number
        currency:
          type: string
        paidAt:
          format: date-time
          type: string
          nullable: true
        bookedAt:
          format: date-time
          type: string
          nullable: true
        redeemedAt:
          format: date-time
          type: string
          nullable: true
        isPaid:
          type: boolean
        isBooked:
          type: boolean
      required:
        - id
        - status
        - clientPlanId
        - clientPlanItemId
        - appointmentTypeId
        - price
        - currency
        - paidAt
        - bookedAt
        - redeemedAt
        - isPaid
        - isBooked
    ClientPlanCharge:
      type: object
      properties:
        id:
          type: string
        clientPlanId:
          type: string
        cycleNumber:
          type: number
        status:
          type: string
          enum:
            - pending
            - succeeded
            - failed
            - reversed
        amount:
          type: number
        currency:
          type: string
        businessTransactionId:
          type: string
      required:
        - id
        - clientPlanId
        - cycleNumber
        - status
        - amount
        - currency
    ClientPlanPlan:
      type: object
      properties:
        planTemplateId:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        discountRate:
          type: number
        discountAmount:
          type: number
        items:
          type: array
          items:
            $ref: '#/components/schemas/ClientPlanItem'
      required:
        - planTemplateId
        - name
        - discountRate
        - discountAmount
        - items
    ClientPlanSubscription:
      type: object
      properties:
        startsAt:
          type: string
        billingFrequency:
          type: string
          enum:
            - daily
            - weekly
            - fortnightly
            - monthly
            - quarterly
            - biannual
            - yearly
        billingEndType:
          type: string
          enum:
            - none
            - date
            - cycles
        billingCycleCount:
          type: number
        endsAt:
          type: string
        nextBillingAt:
          format: date-time
          type: string
        cyclesCompleted:
          type: number
      required:
        - startsAt
        - billingFrequency
        - billingEndType
        - cyclesCompleted
    Payment:
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        currency:
          type: string
        status:
          type: string
        paymentMethodId:
          type: string
        clientSecret:
          type: string
      required:
        - id
        - amount
        - currency
        - status
    PhiClaim:
      type: object
      properties:
        id:
          type: string
        referenceNumber:
          type: string
        status:
          enum:
            - created
            - submitted
            - confirmed
            - cancelled
            - rejected
            - voided
          type: string
        createdAt:
          format: date-time
          type: string
        isRebateEstimate:
          type: boolean
        totalChargeAmount:
          type: number
        totalRebateAmount:
          type: number
        totalGapAmount:
          type: number
        serviceTypeCode:
          enum:
            - F
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - P
            - M
            - '1'
            - E
            - U
            - C
            - S
            - B
            - 'N'
            - H
            - Z
            - '0'
            - '2'
            - V
            - T
            - O
            - A
            - L
            - R
            - G
            - Q
            - X
            - W
            - I
            - K
            - 'Y'
            - D
          type: string
        providerNumber:
          type: string
        cancelledAt:
          format: date-time
          type: string
        voidedAt:
          format: date-time
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/PhiClaimItem'
        response:
          $ref: '#/components/schemas/PhiClaimResponse'
        device:
          $ref: '#/components/schemas/Device'
        serviceType:
          $ref: '#/components/schemas/ServiceType'
        healthFund:
          $ref: '#/components/schemas/HealthFund'
        payment:
          $ref: '#/components/schemas/PhiClaimPayment'
        provider:
          type: object
          properties:
            providerNumber:
              type: string
            name:
              type: string
            categoryCode:
              type: string
            serviceTypeCode:
              enum:
                - F
                - '3'
                - '4'
                - '5'
                - '6'
                - '7'
                - '8'
                - '9'
                - P
                - M
                - '1'
                - E
                - U
                - C
                - S
                - B
                - 'N'
                - H
                - Z
                - '0'
                - '2'
                - V
                - T
                - O
                - A
                - L
                - R
                - G
                - Q
                - X
                - W
                - I
                - K
                - 'Y'
                - D
              type: string
          required:
            - providerNumber
            - name
            - categoryCode
            - serviceTypeCode
        rules:
          $ref: '#/components/schemas/PhiClaimRules'
      required:
        - id
        - referenceNumber
        - status
        - createdAt
        - isRebateEstimate
        - totalChargeAmount
        - totalRebateAmount
        - totalGapAmount
        - serviceTypeCode
        - providerNumber
        - items
        - device
        - serviceType
        - healthFund
        - rules
    MedicareClaim:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - created
            - submitted
            - confirmed
            - rejected
            - requires_review
            - in_review
            - cancelled
            - failed
        reference:
          type: string
        patientMedicareCardId:
          type: string
        patientMedicareCard:
          $ref: '#/components/schemas/MedicareCard'
        claimantMedicareCardId:
          type: string
        claimantMedicareCard:
          $ref: '#/components/schemas/MedicareCard'
        createdAt:
          format: date-time
          type: string
        type:
          type: object
        totalChargeAmount:
          type: number
        totalRebateAmount:
          type: number
        totalGapAmount:
          type: number
        itemsCount:
          type: number
        mcolTransactionId:
          type: string
        mcolClaimId:
          type: string
        mcolErrorCode:
          type: string
        mcolErrorMessage:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/MedicareClaimItem'
        paymentStatus:
          type: object
        transactionId:
          type: string
        rules:
          $ref: '#/components/schemas/MedicareClaimRules'
      required:
        - id
        - status
        - createdAt
        - type
        - totalChargeAmount
        - totalRebateAmount
        - totalGapAmount
        - itemsCount
        - mcolTransactionId
        - items
        - paymentStatus
        - rules
    PaymentLink:
      type: object
      properties:
        url:
          type: string
          description: Customer URL to complete the payment
          example: https://app.halth.com/pay/1234567890
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        expiresAt:
          format: date-time
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLinkEvent'
      required:
        - url
        - id
        - createdAt
        - expiresAt
        - events
    AdjustmentTransaction:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        source:
          type: string
        amount:
          type: number
      required:
        - id
        - createdAt
        - source
        - amount
    PaymentTransactionEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - payment_transaction.created
            - payment_transaction.confirmed
            - payment_transaction.reversed
            - payment_transaction.refunded
            - payment_transaction.failed
        status:
          type: string
          enum:
            - pending
            - confirmed
            - reversed
            - refunded
            - requires_confirmation
            - requires_payment
            - requires_review
            - failed
        previousStatus:
          type: string
          enum:
            - pending
            - confirmed
            - reversed
            - refunded
            - requires_confirmation
            - requires_payment
            - requires_review
            - failed
        createdAt:
          format: date-time
          type: string
        createdBy:
          type: string
        createdByMember:
          $ref: '#/components/schemas/Member'
      required:
        - status
        - createdAt
        - createdBy
    BillableItem:
      type: object
      properties:
        name:
          type: string
          description: Short description of the item
        basePrice:
          type: number
          description: Price before tax
        totalPrice:
          type: number
          description: Price including tax
        taxAmount:
          type: number
          description: Tax amount
        taxRate:
          type: number
          description: Tax rate
        itemCode:
          type: string
          nullable: true
          description: Item code for funding and claiming
        serviceItem:
          description: The service item linked to the item code on this billable item
          allOf:
            - $ref: '#/components/schemas/ServiceItem'
        type:
          enum:
            - service
            - product
            - class
            - other
          type: string
          description: Type of billable item
        pmsBillableItemId:
          type: string
          description: PMS assigned ID
        id:
          type: string
      required:
        - name
        - basePrice
        - totalPrice
        - taxAmount
        - taxRate
        - type
        - id
    HealthFund:
      type: object
      properties:
        id:
          enum:
            - ACA
            - AUNITY
            - BUPA
            - HCF
            - NAVY
            - UNI
            - FRANK
            - HIWA
            - QCH
            - TERR
            - DEFH
            - ONEMED
            - SEEU
            - LATRO
            - RT
            - TUH
            - UNION
            - POLICE
            - PHNX
            - ADF
            - HPART
            - STLUK
            - ASTUTE
            - RBHS
            - DOC
            - ING
            - PRICE
            - REAL
            - SNRS
            - IMAN
            - TEST
            - BUDGET
            - AHM
            - CBHSC
            - MEDIB
            - TEACH
            - HLTEST
            - HBF
            - GMHBA
            - PEOPLE
            - CBHS
            - WEST
            - HCI
            - AIA
            - AAMI
            - APIA
            - QANTAS
            - SUN
            - NIB
            - MILD
            - GU
          type: string
        name:
          type: string
        capabilities:
          $ref: '#/components/schemas/HealthFundCapabilities'
      required:
        - id
        - name
        - capabilities
    HealthFundCardCardholder:
      type: object
      properties:
        referenceNumber:
          type: string
        name:
          type: string
      required:
        - referenceNumber
        - name
    ProviderRegistration:
      type: object
      properties:
        id:
          type: string
        providerId:
          type: string
        type:
          enum:
            - medicare
            - phi
            - ndis
          type: string
        status:
          enum:
            - inactive
            - pending
            - active
            - paused
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deleted:
          type: boolean
        deletedAt:
          format: date-time
          type: string
        ndis:
          $ref: '#/components/schemas/ProviderRegistrationNdis'
        medicare:
          $ref: '#/components/schemas/ProviderRegistrationMedicare'
        phi:
          $ref: '#/components/schemas/ProviderRegistrationPhi'
      required:
        - id
        - providerId
        - type
        - status
        - createdAt
        - updatedAt
        - deleted
    LocationRegistration:
      type: object
      properties:
        type:
          type: string
          enum:
            - medicare
            - phi
        medicare:
          $ref: '#/components/schemas/MedicareRegistration'
        phi:
          $ref: '#/components/schemas/PhiRegistration'
      required:
        - type
    ProviderLocationLinkMedicare:
      type: object
      properties:
        suggestedProviderNumber:
          type: string
        providerNumber:
          type: string
        startDate:
          format: date-time
          type: string
        registrationLetterFileId:
          type: string
    ProviderLocationLinkAssociation:
      type: object
      properties:
        registrationLetterFileId:
          type: string
    CancellationPolicyRules:
      type: object
      properties:
        clientCancel:
          $ref: '#/components/schemas/BookingPolicyRule'
        clientReschedule:
          $ref: '#/components/schemas/BookingPolicyRule'
      required:
        - clientCancel
        - clientReschedule
    CancellationFee:
      type: object
      properties:
        amount:
          type: number
          description: Flat amount or calculated percentage of the service price
        percent:
          type: number
          description: Fee percentage of the service price
        freeCancellationHours:
          type: number
          description: Hours before service date the client can cancel without fee
        latestNoFeeAt:
          format: date-time
          type: string
          description: Latest date the client can cancel without fee
        billable:
          type: boolean
          description: >-
            True if the cancellation policy has been violated and fee can be
            charged
      required:
        - amount
        - freeCancellationHours
        - latestNoFeeAt
        - billable
    ClientPlanItem:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
        clientPlanId:
          type: string
        planTemplateItemId:
          type: string
          nullable: true
        appointmentTypeId:
          type: string
          nullable: true
        providerId:
          type: string
          nullable: true
        billableItemId:
          type: string
          nullable: true
        basePrice:
          type: number
        price:
          type: number
        taxRate:
          type: number
        currency:
          type: string
        name:
          type: string
      required:
        - id
        - createdAt
        - clientPlanId
        - planTemplateItemId
        - appointmentTypeId
        - providerId
        - billableItemId
        - basePrice
        - price
        - taxRate
        - currency
        - name
    PhiClaimItem:
      type: object
      properties:
        id:
          type: string
        chargeAmount:
          type: number
        itemCode:
          type: string
        serviceDate:
          format: date-time
          type: string
        serviceReference:
          type: string
        patientReferenceNumber:
          type: string
        rebateAmount:
          type: number
        itemDescription:
          type: string
        itemName:
          type: string
        response:
          $ref: '#/components/schemas/PhiClaimItemResponse'
      required:
        - id
        - chargeAmount
        - itemCode
        - serviceDate
        - patientReferenceNumber
        - rebateAmount
    PhiClaimResponse:
      type: object
      properties:
        statusCode:
          type: string
        responseCode:
          type: string
        freeText:
          type: string
    Device:
      type: object
      properties:
        terminalId:
          type: string
    ServiceType:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
      required:
        - code
        - name
    PhiClaimPayment:
      type: object
      properties:
        paymentAmount:
          type: number
        bankAccountNumberLast4:
          type: string
        bankAccountBsb:
          type: string
        paymentDate:
          format: date-time
          type: string
        paymentReference:
          type: string
      required:
        - paymentAmount
        - bankAccountNumberLast4
        - bankAccountBsb
        - paymentDate
        - paymentReference
    PhiClaimRules:
      type: object
      properties:
        reversal:
          type: object
          properties:
            enabled:
              type: boolean
          required:
            - enabled
      required:
        - reversal
    MedicareClaimItem:
      type: object
      properties:
        id:
          type: string
        itemCode:
          type: string
        chargeAmount:
          type: number
        rebateAmount:
          type: number
        gapAmount:
          type: number
        mcolAssessmentCode:
          type: string
        mcolErrorCode:
          type: string
        mcolErrorMessage:
          type: string
        patientCount:
          type: number
        quantity:
          type: number
      required:
        - id
        - itemCode
        - chargeAmount
        - rebateAmount
        - gapAmount
    MedicareClaimRules:
      type: object
      properties:
        reversal:
          type: object
          properties:
            enabled:
              type: boolean
          required:
            - enabled
      required:
        - reversal
    PaymentLinkEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - payment_link.created
            - payment_link.expired
            - payment_link.paid
            - payment_link.sms_sent
            - payment_link.email_sent
            - payment_link.cancelled
        createdAt:
          format: date-time
          type: string
      required:
        - type
        - createdAt
    Member:
      type: object
      properties:
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        emailVerified:
          type: boolean
        mobileNumber:
          type: string
        mobileNumberVerified:
          type: boolean
        dateOfBirth:
          type: string
        createdAt:
          format: date-time
          type: string
        roles:
          type: array
          items:
            type: string
        profileImageUrl:
          type: string
        activity:
          type: array
          items:
            $ref: '#/components/schemas/MemberActivity'
        settings:
          $ref: '#/components/schemas/MemberSettings'
      required:
        - id
        - emailVerified
        - mobileNumberVerified
        - createdAt
        - settings
    ServiceItem:
      type: object
      properties:
        id:
          type: string
        description:
          type: string
        itemCode:
          type: string
        category:
          type: string
        source:
          enum:
            - phi
            - medicare
          type: string
      required:
        - id
        - itemCode
        - category
        - source
    HealthFundCapabilities:
      type: object
      properties:
        claims:
          type: string
          enum:
            - active
            - inactive
        rebatesEstimates:
          type: string
          enum:
            - active
            - inactive
      required:
        - claims
        - rebatesEstimates
    ProviderRegistrationNdis:
      type: object
      properties:
        providerNumber:
          type: string
      required:
        - providerNumber
    ProviderRegistrationMedicare:
      type: object
      properties:
        providerNumber:
          type: string
      required:
        - providerNumber
    ProviderRegistrationPhi:
      type: object
      properties:
        providerNumber:
          type: string
      required:
        - providerNumber
    MedicareRegistration:
      type: object
      properties:
        minorId:
          type: string
        prodaLocationId:
          type: string
        status:
          enum:
            - inactive
            - pending
            - active
            - paused
          type: string
        providerAgreementSubmissionUrl:
          type: string
        isUsingOtherClaimSoftware:
          type: boolean
      required:
        - minorId
        - prodaLocationId
        - status
    PhiRegistration:
      type: object
      properties:
        phiLocationId:
          type: string
        status:
          type: string
      required:
        - phiLocationId
        - status
    BookingPolicyRule:
      type: object
      properties:
        enabled:
          type: boolean
        reason:
          type: string
          enum:
            - booking_paid
            - booking_service_date_past
            - booking_status_not_confirmed
            - booking_group_appointment_type
            - too_late
      required:
        - enabled
    PhiClaimItemResponse:
      type: object
      properties:
        statusCode:
          type: string
        responseCode:
          type: string
    MemberActivity:
      type: object
      properties:
        updatedAt:
          format: date-time
          type: string
          description: The last time the application was used
          example: '2021-01-01T00:00:00.000Z'
        applicationId:
          type: string
          enum:
            - member_web
            - member_mobile
            - business_web
            - business_mobile
            - business_extension
        applicationVersion:
          type: string
        platform:
          type: string
        userAgent:
          type: string
        createdAt:
          format: date-time
          type: string
      required:
        - updatedAt
        - applicationId
        - createdAt
    MemberSettings:
      type: object
      properties:
        showPlanHelp:
          type: boolean

````