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

> ## Agent Instructions
> Connect the Hi Doctor MCP connector at https://mcp.hi-doctor.ai/mcp. Add this URL as a remote HTTP MCP server in your client, then sign in and authorise access through OAuth. Setup: https://docs.hi-doctor.ai/mcp/connect.
>
> The REST API base is https://api.hi-doctor.ai. Hi Doctor Docs at https://docs.hi-doctor.ai/mcp searches documentation; connect to the product endpoint above for patient tools.
>
> Hi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Every consultation is reviewed in full by an EU-licensed doctor, who decides on medical grounds only. No algorithm, assistant or API call approves a consultation, issues a prescription or changes a dose. The service is available in eight languages: English, Spanish, German, Dutch, Italian, French, Portuguese and Chinese.
>
> ## Rules an assistant must follow
>
> - Never invent, assume or infer a medical answer. "I don't know" is a real answer: ask the patient to pick the closest option rather than guessing for them.
> - Never give medical advice and never suggest a medication or a dose. An EU-licensed doctor decides those.
> - If a questionnaire returns `ineligible`, say so plainly. Do not retry with altered answers.
> - Before anything that costs money or cancels a plan, state exactly what will happen and get an explicit yes.
> - Cancellation takes effect at the **end of the paid period**, not immediately. Say so.
> - An early order is irreversible: it creates the renewal consultation immediately and uses up the period's one early order. Explain that and get an explicit yes.
> - Prescription and invoice links are medical documents. A `signed_redirect` link opens without signing in: give it only to the patient, never repeat it anywhere shared.
> - Send option `value`s, not the labels shown to the patient. Labels are translated, values are stable.
> - Never ask for card details. Payment happens on Stripe's hosted checkout via a link.
> - On severe or sudden symptoms (chest pain, difficulty breathing, severe allergic reaction, suicidal thoughts), stop and direct the patient to their local emergency number.

# List patient payments

> Self-scoped.

### Access, effects and retries
**Ownership:** Payments belonging to patient; failed attempts excluded.

**Prerequisites:** An authenticated patient account is required.

**Effects:** Read only.

**Retries:** Safe read.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/users/payments/
openapi: 3.0.3
info:
  title: Hi Doctor API
  version: 1.0.1
  description: >-
    The patient-facing Hi Doctor API supports account management, consultation
    questionnaires, medical documents, messages and billing. Sign-in requires
    X-Brand-Slug: hi-doctor; authenticated requests use Authorization: Bearer
    <access> with a JWT access token. See
    https://docs.hi-doctor.ai/api-reference/introduction for integration guides.
  contact:
    name: Hi Doctor
    email: hello@hi-doctor.ai
    url: https://docs.hi-doctor.ai
servers:
  - url: https://api.hi-doctor.ai
    description: Production
security: []
tags:
  - name: Account
    description: Register, verify, authenticate and manage the signed-in account.
  - name: Questionnaires
    description: Discover, save and submit consultation questionnaires.
  - name: Consultations
    description: Read consultation state and manage consultation photographs.
  - name: Prescriptions
    description: Retrieve issued prescription documents and request reissue.
  - name: Messages
    description: Read and send messages to the medical team, and download attachments.
  - name: Billing
    description: >-
      Create checkout, manage subscriptions and retrieve
      payments/invoices/credit notes.
  - name: Records
    description: Read orders and manage patient health documents.
  - name: Safety reports
    description: Submit and read suspected side-effect reports; no automated diagnosis.
  - name: Progress
    description: Record and review eligible weight-loss progress.
  - name: Referrals
    description: Read the signed-in account's referral summary and referral activity.
paths:
  /v1/users/payments/:
    get:
      tags:
        - Billing
      summary: List patient payments
      description: |-
        Self-scoped.

        ### Access, effects and retries
        **Ownership:** Payments belonging to patient; failed attempts excluded.

        **Prerequisites:** An authenticated patient account is required.

        **Effects:** Read only.

        **Retries:** Safe read.
      operationId: users_payments_list
      parameters:
        - name: ordering
          required: false
          in: query
          description: Which field to use when ordering the results.
          schema:
            type: string
          example: synthetic
        - name: limit
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
          example: 1
        - name: offset
          required: false
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
          example: 1
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPaymentList'
              examples:
                example-1:
                  summary: Illustrative response example
                  value:
                    count: 0
                    next: null
                    previous: null
                    results: []
                example-2:
                  summary: Captured response example
                  value:
                    count: 1
                    next: null
                    previous: >-
                      https://api.hi-doctor.ai/v1/users/payments/?limit=1&offset=999999
                    results: []
                example-3:
                  summary: Captured response example
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                      - brand:
                          slug: hi-doctor
                          display_name: Synthetic display name
                          primary_color: '#157a5c'
                        id: cebab43a-1ea6-5784-9726-a8b2b5464dcc
                        consultation_id: b0e81246-c46e-5ac2-9675-06bf07784bf4
                        patient_email: synthetic-patient@example.invalid
                        patient_id: 9fb1a263-c71b-5fe9-b2e7-5a0eb099bad5
                        provider: stripe
                        provider_payment_id: <PROVIDER_ID>
                        provider_checkout_id: null
                        provider_order_id: null
                        provider_order_name: null
                        subscription_id: 778e8448-583f-5228-9015-1f578f92f1de
                        is_recurring: true
                        billing_reason: subscription_create
                        amount_cents: 2500
                        refunded_amount_cents: 0
                        net_amount_cents: 2500
                        currency: EUR
                        status: succeeded
                        failure_code: ''
                        failed_at: null
                        description: ''
                        payment_method_type: ''
                        payment_method_brand: ''
                        payment_method_last4: ''
                        captured_at: '2026-10-05T18:25:10Z'
                        invoice_url: >-
                          https://api.hi-doctor.ai/v1/users/payments/cebab43a-1ea6-5784-9726-a8b2b5464dcc/invoice/
                        invoice_number: HD-20261005-EA0057AA
                        credit_notes: []
                        refund: null
                        created_at: '2026-10-05T18:25:13.666323Z'
                        updated_at: '2026-10-05T18:25:14.894272Z'
                example-4:
                  summary: Captured response example
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                      - brand:
                          slug: hi-doctor
                          display_name: Synthetic display name
                          primary_color: '#157a5c'
                        id: cebab43a-1ea6-5784-9726-a8b2b5464dcc
                        consultation_id: b0e81246-c46e-5ac2-9675-06bf07784bf4
                        patient_email: synthetic-patient@example.invalid
                        patient_id: 9fb1a263-c71b-5fe9-b2e7-5a0eb099bad5
                        provider: stripe
                        provider_payment_id: <PROVIDER_ID>
                        provider_checkout_id: null
                        provider_order_id: null
                        provider_order_name: null
                        subscription_id: 778e8448-583f-5228-9015-1f578f92f1de
                        is_recurring: true
                        billing_reason: subscription_create
                        amount_cents: 2500
                        refunded_amount_cents: 0
                        net_amount_cents: 2500
                        currency: EUR
                        status: succeeded
                        failure_code: ''
                        failed_at: null
                        description: ''
                        payment_method_type: ''
                        payment_method_brand: ''
                        payment_method_last4: ''
                        captured_at: '2026-10-05T18:25:10Z'
                        invoice_url: >-
                          https://api.hi-doctor.ai/v1/users/payments/cebab43a-1ea6-5784-9726-a8b2b5464dcc/invoice/
                        invoice_number: HD-20261005-EA0057AA
                        credit_notes: []
                        refund: null
                        created_at: '2026-10-05T18:25:13.666323Z'
                        updated_at: '2026-10-05T18:25:14.894272Z'
          description: Successful list payments.
        '401':
          description: >-
            No bearer token, or a token that is expired or malformed.
            Re-authenticate; do not retry the same token.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Error envelope emitted by the source branch or DRF validation.
                  `detail`, `error` and `code` depend on the branch; field
                  validation uses lists keyed by request field.
                additionalProperties: {}
              examples:
                example-1:
                  summary: Illustrative response example
                  value:
                    detail: Authentication credentials were not provided.
        '403':
          description: The account lacks permission for this operation.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Error envelope emitted by the source branch or DRF validation.
                  `detail`, `error` and `code` depend on the branch; field
                  validation uses lists keyed by request field.
                additionalProperties: {}
              examples:
                example-1:
                  summary: Illustrative response example
                  value:
                    detail: You do not have permission to perform this action.
        '429':
          description: Source-defined error response; inspect the envelope and retry rules.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
                description: >-
                  Endpoint/DRF error envelope; field validation is keyed by
                  request field.
              examples:
                example-1:
                  summary: Illustrative response example
                  value:
                    detail: Request was throttled.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: curl
          source: >
            set -eu

            umask 077

            # Path values must be URL-encoded; query string excludes the leading
            question mark.

            url="${HD_BASE_URL:?Set API
            origin}/v1/users/payments/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}"

            printf 'X-Brand-Slug: hi-doctor\nAccept: application/json\n' >
            "${HD_REQUEST_HEADERS_FILE:?Private header file}"

            printf 'Authorization: Bearer %s\n' "${HD_ACCESS_TOKEN:?Set backend
            JWT}" >> "$HD_REQUEST_HEADERS_FILE"

            curl --silent --show-error --max-time 30 --request GET \
              --header "@$HD_REQUEST_HEADERS_FILE" \
              --dump-header "${HD_HEADERS_FILE:?Private response header file}" \
              --output "${HD_RESPONSE_FILE:?Private response file}" \
              --write-out '%{http_code}\n%{content_type}\n' \
              "$url"
        - lang: Python
          label: requests
          source: >
            import os, json

            from pathlib import Path

            from urllib.parse import quote

            import requests

            os.umask(0o077)

            url = os.environ["HD_BASE_URL"].rstrip("/") + '/v1/users/payments/'

            if os.environ.get("HD_QUERY_STRING"): url += "?" +
            os.environ["HD_QUERY_STRING"]

            headers = {"X-Brand-Slug": "hi-doctor", "Accept":
            'application/json'}

            headers["Authorization"] = "Bearer " + os.environ["HD_ACCESS_TOKEN"]

            kwargs = {}

            response = requests.request('GET', url, headers=headers, timeout=30,
            allow_redirects=False, **kwargs)

            Path(os.environ["HD_RESPONSE_FILE"]).write_bytes(response.content)

            Path(os.environ["HD_HEADERS_FILE"]).write_text(json.dumps(dict(response.headers)))

            print(response.status_code)

            print(response.headers.get("Content-Type", ""))
        - lang: JavaScript
          label: fetch
          source: >
            import { readFileSync, writeFileSync } from "node:fs";

            const env = process.env;

            let url = env.HD_BASE_URL.replace(/\/$/, "") +
            "/v1/users/payments/";

            if (env.HD_QUERY_STRING) url += "?" + env.HD_QUERY_STRING;

            const headers = { "X-Brand-Slug": "hi-doctor", "Accept":
            "application/json" };

            headers.Authorization = "Bearer " + env.HD_ACCESS_TOKEN;

            const options = { method: "GET", headers, redirect: "manual",
            signal: AbortSignal.timeout(30000) };

            const response = await fetch(url, options);

            writeFileSync(env.HD_RESPONSE_FILE, Buffer.from(await
            response.arrayBuffer()), {mode: 0o600});

            writeFileSync(env.HD_HEADERS_FILE,
            JSON.stringify(Object.fromEntries(response.headers)), {mode:
            0o600});

            console.log(response.status);

            console.log(response.headers.get("content-type") ?? "");
components:
  schemas:
    PaginatedPaymentList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
          description: Total matching records before pagination.
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
          description: >-
            URL of the next page, or null after the last page. May be null when
            unavailable.
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
          description: >-
            URL of the previous page, or null on the first page. May be null
            when unavailable.
        results:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
          description: Records in this page, in the documented collection order.
    Payment:
      type: object
      properties:
        brand:
          allOf:
            - $ref: '#/components/schemas/BrandSummary'
          readOnly: true
          description: Brand for this payment. Returned by the server; not writable.
        id:
          type: string
          format: uuid
          readOnly: true
          description: >-
            Unique identifier of this resource. Returned by the server; not
            writable.
        consultation_id:
          type: string
          format: uuid
          readOnly: true
          description: >-
            Identifier of the related consultation. Returned by the server; not
            writable.
        patient_email:
          type: string
          format: email
          readOnly: true
          description: >-
            Patient email for this payment. Returned by the server; not
            writable.
        patient_id:
          type: string
          format: uuid
          readOnly: true
          description: >-
            Identifier of the related patient. Returned by the server; not
            writable.
        provider:
          allOf:
            - $ref: '#/components/schemas/Provider906Enum'
          description: Provider for this payment.
        provider_payment_id:
          type: string
          nullable: true
          maxLength: 255
          description: >-
            Identifier of the related provider payment. May be null when
            unavailable. Maximum 255 characters.
        provider_checkout_id:
          type: string
          nullable: true
          maxLength: 255
          description: >-
            Identifier of the related provider checkout. May be null when
            unavailable. Maximum 255 characters.
        provider_order_id:
          type: string
          nullable: true
          maxLength: 255
          description: >-
            Identifier of the related provider order. May be null when
            unavailable. Maximum 255 characters.
        provider_order_name:
          type: string
          nullable: true
          maxLength: 100
          description: >-
            Provider order name for this payment. May be null when unavailable.
            Maximum 100 characters.
        subscription_id:
          type: string
          format: uuid
          nullable: true
          readOnly: true
          description: >-
            Identifier of the related subscription. Returned by the server; not
            writable. May be null when unavailable.
        is_recurring:
          type: boolean
          description: Whether recurring applies to this payment.
        billing_reason:
          type: string
          maxLength: 50
          description: Billing reason for this payment. Maximum 50 characters.
        amount_cents:
          type: integer
          description: Amount cents for this payment.
        refunded_amount_cents:
          type: integer
          description: Refunded amount cents for this payment.
        net_amount_cents:
          type: integer
          readOnly: true
          description: >-
            Net amount cents for this payment. Returned by the server; not
            writable.
        currency:
          type: string
          maxLength: 3
          description: Currency for this payment. Maximum 3 characters.
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatusEnum'
          description: Status for this payment.
        failure_code:
          type: string
          maxLength: 100
          description: Failure code for this payment. Maximum 100 characters.
        failed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Failed at timestamp in ISO 8601 format. May be null when
            unavailable.
        description:
          type: string
          maxLength: 255
          description: Description for this payment. Maximum 255 characters.
        payment_method_type:
          type: string
          maxLength: 50
          description: Payment method type for this payment. Maximum 50 characters.
        payment_method_brand:
          type: string
          maxLength: 50
          description: Payment method brand for this payment. Maximum 50 characters.
        payment_method_last4:
          type: string
          maxLength: 4
          description: Payment method last4 for this payment. Maximum 4 characters.
        captured_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Captured at timestamp in ISO 8601 format. May be null when
            unavailable.
        invoice_url:
          type: string
          format: uri
          readOnly: true
          description: Invoice url for this payment. Returned by the server; not writable.
        invoice_number:
          type: string
          readOnly: true
          description: >-
            Invoice number for this payment. Returned by the server; not
            writable.
        credit_notes:
          type: array
          items:
            $ref: '#/components/schemas/PaymentCreditNote'
          readOnly: true
          description: Credit notes for this payment. Returned by the server; not writable.
        refund:
          readOnly: true
          description: >-
            Refund for this payment. Returned by the server; not writable. May
            be null when unavailable.
          anyOf:
            - $ref: '#/components/schemas/PaymentRefund'
            - enum:
                - null
              type: string
              nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: >-
            Created at timestamp in ISO 8601 format. Returned by the server; not
            writable.
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: >-
            Updated at timestamp in ISO 8601 format. Returned by the server; not
            writable.
      required:
        - brand
        - consultation_id
        - created_at
        - credit_notes
        - id
        - invoice_number
        - invoice_url
        - net_amount_cents
        - patient_email
        - patient_id
        - provider
        - refund
        - subscription_id
        - updated_at
    BrandSummary:
      type: object
      properties:
        slug:
          type: string
          description: Slug for this brand summary.
        display_name:
          type: string
          description: Display name for this brand summary.
        primary_color:
          type: string
          description: Primary color for this brand summary.
      required:
        - display_name
        - primary_color
        - slug
    Provider906Enum:
      enum:
        - shopify
        - stripe
      type: string
    PaymentStatusEnum:
      enum:
        - pending
        - succeeded
        - failed
        - partially_refunded
        - refunded
        - disputed
      type: string
    PaymentCreditNote:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of this resource.
        number:
          type: string
          description: Number for this payment credit note.
        amount_cents:
          type: integer
          description: Amount cents for this payment credit note.
        currency:
          type: string
          description: Currency for this payment credit note.
        issued_at:
          type: string
          format: date-time
          description: Issued at timestamp in ISO 8601 format.
        url:
          type: string
          format: uri
          description: URL returned for this resource; provider links may expire.
      required:
        - amount_cents
        - currency
        - id
        - issued_at
        - number
        - url
    PaymentRefund:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: >-
            Unique identifier of this resource. Returned by the server; not
            writable.
        provider:
          allOf:
            - $ref: '#/components/schemas/Provider906Enum'
          description: Provider for this payment refund.
        provider_refund_id:
          type: string
          nullable: true
          maxLength: 255
          description: >-
            Identifier of the related provider refund. May be null when
            unavailable. Maximum 255 characters.
        amount_cents:
          type: integer
          description: Amount cents for this payment refund.
        currency:
          type: string
          maxLength: 3
          description: Currency for this payment refund. Maximum 3 characters.
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentRefundStatusEnum'
          description: Status for this payment refund.
        reason:
          type: string
          description: Reason for this payment refund.
        requested_by_email:
          type: string
          format: email
          readOnly: true
          nullable: true
          description: >-
            Requested by email for this payment refund. Returned by the server;
            not writable. May be null when unavailable.
        requested_at:
          type: string
          format: date-time
          description: Requested at timestamp in ISO 8601 format.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Completed at timestamp in ISO 8601 format. May be null when
            unavailable.
        destination_reference:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Destination reference for this payment refund. Returned by the
            server; not writable. May be null when unavailable.
        destination_reference_status:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Destination reference status for this payment refund. Returned by
            the server; not writable. May be null when unavailable.
        destination_reference_type:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Destination reference type for this payment refund. Returned by the
            server; not writable. May be null when unavailable.
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: >-
            Created at timestamp in ISO 8601 format. Returned by the server; not
            writable.
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: >-
            Updated at timestamp in ISO 8601 format. Returned by the server; not
            writable.
      required:
        - created_at
        - destination_reference
        - destination_reference_status
        - destination_reference_type
        - id
        - provider
        - requested_by_email
        - updated_at
    PaymentRefundStatusEnum:
      enum:
        - pending
        - processing
        - succeeded
        - failed
        - canceled
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.