---
title: FinancialDataApiClient
summary: API reference for FinancialDataApiClient.
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.Guidewire
reference_type: package
---

# FinancialDataApiClient

Concrete client for the Guidewire ClaimCenter FinancialDataApi. It extends `HttpClientBase`, resolving its base URL from the `cc.financial.api.url.v1` configuration key and Basic-auth credentials from `cc.gwcreds`, and implements `IFinancialDataApiClient` by creating checks and recoveries and by querying payments and check-related bill data.

## Purpose
- Creates check and recovery financial transactions against a claim, surfacing non-success responses and transport failures as thrown exceptions with status/content details.
- Retrieves payment records filtered by invoice number or issue date, with an option to include zero-pay payments, and retrieves bill details for a given check number.

## Context
- Namespace: `SAIF.Data.Guidewire.Clients`
- Assembly/package: `SAIF.Data.Guidewire` (packaged in `SAIF.SAIFCode.Core`)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| UrlKey | `protected override string UrlKey => "cc.financial.api.url.v1"` | Environment configuration key used to resolve this client's base URL, per [SDG-BR-001](../../business-rules.md#sdg-br-001-base-url-resolved-from-environment-configuration) |
| AuthKey | `protected override string AuthKey => "cc.gwcreds"` | Environment secure-configuration key used to resolve Basic auth credentials, per [SDG-BR-002](../../business-rules.md#sdg-br-002-basic-credentials-read-from-secure-configuration) |
| FinancialDataApiClient(IEnvironmentService, HttpClient, SystemType, string) | `[Obsolete] public FinancialDataApiClient(IEnvironmentService environmentService, HttpClient client, SystemType systemType, string baseUrlOverride = "")` | Obsolete constructor; forwards to `HttpClientBase`'s obsolete overload, which builds a `DataClientConfiguration` with `UseCache = false` and ignores `baseUrlOverride` |
| FinancialDataApiClient(IEnvironmentService, HttpClient, IDataClientConfiguration, IReadOnlyPolicyRegistry\<string\>) | `public FinancialDataApiClient(IEnvironmentService environmentService, HttpClient client, IDataClientConfiguration configuration, IReadOnlyPolicyRegistry<string> policyRegistry)` | Primary constructor; delegates directly to `HttpClientBase`'s primary constructor |
| CreateCheckAsync(long, CheckFinancialData) | `public Task<string> CreateCheckAsync(long claimId, CheckFinancialData data)` | Serializes `data` and synchronously blocks on a POST to `{BaseAddress}{claimId}/check`; throws per [SDG-BR-011](../../business-rules.md#sdg-br-011-non-success-responses-throw-with-status-and-content) on transport errors or a non-success response, otherwise returns the raw response body |
| CreateRecoveryAsync(long, RecoveryFinancialData) | `public Task<string> CreateRecoveryAsync(long claimId, RecoveryFinancialData data)` | Serializes `data` and asynchronously POSTs to `{BaseAddress}{claimId}/recovery`; throws per [SDG-BR-011](../../business-rules.md#sdg-br-011-non-success-responses-throw-with-status-and-content) on transport errors or a non-success response, otherwise returns the raw response body |
| GetPaymentsByInvoiceNumber(string, bool) | `public Task<PaymentsResponse> GetPaymentsByInvoiceNumber(string invoiceNumber, bool includeZeroPays = false)` | Cached GET of `payments?invoiceNumber={urlEncoded}`, appending `&includeZeroPays=true` (lowercase) only when `includeZeroPays` is true |
| GetPaymentsByIssueDate(DateTime, bool) | `public Task<PaymentsResponse> GetPaymentsByIssueDate(DateTime issueDate, bool includeZeroPays = false)` | Cached GET of `payments?issueDate={urlEncoded, JSON_DATE_FORMAT}`, appending `&includeZeroPays=true` (lowercase) only when requested, per [SDG-BR-013](../../business-rules.md#sdg-br-013-zero-pay-payments-included-only-when-requested) |
| GetBillDetailsForCheckNumber(long) | `public Task<CheckBillData> GetBillDetailsForCheckNumber(long checkNumber)` | Cached GET of `checks/{checkNumber}`, returning claim/invoice info related to the check |

## Inherited public members
| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Client | `protected HttpClient Client { get; }` | Returns the underlying `HttpClient`, initializing Basic auth on first access† | `SAIF.Data.Guidewire` — `HttpClientBase` |
| GetAsync(string, bool, CancellationToken) | `protected Task<string> GetAsync(string url, bool ensureSuccess = false, CancellationToken cancellationToken = default)` | Issues an uncached GET and returns the raw response body† | `SAIF.Data.Guidewire` — `HttpClientBase` |
| GetAsyncCached\<T\>(string, bool, CancellationToken) | `protected Task<T> GetAsyncCached<T>(string url, bool ensureSuccess = false, CancellationToken cancellationToken = default)` | Executes a cached GET through the configured Polly policy and deserializes the body as `T`† | `SAIF.Data.Guidewire` — `HttpClientBase` |
| GetAsyncCached\<T\>(string, string, bool, CancellationToken) | `protected Task<T> GetAsyncCached<T>(string url, string body, bool ensureSuccess = false, CancellationToken cancellationToken = default)` | Executes a cached POST with a JSON body through the configured Polly policy and deserializes the response as `T`† | `SAIF.Data.Guidewire` — `HttpClientBase` |

## Behavioral notes
- `CreateCheckAsync` blocks the calling thread via `GetAwaiter().GetResult()` for the POST call itself (documented in the source as intentional, to force Polly/HttpClient pipeline failures to surface at this call site for batch logging), while the subsequent content read remains asynchronous.
- `CreateRecoveryAsync` performs the POST asynchronously (no blocking `GetAwaiter().GetResult()`), unlike `CreateCheckAsync`.
- Both `CreateCheckAsync` and `CreateRecoveryAsync` construct the request URL by concatenating `Client.BaseAddress` with the claim id and a literal path segment, rather than using a relative path passed to `Client.PostAsync`.
- Zero-pay inclusion for both payment lookup methods only appends the query parameter when `includeZeroPays` is true; the API is documented in source as rejecting non-lowercase boolean literals, per [SDG-BR-013](../../business-rules.md#sdg-br-013-zero-pay-payments-included-only-when-requested).
- The obsolete constructor always disables caching for this client and ignores any `baseUrlOverride` value.

## Constraints and usage notes
- Depends on `HttpClientBase` (documented in this same doc set) for base-address resolution, authentication, and the cached GET/POST helpers.
- `GetPaymentsByIssueDate` formats `issueDate` using `HttpClientHelper.JSON_DATE_FORMAT` ("yyyy-MM-dd") before URL-encoding it.

> **Note:** Statements marked with † are derived from dependency library
> documentation via the Legends CLI. They describe inherited behavior from the
> indicated origin library and should be verified if the dependency version changes.

## Sources
- `Data/SAIF.Data.Guidewire/Clients/FinancialDataApiClient.cs`
- `Data/SAIF.Data.Guidewire/Clients/HttpClientBase.cs`
- `Data/SAIF.Data.Guidewire/Clients/HttpClientHelper.cs`
