> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taigabilling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taigabilling.com/_mcp/server.

# Non Insurance Payer Refunds V 1 Update

PATCH https://api.taigabilling.com/api/non-insurance-payer-refunds/v1/{non_insurance_payer_refund_id}
Content-Type: application/json

Updates the non-insurance payer refund record matching the provided non_insurance_payer_refund_id. If updating the refund amount,
then the allocations must be appropriately updated as well.

Reference: https://docs.taigabilling.com/api-reference/non-insurance-payer-refunds-v-1/non-insurance-payer-refunds-v-1-update

## Authentication

- `Authorization` header (bearer token, required) — Send your Taiga API key as a Bearer token. Create and manage keys in the Taiga developer portal.

## Servers

- `https://api.taigabilling.com` (Production, default)
- `https://api-staging.taigabilling.com` (Staging)

## Request

### Path parameters

- `non_insurance_payer_refund_id` (string, required)

### Body (application/json)

This endpoint expects an object.

- `refund_timestamp` (datetime, optional, nullable)
- `refund_note` (NoteUpdate, optional, nullable)
- `refund_reason` (RefundReasonUpdate, optional, nullable)
- `invoice_id` (InvoiceUpdate, optional, nullable)

## Response

### 200

- `non_insurance_payer_refund_id` (string, required)
- `non_insurance_payer` (non-insurance-payersv1NonInsurancePayer, required)
- `amount_cents` (integer, required)
- `allocations` (list of Allocation, required)
- `refund_timestamp` (datetime, optional, nullable)
- `refund_note` (string, optional, nullable)
- `check_number` (string, optional, nullable)
- `refund_reason` (enum, optional, nullable)
  - Allowed values: `OVERCHARGED`, `ENTERED_IN_ERROR`, `TRANSFER`
- `invoice_id` (string, optional, nullable)

## Errors

### 404 Not Found Error

- `NonInsurancePayerRefunds_v1_updateRequestNotFoundError`
  - NonInsurancePayerRefundsV1UpdateRequestNotFoundError0

### 422 Unprocessable Entity Error

- `NonInsurancePayerRefunds_v1_updateRequestUnprocessableEntityError`
  - NonInsurancePayerRefundsV1UpdateRequestUnprocessableEntityError0

## Types

### NoteUpdate

- NoteUpdate0
- NoteUpdate1

### RefundReasonUpdate

- RefundReasonUpdate0
- RefundReasonUpdate1

### InvoiceUpdate

- InvoiceUpdate0
- InvoiceUpdate1

### non-insurance-payersv1NonInsurancePayer

- `non_insurance_payer_id` (string, required)
- `name` (string, required)
- `enabled` (boolean, required)
- `clinical_trials` (list of clinical-trialsv1ClinicalTrial, required)
- `description` (string, optional, nullable)
- `category` (string, optional, nullable)
- `payer_id` (string, optional, nullable) — The identifier used to route claims to this payer. Required in order to submit an 837 to this payer. Must be between 2 and 80 characters.
- `address` (StreetAddressShortZip, optional, nullable)

### Allocation

- `amount_cents` (integer, required)
- `target` (AllocationTarget, required) — Allocation targets describe whether the portion of a payment is being applied toward a specific service line, claim, billing provider, or is unallocated.
- `allocation_id` (string, optional, nullable)
- `earmark` (BalanceEarmark, optional, nullable) — The active earmark created by this allocation, if any. Only present when this allocation created an earmark for future auto-allocation and the earmark has not been deleted.
- `allocated_on` (datetime, optional, nullable)

### NonInsurancePayerRefundsV1UpdateRequestNotFoundError0

- `errorName` (enum, optional)
  - Allowed values: `UnprocessableEntityError`
- `content` (EntityNotFoundErrorMessage, optional)

### NonInsurancePayerRefundsV1UpdateRequestUnprocessableEntityError0

- `errorName` (enum, optional)
  - Allowed values: `UnprocessableEntityError`
- `content` (UnprocessableEntityErrorMessage, optional)

### NoteUpdate0

- `type` (enum, required)
  - Allowed values: `set`
- `value` (string, optional)

### NoteUpdate1

- `type` (enum, required)
  - Allowed values: `remove`

### RefundReasonUpdate0

- `type` (enum, required)
  - Allowed values: `set`
- `value` (enum, optional)
  - Allowed values: `OVERCHARGED`, `ENTERED_IN_ERROR`, `TRANSFER`

### RefundReasonUpdate1

- `type` (enum, required)
  - Allowed values: `remove`

### InvoiceUpdate0

- `type` (enum, required)
  - Allowed values: `set`
- `value` (string, optional)

### InvoiceUpdate1

- `type` (enum, required)
  - Allowed values: `remove`

### clinical-trialsv1ClinicalTrial

- `clinical_trial_id` (string, required)
- `clinical_trial_number` (string, required) — Must be 8 characters long
- `is_active` (boolean, required)
- `name` (string, required)
- `non_insurance_payer_id` (string, required)
- `clinical_trial_phase` (enum, optional, nullable)
  - Allowed values: `Phase 1`, `Phase 2`, `Phase 3`

### StreetAddressShortZip

- `address1` (string, required)
- `city` (string, required)
- `state` (enum, required)
  - Allowed values: `AA`, `AE`, `AP`, `AL`, `AK`, `AS`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MD`, `MA`, `MH`, `MI`, `MN`, `MP`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `OH`, `OK`, `OR`, `PA`, `PR`, `PW`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VI`, `VT`, `VA`, `WA`, `WV`, `WI`, `WY`, `FC`
- `zip_code` (string, required) — 5-digit zip code
- `address2` (string, optional, nullable)
- `zip_plus_four_code` (string, optional, nullable) — 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4

### AllocationTarget

Allocation targets describe whether the portion of a payment is being applied toward a specific service line, claim, billing provider, or is unallocated.

- AllocationTarget0
- AllocationTarget1
- AllocationTarget2
- AllocationTarget3
- AllocationTarget4

### BalanceEarmark

Represents an active balance earmarking record that holds allocated funds for future auto-allocation. Earmarks are created when funds are allocated but should be held for a specific encounter or date of service. Only active (non-deleted) earmarks are returned.

- `id` (string, required)
- `target` (AllocationEarmarkType, required) — The target for this earmark (date of service or external encounter ID)
- `amount_earmarked_cents` (integer, optional, nullable) — The amount earmarked in cents for future allocation
- `created_by_allocation_id` (string, optional, nullable) — The ID of the allocation that created this earmark

### EntityNotFoundErrorMessage

- `id` (string, required)

### UnprocessableEntityErrorMessage

- `message` (string, optional, nullable)

### AllocationTarget0

- `claim_id` (string, required)
- `encounter_id` (string, required)
- `service_line_id` (string, required)
- `type` (enum, required)
  - Allowed values: `service_line`

### AllocationTarget1

- `claim_id` (string, required)
- `encounter_id` (string, required)
- `type` (enum, required)
  - Allowed values: `claim`

### AllocationTarget2

- `billing_provider_id` (string, required)
- `type` (enum, required)
  - Allowed values: `billing_provider_id`

### AllocationTarget3

- `appointment_id` (string, required)
- `patient_external_id` (string, required)
- `type` (enum, required)
  - Allowed values: `appointment`

### AllocationTarget4

- `type` (enum, required)
  - Allowed values: `unattributed`

### AllocationEarmarkType

If enabled for your organization, defines how a patient prepayment allocation should be earmarked for future auto-allocation. Earmarks hold the allocation until a matching encounter is created, then attempt to allocate to that encounter. Only applicable for unattributed allocations.

- AllocationEarmarkType0
- AllocationEarmarkType1

### AllocationEarmarkType0

- `type` (enum, required)
  - Allowed values: `date_of_service`
- `value` (string, optional) — ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)

### AllocationEarmarkType1

- `type` (enum, required)
  - Allowed values: `external_encounter_id`
- `value` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "non_insurance_payer_refund_id": "string",
  "non_insurance_payer": {
    "non_insurance_payer_id": "string",
    "name": "Sunrise Foundation",
    "enabled": true,
    "clinical_trials": [
      {
        "clinical_trial_id": "string",
        "clinical_trial_number": "string",
        "is_active": true,
        "name": "string",
        "non_insurance_payer_id": "string",
        "clinical_trial_phase": "Phase 1"
      }
    ],
    "description": "string",
    "category": "string",
    "payer_id": "string",
    "address": {
      "address1": "string",
      "city": "string",
      "state": "AA",
      "zip_code": "string",
      "address2": "string",
      "zip_plus_four_code": "string"
    }
  },
  "amount_cents": 1,
  "allocations": [
    {
      "amount_cents": 1,
      "target": {
        "claim_id": "string",
        "encounter_id": "string",
        "service_line_id": "string",
        "type": "service_line"
      },
      "allocation_id": "string",
      "earmark": {
        "id": "string",
        "target": {
          "type": "date_of_service",
          "value": "string"
        },
        "amount_earmarked_cents": 1,
        "created_by_allocation_id": "string"
      },
      "allocated_on": "2024-01-15T09:30:00Z"
    }
  ],
  "refund_timestamp": "2024-01-15T09:30:00Z",
  "refund_note": "string",
  "check_number": "string",
  "refund_reason": "OVERCHARGED",
  "invoice_id": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.taigabilling.com/api/non-insurance-payer-refunds/v1/non_insurance_payer_refund_id"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```