Menu

## Payout
in package

Payout.php : 21

##### Tags

author

  BitPay Integrations integrations@bitpay.com

license

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

see
  https://bitpay.readme.io/reference/payouts

  REST API Payouts

### Table of Contents

#### Properties

$accountId : string|null
$amount : float|null
$code : int|null
$currency : string|null
$dateExecuted : string|null
$effectiveDate : string|null
$email : string|null
$exchangeRates : array<string|int, mixed>|null
$groupId : string|null
$id : string|null
$ignoreEmails : bool
$label : string|null
$ledgerCurrency : string|null
$message : string|null
$notificationEmail : string|null
$notificationURL : string|null
$recipientId : string|null
$reference : string|null
$requestDate : string|null
$shopperId : string|null
$status : string|null
$token : string|null
$transactions : array<string|int, PayoutTransaction>

#### Methods

__construct() : mixed
  Constructor, create a request Payout object.
formatAmount() : void
  Change amount value based on precision rounding.
getAccountId() : string
  Gets BitPay account id that is associated to the payout, assigned by BitPay for a given account during the onboarding process.
getAmount() : float|null
  Gets amount of cryptocurrency sent to the requested address.
getCode() : int|null
  This field will be returned in case of error and contain an error code.
getCurrency() : string|null
  Gets currency code set for the batch amount (ISO 4217 3-character currency code).
getDateExecuted() : string|null
  Gets date and time (UTC) when BitPay executed the payout. ISO-8601 format yyyy-mm-ddThh:mm:ssZ.
getEffectiveDate() : string|null
  Gets Ledger currency code (ISO 4217 3-character currency code)
getEmail() : string
  Gets email.
getExchangeRates() : array<string|int, mixed>|null
  Gets exchange rates keyed by source and target currencies.
getGroupId() : string|null
  Gets group id.
getId() : string|null
  Gets Payout request id.
getLabel() : string
  Gets label.
getLedgerCurrency() : string|null
  Gets Ledger currency code (ISO 4217 3-character currency code
getMessage() : string
  Gets message.
getNotificationEmail() : string
  Gets notification email.
getNotificationURL() : string
  Gets notification url.
getRecipientId() : string
  Gets BitPay recipient id. Assigned by BitPay for a given recipient email during the onboarding process.
getReference() : string
  Gets reference.
getRequestDate() : string|null
  Gets date and time (UTC) when BitPay received the batch. ISO-8601 format `yyyy-mm-ddThh:mm:ssZ`.
getShopperId() : string
  Gets shopper id.
getStatus() : string|null
  Gets payout request status.
getToken() : string
  Gets resource token.
getTransactions() : array<string|int, PayoutTransaction>
  Gets transactions. Contains the cryptocurrency transaction details for the executed payout request.
isIgnoreEmails() : bool
  Gets boolean to prevent email updates on a specific payout.
setAccountId() : void
  Sets BitPay account id that is associated to the payout, assigned by BitPay for a given account during the onboarding process.
setAmount() : void
  Sets amount of cryptocurrency sent to the requested address.
setCode() : void
  Sets error code.
setCurrency() : void
  Sets currency code set for the batch amount (ISO 4217 3-character currency code).
setDateExecuted() : void
  Sets date and time (UTC) when BitPay executed the payout. ISO-8601 format yyyy-mm-ddThh:mm:ssZ.
setEffectiveDate() : void
  Sets effective date and time (UTC) for the payout.
setEmail() : void
  Sets email.
setExchangeRates() : void
  Sets exchange rates keyed by source and target currencies.
setGroupId() : void
  Sets group id.
setId() : void
  Sets Payout request id.
setIgnoreEmails() : void
  Sets boolean to prevent email updates on a specific payout.
setLabel() : void
  Sets label.
setLedgerCurrency() : void
  Sets Ledger currency code (ISO 4217 3-character currency code)
setMessage() : void
  Sets message.
setNotificationEmail() : void
  Sets notification email.
setNotificationURL() : void
  Sets notification url.
setRecipientId() : void
  Sets BitPay recipient id. Assigned by BitPay for a given recipient email during the onboarding process.
setReference() : void
  Sets reference.
setRequestDate() : void
  Sets date and time (UTC) when BitPay received the batch. ISO-8601 format `yyyy-mm-ddThh:mm:ssZ`.
setShopperId() : void
  Sets shopper id.
setStatus() : void
  Sets payout request status.
setToken() : void
  Sets resource token.
setTransactions() : void
  Sets transactions. Contains the cryptocurrency transaction details for the executed payout request.
toArray() : array<string|int, mixed>
  Return Payout values as array.

### Properties

#### $accountId

Payout.php : 31
`protected string|null $accountId = null`

#### $amount

Payout.php : 24
`protected float|null $amount = null`

#### $code

Payout.php : 39
`protected int|null $code = null`

#### $currency

Payout.php : 25
`protected string|null $currency = null`

#### $dateExecuted

Payout.php : 40
`protected string|null $dateExecuted = null`

#### $effectiveDate

Payout.php : 26
`protected string|null $effectiveDate = null`

#### $email

Payout.php : 32
`protected string|null $email = null`

#### $exchangeRates

Payout.php : 44
`protected array<string|int, mixed>|null $exchangeRates = null`

#### $groupId

Payout.php : 38
`protected string|null $groupId = null`

#### $id

Payout.php : 41
`protected string|null $id = null`

#### $ignoreEmails

Payout.php : 37
`protected bool $ignoreEmails = false`

#### $label

Payout.php : 35
`protected string|null $label = null`

#### $ledgerCurrency

Payout.php : 27
`protected string|null $ledgerCurrency = null`

#### $message

Payout.php : 36
`protected string|null $message = null`

#### $notificationEmail

Payout.php : 30
`protected string|null $notificationEmail = null`

#### $notificationURL

Payout.php : 29
`protected string|null $notificationURL = null`

#### $recipientId

Payout.php : 33
`protected string|null $recipientId = null`

#### $reference

Payout.php : 28
`protected string|null $reference = null`

#### $requestDate

Payout.php : 43
`protected string|null $requestDate = null`

#### $shopperId

Payout.php : 34
`protected string|null $shopperId = null`

#### $status

Payout.php : 42
`protected string|null $status = null`

#### $token

Payout.php : 23
`protected string|null $token = null`

#### $transactions

Payout.php : 48
`protected array<string|int, PayoutTransaction> $transactions = []`

### Methods

#### __construct()

Payout.php : 61

Constructor, create a request Payout object.

`public __construct([float|null $amount = null ][, string|null $currency = null ][, string|null $ledgerCurrency = null ]) : mixed`

##### Parameters

$amount : float|null = null

  float The amount for which the payout will be created.

$currency : string|null = null

  string The three digit currency string for the PayoutBatch to use.

$ledgerCurrency : string|null = null

  string Ledger currency code set for the payout request (ISO 4217 3-character currency code), it indicates on which ledger the payout request will be recorded. If not provided in the request, this parameter will be set by default to the active ledger currency on your account, e.g. your settlement currency.

#### formatAmount()

Payout.php : 127

Change amount value based on precision rounding.

`public formatAmount(int $precision) : void`

##### Parameters

$precision : int

#### getAccountId()

Payout.php : 305

Gets BitPay account id that is associated to the payout, assigned by BitPay for a given account during the onboarding process.

`public getAccountId() : string`

##### Return values

string

#### getAmount()

Payout.php : 107

Gets amount of cryptocurrency sent to the requested address.

`public getAmount() : float|null`

##### Return values

float|null

#### getCode()

Payout.php : 478

This field will be returned in case of error and contain an error code.

`public getCode() : int|null`

##### Return values

int|null

#### getCurrency()

Payout.php : 137

Gets currency code set for the batch amount (ISO 4217 3-character currency code).

`public getCurrency() : string|null`

##### Return values

string|null

#### getDateExecuted()

Payout.php : 498

Gets date and time (UTC) when BitPay executed the payout. ISO-8601 format yyyy-mm-ddThh:mm:ssZ.

`public getDateExecuted() : string|null`

##### Return values

string|null

#### getEffectiveDate()

Payout.php : 168

Gets Ledger currency code (ISO 4217 3-character currency code)

`public getEffectiveDate() : string|null`

it indicates on which ledger the payout request will be recorded. If not provided in the request, this parameter will be set by default to the active ledger currency on your account, e.g. your settlement currency.

##### Tags

see
  https://bitpay.com/api/#rest-api-resources-payouts

  Supported ledger currency codes

##### Return values

string|null

#### getEmail()

Payout.php : 330

Gets email.

`public getEmail() : string`

Email address of an active recipient. Note: In the future, BitPay may allow recipients to update the email address tied to their personal account. BitPay encourages the use of `recipientId` or `shopperId` when programatically creating payouts requests.

##### Return values

string

#### getExchangeRates()

Payout.php : 615

Gets exchange rates keyed by source and target currencies.

`public getExchangeRates() : array<string|int, mixed>|null`

##### Return values

array<string|int, mixed>|null

#### getGroupId()

Payout.php : 458

Gets group id.

`public getGroupId() : string|null`

##### Return values

string|null

#### getId()

Payout.php : 521

Gets Payout request id.

`public getId() : string|null`

##### Return values

string|null

#### getLabel()

Payout.php : 411

Gets label.

`public getLabel() : string`

For merchant use, pass through - can be the customer name or unique merchant reference assigned by the merchant to the recipient.

##### Return values

string

#### getLedgerCurrency()

Payout.php : 196

Gets Ledger currency code (ISO 4217 3-character currency code

`public getLedgerCurrency() : string|null`

it indicates on which ledger the payout request will be recorded. If not provided in the request, this parameter will be set by default to the active ledger currency on your account, e.g. your settlement currency.

##### Tags

see
  https://bitpay.com/api/#rest-api-resources-payouts

  Supported ledger currency codes

##### Return values

string|null

#### getMessage()

Payout.php : 436

Gets message.

`public getMessage() : string`

In case of error, this field will contain a description message. Set to `null` if the request is successful.

##### Return values

string

#### getNotificationEmail()

Payout.php : 282

Gets notification email.

`public getNotificationEmail() : string`

Merchant email address for notification of payout status change.

##### Return values

string

#### getNotificationURL()

Payout.php : 258

Gets notification url.

`public getNotificationURL() : string`

URL to which BitPay sends webhook notifications. HTTPS is mandatory.

##### Return values

string

#### getRecipientId()

Payout.php : 354

Gets BitPay recipient id. Assigned by BitPay for a given recipient email during the onboarding process.

`public getRecipientId() : string`

##### Return values

string

#### getReference()

Payout.php : 232

Gets reference.

`public getReference() : string`

Present only if specified by the merchant in the request. Merchants can pass their own unique identifier in this field for reconciliation purpose. Maximum string length is 100 characters.

##### Return values

string

#### getRequestDate()

Payout.php : 595

Gets date and time (UTC) when BitPay received the batch. ISO-8601 format `yyyy-mm-ddThh:mm:ssZ`.

`public getRequestDate() : string|null`

##### Return values

string|null

#### getShopperId()

Payout.php : 381

Gets shopper id.

`public getShopperId() : string`

This is the unique id assigned by BitPay if the shopper used his personal BitPay account to authenticate and pay an invoice. For customers signing up for a brand new BitPay personal account, this id will only be created as part of the payout onboarding. The same field would also be available on paid invoices for customers who signed in with their BitPay personal accounts before completing the payment. This can allow merchants to monitor the activity of a customer (deposits and payouts).

##### Return values

string

#### getStatus()

Payout.php : 558

Gets payout request status.

`public getStatus() : string|null`

The possible values are:

- new - initial status when the payout batch is created
- funded - if there are enough funds available on the merchant account, the payout batches are set to funded. This happens at the daily cutoff time for payout processing, e.g. 2pm and 9pm UTC
- processing - the payout batches switch to this status whenever the corresponding cryptocurrency transactions are broadcasted by BitPay
- complete - the payout batches are marked as complete when the cryptocurrency transaction has reached the typical target confirmation for the corresponding asset. For instance, 6 confirmations for a bitcoin transaction.
- cancelled - when the merchant cancels a payout batch (only possible for requests in the status new

##### Return values

string|null

#### getToken()

Payout.php : 81

Gets resource token.

`public getToken() : string`

This token is actually derived from the API token - used to submit the payout and is tied to the specific payout resource id created.

##### Return values

string

#### getTransactions()

Payout.php : 635

Gets transactions. Contains the cryptocurrency transaction details for the executed payout request.

`public getTransactions() : array<string|int, PayoutTransaction>`

##### Return values

array<string|int, PayoutTransaction>

#### isIgnoreEmails()

Payout.php : 665

Gets boolean to prevent email updates on a specific payout.

`public isIgnoreEmails() : bool`

Defaults to false if not provided - you will receive emails unless specified to true.

##### Return values

bool

#### setAccountId()

Payout.php : 316

Sets BitPay account id that is associated to the payout, assigned by BitPay for a given account during the onboarding process.

`public setAccountId(string $accountId) : void`

##### Parameters

$accountId : string

#### setAmount()

Payout.php : 117

Sets amount of cryptocurrency sent to the requested address.

`public setAmount(float $amount) : void`

##### Parameters

$amount : float

#### setCode()

Payout.php : 488

Sets error code.

`public setCode(int|null $code) : void`

##### Parameters

$code : int|null

#### setCurrency()

Payout.php : 148

Sets currency code set for the batch amount (ISO 4217 3-character currency code).

`public setCurrency(string $currency) : void`

##### Parameters

$currency : string

##### Tags

throws
  BitPayValidationException

#### setDateExecuted()

Payout.php : 508

Sets date and time (UTC) when BitPay executed the payout. ISO-8601 format yyyy-mm-ddThh:mm:ssZ.

`public setDateExecuted(string $dateExecuted) : void`

##### Parameters

$dateExecuted : string

#### setEffectiveDate()

Payout.php : 180

Sets effective date and time (UTC) for the payout.

`public setEffectiveDate(string $effectiveDate) : void`

ISO-8601 format yyyy-mm-ddThh:mm:ssZ. If not provided, defaults to date and time of creation.

##### Parameters

$effectiveDate : string

#### setEmail()

Payout.php : 344

Sets email.

`public setEmail(string $email) : void`

Email address of an active recipient. Note: In the future, BitPay may allow recipients to update the email address tied to their personal account. BitPay encourages the use of `recipientId` or `shopperId` when programatically creating payouts requests.

##### Parameters

$email : string

#### setExchangeRates()

Payout.php : 625

Sets exchange rates keyed by source and target currencies.

`public setExchangeRates(array<string|int, mixed> $exchangeRates) : void`

##### Parameters

$exchangeRates : array<string|int, mixed>

#### setGroupId()

Payout.php : 468

Sets group id.

`public setGroupId(string|null $groupId) : void`

##### Parameters

$groupId : string|null

#### setId()

Payout.php : 531

Sets Payout request id.

`public setId(string $id) : void`

##### Parameters

$id : string

#### setIgnoreEmails()

Payout.php : 676

Sets boolean to prevent email updates on a specific payout.

`public setIgnoreEmails(bool $ignoreEmails) : void`

Defaults to false if not provided - you will receive emails unless specified to true.

##### Parameters

$ignoreEmails : bool

#### setLabel()

Payout.php : 424

Sets label.

`public setLabel(string $label) : void`

For merchant use, pass through - can be the customer name or unique merchant reference assigned by the merchant to the recipient.

##### Parameters

$label : string

#### setLedgerCurrency()

Payout.php : 211

Sets Ledger currency code (ISO 4217 3-character currency code)

`public setLedgerCurrency(string $ledgerCurrency) : void`

it indicates on which ledger the payout request will be recorded. If not provided in the request, this parameter will be set by default to the active ledger currency on your account, e.g. your settlement currency.

##### Parameters

$ledgerCurrency : string

##### Tags

throws
  BitPayValidationException

#### setMessage()

Payout.php : 448

Sets message.

`public setMessage(string $message) : void`

In case of error, this field will contain a description message. Set to `null` if the request is successful.

##### Parameters

$message : string

#### setNotificationEmail()

Payout.php : 294

Sets notification email.

`public setNotificationEmail(string $notificationEmail) : void`

Merchant email address for notification of payout status change.

##### Parameters

$notificationEmail : string

#### setNotificationURL()

Payout.php : 270

Sets notification url.

`public setNotificationURL(string $notificationURL) : void`

URL to which BitPay sends webhook notifications. HTTPS is mandatory.

##### Parameters

$notificationURL : string

#### setRecipientId()

Payout.php : 364

Sets BitPay recipient id. Assigned by BitPay for a given recipient email during the onboarding process.

`public setRecipientId(string $recipientId) : void`

##### Parameters

$recipientId : string

#### setReference()

Payout.php : 246

Sets reference.

`public setReference(string $reference) : void`

Present only if specified by the merchant in the request. Merchants can pass their own unique identifier in this field for reconciliation purpose. Maximum string length is 100 characters.

##### Parameters

$reference : string

#### setRequestDate()

Payout.php : 605

Sets date and time (UTC) when BitPay received the batch. ISO-8601 format `yyyy-mm-ddThh:mm:ssZ`.

`public setRequestDate(string $requestDate) : void`

##### Parameters

$requestDate : string

#### setShopperId()

Payout.php : 398

Sets shopper id.

`public setShopperId(string $shopperId) : void`

This is the unique id assigned by BitPay if the shopper used his personal BitPay account to authenticate and pay an invoice. For customers signing up for a brand new BitPay personal account, this id will only be created as part of the payout onboarding. The same field would also be available on paid invoices for customers who signed in with their BitPay personal accounts before completing the payment. This can allow merchants to monitor the activity of a customer (deposits and payouts).

##### Parameters

$shopperId : string

#### setStatus()

Payout.php : 585

Sets payout request status.

`public setStatus(string $status) : void`

The possible values are:

- new - initial status when the payout batch is created
- funded - if there are enough funds available on the merchant account, the payout batches are set to funded. This happens at the daily cutoff time for payout processing, e.g. 2pm and 9pm UTC
- processing - the payout batches switch to this status whenever the corresponding cryptocurrency transactions are broadcasted by BitPay
- complete - the payout batches are marked as complete when the cryptocurrency transaction has reached the typical target confirmation for the corresponding asset. For instance, 6 confirmations for a bitcoin transaction.
- cancelled - when the merchant cancels a payout batch (only possible for requests in the status new

##### Parameters

$status : string

#### setToken()

Payout.php : 94

Sets resource token.

`public setToken(string $token) : void`

This token is actually derived from the API token - used to submit the payout and is tied to the specific payout resource id created.

##### Parameters

$token : string

#### setTransactions()

Payout.php : 646

Sets transactions. Contains the cryptocurrency transaction details for the executed payout request.

`public setTransactions(array<string|int, PayoutTransaction> $transactions) : void`

##### Parameters

$transactions : array<string|int, PayoutTransaction>

##### Tags

throws
  PayoutException

#### toArray()

Payout.php : 686

Return Payout values as array.

`public toArray() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

## Search results