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

# Get non-insurance payer refunds refunds

GET https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1

Returns all non-insurance payer refunds satisfying the search criteria

Reference: https://docs.joincandidhealth.com/api-reference/non-insurance-payer-refunds/v-1/get-multi

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.joincandidhealth.com` (Production, default)
- `https://api-staging.joincandidhealth.com` (Staging)
- `https://sandbox-api.joincandidhealth.com` (CandidSandbox)
- `https://staging-api.joincandidhealth.com` (CandidStaging)
- `http://localhost:5050` (Local)

## Request

### Query parameters

- `limit` (integer, optional) — Defaults to 100. The value must be greater than 0 and less than 1000.
- `non_insurance_payer_id` (UUID, optional)
- `check_number` (string, optional)
- `invoice_id` (UUID, optional)
- `sort` (enum, optional) — Defaults to refund_timestamp
  - Allowed values: `amount_cents`, `refund_timestamp`
- `sort_direction` (enum, optional) — Sort direction. Defaults to descending order if not provided.
  - Allowed values: `asc`, `desc`
- `page_token` (string, optional)

## Response

### 200

- `items` (list of NonInsurancePayerRefund, required)
- `next_page_token` (string, optional)
- `prev_page_token` (string, optional)

## Errors

### 422 Unprocessable Entity Error

- `errorName` ("UnprocessableEntityError", required)
- `content` (UnprocessableEntityErrorMessage, required)

## Types

### NonInsurancePayerRefund

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

### UnprocessableEntityErrorMessage

- `message` (string, optional)

### NonInsurancePayer

- `non_insurance_payer_id` (UUID, required)
- `name` (string, required)
- `enabled` (boolean, required)
- `clinical_trials` (list of ClinicalTrial, required)
- `description` (string, optional)
- `category` (string, optional)
- `payer_id` (string, optional) — 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)

### 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` (UUID, optional)
- `earmark` (BalanceEarmark, optional) — 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)

### ClinicalTrial

- `clinical_trial_id` (UUID, required)
- `clinical_trial_number` (string, required) — Must be 8 characters long
- `is_active` (boolean, required)
- `name` (string, required)
- `non_insurance_payer_id` (UUID, required)
- `clinical_trial_phase` (enum, optional)
  - 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)
- `zip_plus_four_code` (string, optional) — 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.

- `type`: `service_line`
  - `claim_id` (UUID, required)
  - `encounter_id` (UUID, required)
  - `service_line_id` (UUID, required)
- `type`: `claim`
  - `claim_id` (UUID, required)
  - `encounter_id` (UUID, required)
- `type`: `billing_provider_id`
  - `billing_provider_id` (UUID, required)
- `type`: `appointment`
  - `appointment_id` (string, required)
  - `patient_external_id` (string, required)
- `type`: `unattributed`

### 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` (UUID, required)
- `target` (AllocationEarmarkType, required) — The target for this earmark (date of service or external encounter ID)
- `amount_earmarked_cents` (integer, optional) — The amount earmarked in cents for future allocation
- `created_by_allocation_id` (UUID, optional) — The ID of the allocation that created this earmark

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

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

## Examples

**Response**

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

**SDK Code**

```python
import requests

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

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

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

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1")
  .header("Authorization", "<token>.")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.joincandidhealth.com/api/non-insurance-payer-refunds/v1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```