Menu

## PayoutClient
in package

PayoutClient.php : 32

Handles interactions with the payout 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

cancel() : bool
  Cancel a BitPay Payout.
cancelGroup() : PayoutGroup
createGroup() : PayoutGroup
get() : Payout
  Retrieve a BitPay payout by payout id using. The client must have been previously authorized for the payout facade.
getInstance() : static
  Factory method for Payout Client.
getPayouts() : array<string|int, Payout>
  Retrieve a collection of BitPay payouts.
requestNotification() : bool
  Notify BitPay Payout.
submit() : Payout
  Submit a BitPay Payout.
__construct() : mixed
getPayoutGroupResponse() : PayoutGroup

### Properties

#### $instance

PayoutClient.php : 34
`private static self|null $instance = null`

#### $restCli

PayoutClient.php : 36
`private RESTcli $restCli`

#### $tokenCache

PayoutClient.php : 35
`private Tokens $tokenCache`

### Methods

#### cancel()

PayoutClient.php : 220

Cancel a BitPay Payout.

`public cancel(string $payoutId) : bool`

##### Parameters

$payoutId : string

  The id of the payout to cancel.

##### Tags

throws
  PayoutCancellationException

##### Return values

bool

#### cancelGroup()

PayoutClient.php : 323
`public cancelGroup(string $groupId) : PayoutGroup`

##### Parameters

$groupId : string

##### Tags

throws
  PayoutCancellationException

##### Return values

PayoutGroup

#### createGroup()

PayoutClient.php : 291
`public createGroup(array<string|int, Payout> $payouts) : PayoutGroup`

##### Parameters

$payouts : array<string|int, Payout>

##### Tags

throws
  PayoutCreationException

##### Return values

PayoutGroup

#### get()

PayoutClient.php : 109

Retrieve a BitPay payout by payout id using. The client must have been previously authorized for the payout facade.

`public get(string $payoutId) : Payout`

##### Parameters

$payoutId : string

  The id of the payout to retrieve.

##### Tags

throws
  PayoutQueryException

##### Return values

Payout

#### getInstance()

PayoutClient.php : 51

Factory method for Payout Client.

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

##### Parameters

$tokenCache : Tokens
$restCli : RESTcli

##### Return values

static

#### getPayouts()

PayoutClient.php : 155

Retrieve a collection of BitPay payouts.

`public getPayouts([string|null $startDate = null ][, string|null $endDate = null ][, string|null $status = null ][, string|null $reference = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, Payout>`

##### Parameters

$startDate : string|null = null

  The start date to filter the Payout Batches.

$endDate : string|null = null

  The end date to filter the Payout Batches.

$status : string|null = null

  The status to filter the Payout Batches.

$reference : string|null = null

  The optional reference specified at payout request creation.

$limit : int|null = null

  Maximum results that the query will return (useful for paging results).

$offset : int|null = null

  Number of results to offset (ex. skip 10 will give you results starting with the 11th result).

##### Tags

throws
  PayoutQueryException

##### Return values

array<string|int, Payout>

#### requestNotification()

PayoutClient.php : 257

Notify BitPay Payout.

`public requestNotification(string $payoutId) : bool`

##### Parameters

$payoutId : string

  The id of the Payout to notify.

##### Tags

throws
  PayoutNotificationException

  BitPayException class

##### Return values

bool

#### submit()

PayoutClient.php : 67

Submit a BitPay Payout.

`public submit(Payout $payout) : Payout`

##### Parameters

$payout : Payout

  A Payout object with request parameters defined.

##### Tags

throws
  PayoutCreationException

##### Return values

Payout

#### __construct()

PayoutClient.php : 38
`private __construct(Tokens $tokenCache, RESTcli $restCli) : mixed`

##### Parameters

$tokenCache : Tokens
$restCli : RESTcli

#### getPayoutGroupResponse()

PayoutClient.php : 354
`private getPayoutGroupResponse(string $responseJson, string $responseType) : PayoutGroup`

##### Parameters

$responseJson : string
$responseType : string

  completed/cancelled

##### Tags

throws
  PayoutCreationException

##### Return values

PayoutGroup

## Search results