Menu

## Client
in package

Client.php : 51

Client class to interact with the BitPay API.

##### Tags

author

  BitPay Integrations integrations@bitpay.com

license

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

### Table of Contents

#### Properties

$restCli : RESTcli
$tokenCache : Tokens

#### Methods

__construct() : mixed
  Client constructor.
cancelInvoice() : Invoice
  Cancel a BitPay invoice.
cancelInvoiceByGuid() : Invoice
  Cancel a BitPay invoice.
cancelPayout() : bool
  Cancel a BitPay Payout.
cancelPayoutGroup() : PayoutGroup
cancelRefund() : Refund
  Cancel a previously submitted refund request on a BitPay invoice.
cancelRefundByGuid() : Refund
  Cancel a previously submitted refund request on a BitPay invoice.
createBill() : Bill
  Create a BitPay Bill.
createInvoice() : Invoice
  Create a BitPay invoice.
createPayoutGroup() : PayoutGroup
createRefund() : Refund
  Create a refund for a BitPay invoice.
createWithData() : Client
  Constructor for use if the keys and SIN are managed by this library.
createWithFile() : Client
  Constructor for use if the keys and SIN are managed by this library.
deletePayoutRecipient() : bool
  Delete a Payout Recipient.
deliverBill() : bool
  Deliver a BitPay Bill.
getBill() : Bill
  Retrieve a BitPay bill by bill id using the specified facade.
getBills() : array<string|int, Bill>
  Retrieve a collection of BitPay bills.
getCurrencyPairRate() : Rate
  Retrieve the rate for a cryptocurrency / fiat pair
getCurrencyRates() : Rates
  Retrieve all the rates for a given cryptocurrency
getInvoice() : Invoice
  Retrieve a BitPay invoice by invoice id using the specified facade. The client must have been previously authorized for the specified facade (the public facade requires no authorization).
getInvoiceByGuid() : Invoice
  Retrieve a BitPay invoice by guid using the specified facade.
getInvoices() : array<string|int, Invoice>
  Retrieve a collection of BitPay invoices.
getLedgerEntries() : array<string|int, LedgerEntry>
  Retrieve a list of ledgers by date range using the merchant facade.
getLedgers() : array<string|int, Ledger>
  Retrieve a list of ledgers using the merchant facade.
getPayout() : Payout
  Retrieve a BitPay payout by payout id using. The client must have been previously authorized for the payout facade.
getPayoutRecipient() : PayoutRecipient
  Retrieve a BitPay payout recipient by batch id using. The client must have been previously authorized for the payout facade.
getPayoutRecipients() : array<string|int, PayoutRecipient>
  Retrieve a collection of BitPay Payout Recipients.
getPayouts() : array<string|int, Payout>
  Retrieve a collection of BitPay payouts.
getRates() : Rates
  Retrieve the exchange rate table maintained by BitPay.
getRefund() : Refund
  Retrieve a previously made refund request on a BitPay invoice.
getRefundByGuid() : Refund
  Retrieve a previously made refund request on a BitPay invoice.
getRefunds() : array<string|int, Refund>
  Retrieve all refund requests on a BitPay invoice.
getSettlement() : Settlement
  Retrieves a summary of the specified settlement.
getSettlementReconciliationReport() : 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.
getSupportedWallets() : array<string|int, Wallet>
  Retrieve all supported wallets.
getTokens() : array<string|int, mixed>
  Get Tokens.
payInvoice() : Invoice
  Pay an invoice with a mock transaction
requestInvoiceNotification() : bool
  Request a BitPay Invoice Webhook.
requestPayoutNotification() : bool
  Notify BitPay Payout.
requestPayoutRecipientNotification() : bool
  Notify BitPay Payout Recipient.
sendRefundNotification() : bool
  Send a refund notification.
submitPayout() : Payout
  Submit a BitPay Payout.
submitPayoutRecipients() : array<string|int, PayoutRecipient>
  Submit BitPay Payout Recipients.
updateBill() : Bill
  Update a BitPay Bill.
updateInvoice() : Invoice
  Update a BitPay invoice.
updatePayoutRecipient() : PayoutRecipient
  Update a Payout Recipient.
updateRefund() : Refund
  Update the status of a BitPay invoice.
updateRefundByGuid() : Refund
  Update the status of a BitPay invoice.
getBillClient() : BillClient
  Gets bill client
getInvoiceClient() : InvoiceClient
  Gets invoice client
getLedgerClient() : LedgerClient
  Gets ledger client
getPayoutClient() : PayoutClient
  Gets payout client
getPayoutRecipientsClient() : PayoutRecipientsClient
  Gets payout recipients client
getRateClient() : RateClient
  Gets rate client
getRefundClient() : RefundClient
  Gets refund client
getSettlementClient() : SettlementClient
  Gets settlement client
getWalletClient() : WalletClient
  Gets wallet client
getConfigData() : array<string|int, mixed>
getTokenClient() : TokenClient
  Gets token client
initKeys() : PrivateKey|null

### Properties

#### $restCli

Client.php : 54
`protected RESTcli $restCli`

#### $tokenCache

Client.php : 53
`protected Tokens $tokenCache`

### Methods

#### __construct()

Client.php : 59

Client constructor.

`public __construct(RESTcli $restCli, Tokens $tokenCache) : mixed`

##### Parameters

$restCli : RESTcli
$tokenCache : Tokens

#### cancelInvoice()

Client.php : 297

Cancel a BitPay invoice.

`public cancelInvoice(string $invoiceId[, bool $forceCancel = false ]) : Invoice`

##### Parameters

$invoiceId : string

  The id of the invoice to updated.

$forceCancel : bool = false

##### Tags

see
  https://developer.bitpay.com/reference/cancel-an-invoice

  Cancel an Invoice

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice —

$invoice Cancelled invoice object.

#### cancelInvoiceByGuid()

Client.php : 316

Cancel a BitPay invoice.

`public cancelInvoiceByGuid(string $guid[, bool $forceCancel = false ]) : Invoice`

##### Parameters

$guid : string

  The guid of the invoice to cancel.

$forceCancel : bool = false

##### Tags

see
  https://developer.bitpay.com/reference/cancel-an-invoice-by-guid

  Cancel an Invoice by GUID

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice —

$invoice Cancelled invoice object.

#### cancelPayout()

Client.php : 895

Cancel a BitPay Payout.

`public cancelPayout(string $payoutId) : bool`

##### Parameters

$payoutId : string

  The id of the payout to cancel.

##### Tags

see
  https://developer.bitpay.com/reference/cancel-a-payout

  Cancel a Payout

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

bool

#### cancelPayoutGroup()

Client.php : 943
`public cancelPayoutGroup(string $groupId) : PayoutGroup`

##### Parameters

$groupId : string

##### Tags

see
  https://developer.bitpay.com/reference/cancel-a-payout-group

  Cancel a Payout Group

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

PayoutGroup

#### cancelRefund()

Client.php : 491

Cancel a previously submitted refund request on a BitPay invoice.

`public cancelRefund(string $refundId) : Refund`

##### Parameters

$refundId : string

  The refund Id for the refund to be canceled.

##### Tags

see
  https://developer.bitpay.com/reference/cancel-a-refund-request

  Cancel a Refund Request

throws
  BitPayApiException

##### Return values

Refund —

$refund Cancelled refund Object.

#### cancelRefundByGuid()

Client.php : 508

Cancel a previously submitted refund request on a BitPay invoice.

`public cancelRefundByGuid(string $guid) : Refund`

##### Parameters

$guid : string

  The refund Guid for the refund to be canceled.

##### Tags

see
  https://developer.bitpay.com/reference/cancel-a-refund-by-guid-request

  Cancel a Refund by GUID Request

throws
  BitPayApiException

##### Return values

Refund —

$refund Cancelled refund Object.

#### createBill()

Client.php : 544

Create a BitPay Bill.

`public createBill(Bill $bill[, string $facade = Facade::MERCHANT ][, bool $signRequest = true ]) : Bill`

##### Parameters

$bill : Bill

  A Bill object with request parameters defined.

$facade : string = Facade::MERCHANT

  The facade used to create it.

$signRequest : bool = true

  Signed request.

##### Tags

see
  https://developer.bitpay.com/reference/create-a-bill

  Create a Bill

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Bill

#### createInvoice()

Client.php : 156

Create a BitPay invoice.

`public createInvoice(Invoice $invoice[, string $facade = Facade::MERCHANT ][, bool $signRequest = true ]) : Invoice`

##### Parameters

$invoice : Invoice

  An Invoice object with request parameters defined.

$facade : string = Facade::MERCHANT

  The facade used to create it.

$signRequest : bool = true

  Signed request.

##### Tags

see
  https://developer.bitpay.com/reference/create-an-invoice

  Create an Invoice

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice

#### createPayoutGroup()

Client.php : 928
`public createPayoutGroup(array<string|int, Payout> $payouts) : PayoutGroup`

##### Parameters

$payouts : array<string|int, Payout>

##### Tags

see
  https://developer.bitpay.com/reference/create-payout-group

  Create Payout Group

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

PayoutGroup

#### createRefund()

Client.php : 361

Create a refund for a BitPay invoice.

`public createRefund(string $invoiceId, float $amount, string $currency[, bool $preview = false ][, bool $immediate = false ][, bool $buyerPaysRefundFee = false ][, string|null $guid = null ]) : Refund`

##### Parameters

$invoiceId : string

  The BitPay invoice Id having the associated refund to be created.

$amount : float

  Amount to be refunded in the currency indicated.

$currency : string

  Reference currency used for the refund, usually the same as the currency used to create the invoice.

$preview : bool = false

  Whether to create the refund request as a preview (which will not be acted on until status is updated)

$immediate : bool = false

  Whether funds should be removed from merchant ledger immediately on submission or at time of processing

$buyerPaysRefundFee : bool = false

  Whether the buyer should pay the refund fee (default is merchant)

$guid : string|null = null

##### Tags

see
  https://developer.bitpay.com/reference/create-a-refund-request

  Create a Refund Request

throws
  BitPayApiException

  BitPayException class

throws
  BitPayGenericException

  BitPayGenericException

##### Return values

Refund —

$refund An updated Refund Object

#### createWithData()

Client.php : 79

Constructor for use if the keys and SIN are managed by this library.

`public static createWithData(string $environment, string $privateKey, Tokens $tokens[, string|null $privateKeySecret = null ][, string|null $proxy = null ][, string|null $platformInfo = null ]) : Client`

##### Parameters

$environment : string

  Target environment. Options: Env.Test / Env.Prod

$privateKey : string

  Private Key file path or the HEX value.

$tokens : Tokens

  Tokens containing the available tokens.

$privateKeySecret : string|null = null

  Private Key encryption password.

$proxy : string|null = null

  The url of your proxy to forward requests through. Example: http://********.com:3128

$platformInfo : string|null = null

  Value for the X-BitPay-Platform header.

##### Tags

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Client

#### createWithFile()

Client.php : 109

Constructor for use if the keys and SIN are managed by this library.

`public static createWithFile(string $configFilePath[, string|null $platformInfo = null ]) : Client`

##### Parameters

$configFilePath : string

  The path to the configuration file.

$platformInfo : string|null = null

  Value for the X-BitPay-Platform header.

##### Tags

throws
  BitPayGenericException

##### Return values

Client

#### deletePayoutRecipient()

Client.php : 796

Delete a Payout Recipient.

`public deletePayoutRecipient(string $recipientId) : bool`

##### Parameters

$recipientId : string

  The recipient id for the recipient to be deleted.

##### Tags

see
  https://developer.bitpay.com/reference/remove-a-recipient

  Remove a Recipient

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

bool —

True if the recipient was successfully deleted, false otherwise.

#### deliverBill()

Client.php : 617

Deliver a BitPay Bill.

`public deliverBill(string $billId, string $billToken[, bool $signRequest = true ]) : bool`

##### Parameters

$billId : string

  The id of the requested bill.

$billToken : string

  The token of the requested bill.

$signRequest : bool = true

  Allow unsigned request

##### Tags

see
  https://developer.bitpay.com/reference/deliver-a-bill-via-email

  Deliver a Bill Via Email

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

bool

#### getBill()

Client.php : 563

Retrieve a BitPay bill by bill id using the specified facade.

`public getBill(mixed $billId[, mixed $facade = Facade::MERCHANT ][, mixed $signRequest = true ]) : Bill`

##### Parameters

$billId : mixed

  string The id of the bill to retrieve.

$facade : mixed = Facade::MERCHANT

  string The facade used to retrieve it.

$signRequest : mixed = true

  bool Signed request.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-a-bill

  Retrieve a Bill

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Bill

#### getBills()

Client.php : 580

Retrieve a collection of BitPay bills.

`public getBills([string $status = null ]) : array<string|int, Bill>`

##### Parameters

$status : string = null

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-bills-by-status

  Retrieve Bills by Status

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, Bill>

#### getCurrencyPairRate()

Client.php : 671

Retrieve the rate for a cryptocurrency / fiat pair

`public getCurrencyPairRate(string $baseCurrency, string $currency) : Rate`

##### Parameters

$baseCurrency : string

  The cryptocurrency for which you want to fetch the fiat-equivalent rate. Current supported values are BTC, BCH, ETH, XRP, DOGE and LTC

$currency : string

  The fiat currency for which you want to fetch the baseCurrency rate

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-the-rates-for-a-cryptocurrency-fiat-pair

  Retrieve the rates for a cryptocurrency / fiat pair

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Rate —

A Rate object populated with the currency rate for the requested baseCurrency.

#### getCurrencyRates()

Client.php : 651

Retrieve all the rates for a given cryptocurrency

`public getCurrencyRates(string $baseCurrency) : Rates`

##### Parameters

$baseCurrency : string

  The cryptocurrency for which you want to fetch the rates. Current supported values are BTC, BCH, ETH, XRP, DOGE and LTC

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-all-the-rates-for-a-given-cryptocurrency

  Retrieve all the rates for a given cryptocurrency

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Rates —

A Rates object populated with the currency rates for the requested baseCurrency.

#### getInvoice()

Client.php : 205

Retrieve a BitPay invoice by invoice id using the specified facade. The client must have been previously authorized for the specified facade (the public facade requires no authorization).

`public getInvoice(string $invoiceId[, string $facade = Facade::MERCHANT ][, bool $signRequest = true ]) : Invoice`

##### Parameters

$invoiceId : string

  The id of the invoice to retrieve.

$facade : string = Facade::MERCHANT

  The facade used to create it.

$signRequest : bool = true

  Signed request.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-an-invoice-by-guid

  Retrieve an Invoice by GUID

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice

#### getInvoiceByGuid()

Client.php : 229

Retrieve a BitPay invoice by guid using the specified facade.

`public getInvoiceByGuid(string $guid[, string $facade = Facade::MERCHANT ][, bool $signRequest = true ]) : Invoice`

The client must have been previously authorized for the specified facade.

##### Parameters

$guid : string

  The guid of the invoice to retrieve.

$facade : string = Facade::MERCHANT

  The facade used to create it.

$signRequest : bool = true

  Signed request.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-an-invoice-by-guid

  Retrieve an Invoice by GUID

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice

#### getInvoices()

Client.php : 257

Retrieve a collection of BitPay invoices.

`public getInvoices(string $dateStart, string $dateEnd[, string|null $status = null ][, string|null $orderId = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, Invoice>`

##### Parameters

$dateStart : string

  The start of the date window to query for invoices. Format YYYY-MM-DD.

$dateEnd : string

  The end of the date window to query for invoices. Format YYYY-MM-DD.

$status : string|null = null

  The invoice status you want to query on.

$orderId : string|null = null

  The optional order id specified at time of invoice 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

see
  https://developer.bitpay.com/reference/retrieve-invoices-filtered-by-query

  Retrieve Invoices Filtered by Query

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, Invoice>

#### getLedgerEntries()

Client.php : 690

Retrieve a list of ledgers by date range using the merchant facade.

`public getLedgerEntries(string $currency, string $startDate, string $endDate) : array<string|int, LedgerEntry>`

##### Parameters

$currency : string

  The three digit currency string for the ledger to retrieve.

$startDate : string

  The first date for the query filter.

$endDate : string

  The last date for the query filter.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-ledger-entries

  Retrieve Ledger Entries

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, LedgerEntry> —

A Ledger object populated with the BitPay ledger entries list.

#### getLedgers()

Client.php : 706

Retrieve a list of ledgers using the merchant facade.

`public getLedgers() : array<string|int, Ledger>`

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-account-balances

  Retrieve Account Balances

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, Ledger> —

A list of Ledger objects populated with the currency and current balance of each one.

#### getPayout()

Client.php : 849

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

`public getPayout(string $payoutId) : Payout`

##### Parameters

$payoutId : string

  The id of the payout to retrieve.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-a-payout

  Retrieve a Payout

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

Payout

#### getPayoutRecipient()

Client.php : 741

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

`public getPayoutRecipient(string $recipientId) : PayoutRecipient`

##### Parameters

$recipientId : string

  The id of the recipient to retrieve.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-a-recipient

  Retrieve a Recipient

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

PayoutRecipient

#### getPayoutRecipients()

Client.php : 761

Retrieve a collection of BitPay Payout Recipients.

`public getPayoutRecipients([string|null $status = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, PayoutRecipient>`

##### Parameters

$status : string|null = null

  The recipient status you want to query on.

$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

see
  https://developer.bitpay.com/reference/retrieve-recipients-by-status

  Retrieve Recipients by Status

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, PayoutRecipient>

#### getPayouts()

Client.php : 872

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

see
  https://developer.bitpay.com/reference/retrieve-payouts-filtered-by-query

  Retrieve Payouts Filtered by Query

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

array<string|int, Payout>

#### getRates()

Client.php : 632

Retrieve the exchange rate table maintained by BitPay.

`public getRates() : Rates`

##### Tags

see
  https://bitpay.com/bitcoin-exchange-rates
throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Rates

#### getRefund()

Client.php : 440

Retrieve a previously made refund request on a BitPay invoice.

`public getRefund(string $refundId) : Refund`

##### Parameters

$refundId : string

  The BitPay refund ID.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-a-refund-request

  Retrieve a Refund Request

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Refund —

$refund BitPay Refund object with the associated Refund object.

#### getRefundByGuid()

Client.php : 458

Retrieve a previously made refund request on a BitPay invoice.

`public getRefundByGuid(string $guid) : Refund`

##### Parameters

$guid : string

  The BitPay refund Guid

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-a-refund-by-guid-request

  Retrieve a Refund by GUID Request

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Refund —

BitPay Refund object with the associated Refund object.

#### getRefunds()

Client.php : 422

Retrieve all refund requests on a BitPay invoice.

`public getRefunds(string $invoiceId) : array<string|int, Refund>`

##### Parameters

$invoiceId : string

  The BitPay invoice object having the associated refunds.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-refunds-of-an-invoice

  Retrieve Refunds of an Invoice

throws
  BitPayApiException

##### Return values

array<string|int, Refund>

#### getSettlement()

Client.php : 990

Retrieves a summary of the specified settlement.

`public getSettlement(string $settlementId) : Settlement`

##### Parameters

$settlementId : string

  Settlement Id.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-a-settlement

  Retrieve a Settlement

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Settlement

#### getSettlementReconciliationReport()

Client.php : 1008

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

`public getSettlementReconciliationReport(string $settlementId, string $settlementToken) : Settlement`

##### Parameters

$settlementId : string

  Settlement ID

$settlementToken : string

  Settlement Token

##### Tags

see
  https://developer.bitpay.com/reference/fetch-a-reconciliation-report

  Fetch a Reconciliation Report

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Settlement

#### getSettlements()

Client.php : 967

Retrieves settlement reports for the calling merchant filtered by query.

`public getSettlements(mixed $currency, mixed $dateStart, mixed $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 : mixed

  string The three digit currency string for the ledger to retrieve.

$dateStart : mixed

  string The start date for the query.

$dateEnd : mixed

  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

see
  https://developer.bitpay.com/reference/retrieve-settlements

  Retrieve Settlements

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, Settlement>

#### getSupportedWallets()

Client.php : 525

Retrieve all supported wallets.

`public getSupportedWallets() : array<string|int, Wallet>`

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-the-supported-wallets

  Retrieve the Supported Wallets

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, Wallet>

#### getTokens()

Client.php : 137

Get Tokens.

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

##### Tags

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

array<string|int, mixed>

#### payInvoice()

Client.php : 334

Pay an invoice with a mock transaction

`public payInvoice(string $invoiceId[, string $status = 'confirmed' ]) : Invoice`

##### Parameters

$invoiceId : string

  The id of the invoice.

$status : string = 'confirmed'

  Status the invoice will become. Acceptable values are confirmed (default) and complete.

##### Tags

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice —

$invoice Invoice object.

#### requestInvoiceNotification()

Client.php : 280

Request a BitPay Invoice Webhook.

`public requestInvoiceNotification(string $invoiceId) : bool`

##### Parameters

$invoiceId : string

  A BitPay invoice ID.

##### Tags

see
  https://developer.bitpay.com/reference/retrieve-an-event-token

  Retrieve an Event Token

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

bool —

True if the webhook was successfully requested, false otherwise.

#### requestPayoutNotification()

Client.php : 913

Notify BitPay Payout.

`public requestPayoutNotification(string $payoutId) : bool`

##### Parameters

$payoutId : string

  The id of the Payout to notify.

##### Tags

see
  https://developer.bitpay.com/reference/request-a-payout-webhook-to-be-resent

  Request a Payout Webhook to be Resent

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

bool

#### requestPayoutRecipientNotification()

Client.php : 814

Notify BitPay Payout Recipient.

`public requestPayoutRecipientNotification(string $recipientId) : bool`

##### Parameters

$recipientId : string

  The id of the recipient to notify.

##### Tags

see
  https://developer.bitpay.com/reference/request-a-recipient-webhook-to-be-resent

  Request a Recipient Webhook to be Resent

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

bool —

True if the notification was successfully sent, false otherwise.

#### sendRefundNotification()

Client.php : 475

Send a refund notification.

`public sendRefundNotification(string $refundId) : bool`

##### Parameters

$refundId : string

  A BitPay refund ID.

##### Tags

see
  https://developer.bitpay.com/reference/request-a-refund-notification-to-be-resent

  Request a Refund Notification to be Resent

throws
  BitPayApiException

##### Return values

bool —

$result An updated Refund Object

#### submitPayout()

Client.php : 831

Submit a BitPay Payout.

`public submitPayout(Payout $payout) : Payout`

##### Parameters

$payout : Payout

  A Payout object with request parameters defined.

##### Tags

see
  https://developer.bitpay.com/reference/create-a-payout

  Create a Payout

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

Payout

#### submitPayoutRecipients()

Client.php : 723

Submit BitPay Payout Recipients.

`public submitPayoutRecipients(PayoutRecipients $recipients) : array<string|int, PayoutRecipient>`

##### Parameters

$recipients : PayoutRecipients

  A PayoutRecipients object with request parameters defined.

##### Tags

see
  https://developer.bitpay.com/reference/invite-recipients

  Invite Recipients

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

array<string|int, PayoutRecipient> —

A list of BitPay PayoutRecipients objects.

#### updateBill()

Client.php : 598

Update a BitPay Bill.

`public updateBill(Bill $bill, string $billId) : Bill`

##### Parameters

$bill : Bill

  A Bill object with the parameters to update defined.

$billId : string

  The Id of the Bill to update.

##### Tags

see
  https://developer.bitpay.com/reference/update-a-bill

  Update a Bill

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Bill

#### updateInvoice()

Client.php : 180

Update a BitPay invoice.

`public updateInvoice(string $invoiceId, string|null $buyerSms, string|null $smsCode, string|null $buyerEmail[, bool $autoVerify = false ]) : Invoice`

##### Parameters

$invoiceId : string

  The id of the invoice to updated.

$buyerSms : string|null

  The buyer's cell number.

$smsCode : string|null

  The buyer's received verification code.

$buyerEmail : string|null

  The buyer's email address.

$autoVerify : bool = false

  Skip the user verification on sandbox ONLY.

##### Tags

see
  https://developer.bitpay.com/reference/update-an-invoice

  Update an Invoice

throws
  BitPayApiException
throws
  BitPayGenericException

##### Return values

Invoice

#### updatePayoutRecipient()

Client.php : 779

Update a Payout Recipient.

`public updatePayoutRecipient(string $recipientId, PayoutRecipient $recipient) : PayoutRecipient`

##### Parameters

$recipientId : string

  The recipient id for the recipient to be updated.

$recipient : PayoutRecipient

  A PayoutRecipient object with updated parameters defined.

##### Tags

see
  https://developer.bitpay.com/reference/update-a-recipient

  Update a Recipient

throws
  BitPayGenericException
throws
  BitPayApiException

##### Return values

PayoutRecipient

#### updateRefund()

Client.php : 385

Update the status of a BitPay invoice.

`public updateRefund(string $refundId, string $status) : Refund`

##### Parameters

$refundId : string

  BitPay refund ID.

$status : string

  The new status for the refund to be updated.

##### Tags

see
  https://developer.bitpay.com/reference/update-a-refund-request

  Update a Refund Request

throws
  BitPayApiException

##### Return values

Refund —

$refund Refund A BitPay generated Refund object.

#### updateRefundByGuid()

Client.php : 404

Update the status of a BitPay invoice.

`public updateRefundByGuid(string $guid, string $status) : Refund`

##### Parameters

$guid : string

  BitPay refund Guid.

$status : string

  The new status for the refund to be updated.

##### Tags

see
  https://developer.bitpay.com/reference/update-a-refund-by-guid-request

  Update a Refund by GUID Request

throws
  BitPayApiException

##### Return values

Refund —

$refund Refund A BitPay generated Refund object.

#### getBillClient()

Client.php : 1107

Gets bill client

`protected getBillClient() : BillClient`

##### Return values

BillClient —

the bill client

#### getInvoiceClient()

Client.php : 1077

Gets invoice client

`protected getInvoiceClient() : InvoiceClient`

##### Return values

InvoiceClient —

the invoice client

#### getLedgerClient()

Client.php : 1127

Gets ledger client

`protected getLedgerClient() : LedgerClient`

##### Return values

LedgerClient —

the ledger client

#### getPayoutClient()

Client.php : 1147

Gets payout client

`protected getPayoutClient() : PayoutClient`

##### Return values

PayoutClient —

the payout client

#### getPayoutRecipientsClient()

Client.php : 1137

Gets payout recipients client

`protected getPayoutRecipientsClient() : PayoutRecipientsClient`

##### Return values

PayoutRecipientsClient —

the payout recipients client

#### getRateClient()

Client.php : 1117

Gets rate client

`protected getRateClient() : RateClient`

##### Return values

RateClient —

the rate client

#### getRefundClient()

Client.php : 1087

Gets refund client

`protected getRefundClient() : RefundClient`

##### Return values

RefundClient —

the refund client

#### getSettlementClient()

Client.php : 1157

Gets settlement client

`protected getSettlementClient() : SettlementClient`

##### Return values

SettlementClient —

the settlements client

#### getWalletClient()

Client.php : 1097

Gets wallet client

`protected getWalletClient() : WalletClient`

##### Return values

WalletClient —

the wallet client

#### getConfigData()

Client.php : 1047
`private static getConfigData(string $configFilePath) : array<string|int, mixed>`

##### Parameters

$configFilePath : string

##### Tags

throws
  BitPayGenericException

##### Return values

array<string|int, mixed>

#### getTokenClient()

Client.php : 1067

Gets token client

`private getTokenClient() : TokenClient`

##### Return values

TokenClient

#### initKeys()

Client.php : 1022
`private static initKeys(string|null $privateKey, string|null $privateKeySecret) : PrivateKey|null`

##### Parameters

$privateKey : string|null
$privateKeySecret : string|null

##### Tags

throws
  BitPayApiException
throws
  Exception

##### Return values

PrivateKey|null

## Search results