Menu

## SettlementClient
in package

SettlementClient.php : 27

Handles interactions with the settlement endpoints.

##### Tags

author

  BitPay Integrations integrations@bitpay.com

license

  http://www.opensource.org/licenses/mit-license.php MIT

### Table of Contents

#### Properties

$instance : self|null
$restCli : RESTcli
$tokenCache : Tokens

#### Methods

get() : Settlement
  Retrieves a summary of the specified settlement.
getInstance() : static
  Factory method for Settlements Client.
getReconciliationReport() : Settlement
  Gets a detailed reconciliation report of the activity within the settlement period.
getSettlements() : array<string|int, Settlement>
  Retrieves settlement reports for the calling merchant filtered by query.
__construct() : mixed

### Properties

#### $instance

SettlementClient.php : 29
`private static self|null $instance = null`

#### $restCli

SettlementClient.php : 31
`private RESTcli $restCli`

#### $tokenCache

SettlementClient.php : 30
`private Tokens $tokenCache`

### Methods

#### get()

SettlementClient.php : 126

Retrieves a summary of the specified settlement.

`public get(string $settlementId) : Settlement`

##### Parameters

$settlementId : string

  Settlement Id.

##### Tags

throws
  BitPayException

##### Return values

Settlement

#### getInstance()

SettlementClient.php : 46

Factory method for Settlements Client.

`public static getInstance(Tokens $tokenCache, RESTcli $restCli) : static`

##### Parameters

$tokenCache : Tokens
$restCli : RESTcli

##### Return values

static

#### getReconciliationReport()

SettlementClient.php : 166

Gets a detailed reconciliation report of the activity within the settlement period.

`public getReconciliationReport(Settlement $settlement) : Settlement`

##### Parameters

$settlement : Settlement

  Settlement to generate report for.

##### Tags

throws
  BitPayException

##### Return values

Settlement

#### getSettlements()

SettlementClient.php : 69

Retrieves settlement reports for the calling merchant filtered by query.

`public getSettlements(string $currency, string $dateStart, string $dateEnd[, string|null $status = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, Settlement>`

The `limit` and `offset` parameters specify pages for large query sets.

##### Parameters

$currency : string

  The three digit currency string for the ledger to retrieve.

$dateStart : string

  The start date for the query.

$dateEnd : string

  The end date for the query.

$status : string|null = null

  string Can be `processing`, `completed`, or `failed`.

$limit : int|null = null

  int Maximum number of settlements to retrieve.

$offset : int|null = null

  int Offset for paging.

##### Tags

throws
  SettlementQueryException

##### Return values

array<string|int, Settlement>

#### __construct()

SettlementClient.php : 33
`private __construct(Tokens $tokenCache, RESTcli $restCli) : mixed`

##### Parameters

$tokenCache : Tokens
$restCli : RESTcli

## Search results