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

# Get Payment Link

> Return a patient's outstanding charges as payment-link invoices, grouped by merchant account.



## OpenAPI

````yaml get /billing/payment-link/{patient_id}
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-link/{patient_id}:
    get:
      tags:
        - provider
        - billing
        - public
      summary: Get Payment Link
      operationId: get_payment_link_billing_payment_link__patient_id__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: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
        - name: text_receipt
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Text Receipt
        - name: save_payment_method
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Save Payment Method
        - name: is_surcharged
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Surcharged
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PublicInvoice'
                title: >-
                  Response Get Payment Link Billing Payment Link  Patient Id 
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PublicInvoice:
      properties:
        charges:
          items:
            $ref: '#/components/schemas/PublicInvoiceCharge'
          type: array
          title: Charges
        patient:
          $ref: '#/components/schemas/PublicPatient'
        sessionKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Sessionkey
        payinConfigId:
          anyOf:
            - type: string
            - type: 'null'
          title: Payinconfigid
        gcsFileUrl:
          type: string
          title: Gcsfileurl
        sandbox:
          type: boolean
          title: Sandbox
        fee:
          anyOf:
            - type: integer
            - type: 'null'
          title: Fee
          default: 0
        merchantAccount:
          $ref: '#/components/schemas/PublicMerchantAccount'
      type: object
      required:
        - charges
        - patient
        - gcsFileUrl
        - sandbox
        - merchantAccount
      title: PublicInvoice
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicInvoiceCharge:
      properties:
        id:
          type: string
          title: Id
        description:
          type: string
          title: Description
        status:
          $ref: '#/components/schemas/ChargeStatus'
        total:
          type: integer
          title: Total
        totalOutstanding:
          type: integer
          title: Totaloutstanding
        discountAmount:
          type: integer
          title: Discountamount
        externalId:
          type: string
          title: Externalid
        createdDate:
          type: string
          format: date-time
          title: Createddate
      type: object
      required:
        - id
        - description
        - status
        - total
        - totalOutstanding
        - discountAmount
        - externalId
        - createdDate
      title: PublicInvoiceCharge
    PublicPatient:
      properties:
        id:
          type: string
          title: Id
        firstName:
          type: string
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
      type: object
      required:
        - id
        - firstName
        - lastName
      title: PublicPatient
    PublicMerchantAccount:
      properties:
        cardProcessingFee:
          type: number
          title: Cardprocessingfee
          description: Card processing fee
        perTransactionFee:
          type: integer
          title: Pertransactionfee
          description: Per transaction fee
        inPersonCardProcessingFee:
          type: number
          title: Inpersoncardprocessingfee
          description: In-person card processing fee
        inPersonPerTransactionFee:
          type: integer
          title: Inpersonpertransactionfee
          description: In-person per transaction fee
      type: object
      required:
        - cardProcessingFee
        - perTransactionFee
        - inPersonCardProcessingFee
        - inPersonPerTransactionFee
      title: PublicMerchantAccount
      description: Public merchant account information.
    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
    ChargeStatus:
      type: string
      enum:
        - OUTSTANDING
        - PAID
        - EXTERNAL_SETTLEMENT
        - VOID
        - WRITE_OFF
        - REFUNDED
        - CHARGEBACK
        - PAYMENT_PLAN
        - COLLECTIONS
      title: ChargeStatus

````