Refund
in package
Class Refund
Tags
Table of Contents
- $amount : float
- $buyerPaysRefundFee : bool|null
- $currency : string
- $guid : string|null
- $id : string|null
- $immediate : bool|null
- $invoice : string|null
- $invoiceId : string|null
- $lastRefundNotification : string|null
- $notificationURL : string|null
- $preview : bool|null
- $reference : string|null
- $refundAddress : string|null
- $refundFee : float|null
- $requestDate : string|null
- $status : string|null
- $supportRequest : string|null
- $token : string
- $transactionAmount : float|null
- $transactionCurrency : string|null
- $transactionRefundFee : float|null
- $txid : string|null
- $type : string|null
- __construct() : mixed
- Constructor, create Refund object
- getAmount() : float
- Gets amount to be refunded in the invoice currency
- getBuyerPaysRefundFee() : bool|null
- Gets whether the buyer should pay the refund fee rather than the merchant
- getCurrency() : string
- Gets reference currency used for the refund, the same as the currency used to create the invoice
- getGuid() : string|null
- Gets a passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order ID in their system
- getId() : string|null
- Gets the ID of the refund
- getImmediate() : bool|null
- Gets whether the funds should be removed from merchant ledger immediately on submission or at the time of processing
- getInvoice() : string|null
- Gets the ID of the invoice being refunded
- getInvoiceId() : string|null
- Gets the ID of the invoice to refund
- getLastRefundNotification() : string|null
- Gets the last time notification of buyer was attempted
- getNotificationURL() : string|null
- Gets URL to which BitPay sends webhook notifications. HTTPS is mandatory.
- getPreview() : bool|null
- Whether to create the refund request as a preview
- getReference() : string|null
- Present only if specified in the request to create the refund. This is your reference label for this refund.
- getRefundAddress() : string|null
- Gets the wallet address that the refund will return the funds to, added by the customer.
- getRefundFee() : float|null
- Gets the amount of refund fee expressed in terms of pricing currency
- getRequestDate() : string|null
- Gets the date the refund was requested
- getStatus() : string|null
- Gets the refund lifecycle status of the request
- getSupportRequest() : string|null
- Gets the ID of the associated support request for the refund.
- getToken() : string
- Gets API token
- getTransactionAmount() : float|null
- Gets amount to be refunded in terms of the transaction currency.
- getTransactionCurrency() : string|null
- Gets the currency used for the invoice transaction.
- getTransactionRefundFee() : float|null
- Gets the refund fee expressed in terms of transaction currency.
- getTxid() : string|null
- Gets the transaction ID of the refund once executed.
- getType() : string|null
- <p>Gets the type of refund.</p> <ul> <li>full (current rate): A full refund of the amount paid at the current rate.</li> <li>full (fixed rate): A full refund of the amount paid at the fixed rate.
- setAmount() : void
- Sets amount to be refunded
- setBuyerPaysRefundFee() : void
- Sets whether the buyer should pay the refund fee rather
- setCurrency() : void
- Sets currency used for the refund
- setGuid() : void
- Sets guid
- setId() : void
- Sets id of the refund
- setImmediate() : void
- Sets immediate value
- setInvoice() : void
- Sets the id of the invoice being refunded
- setInvoiceId() : void
- Sets invoice id
- setLastRefundNotification() : void
- Sets last refund notification
- setNotificationURL() : void
- Sets URL to which BitPay sends webhook notifications. HTTPS is mandatory.
- setPreview() : void
- Sets preview
- setReference() : void
- Sets reference label for refund
- setRefundAddress() : void
- Sets the wallet address that the refund will return the funds to, added by the customer.
- setRefundFee() : void
- Sets amount of the refund fee
- setRequestDate() : void
- Sets request date
- setStatus() : void
- Sets refund status
- setSupportRequest() : void
- Sets the ID of the associated support request for the refund.
- setToken() : void
- Sets API token
- setTransactionAmount() : void
- Sets amount to be refunded in terms of the transaction currency.
- setTransactionCurrency() : void
- Sets the currency used for the invoice transaction.
- setTransactionRefundFee() : void
- Sets the refund fee expressed in terms of transaction currency.
- setTxid() : void
- Sets the transaction ID of the refund once executed.
- setType() : void
- <p>Sets the type of refund.</p> <ul> <li>full (current rate): A full refund of the amount paid at the current rate.</li> <li>full (fixed rate): A full refund of the amount paid at the fixed rate.
- toArray() : array<string|int, mixed>
- Return Refund values as array
Properties
$amount
protected
float
$amount
$buyerPaysRefundFee
protected
bool|null
$buyerPaysRefundFee
= null
$currency
protected
string
$currency
$guid
protected
string|null
$guid
= null
$id
protected
string|null
$id
= null
$immediate
protected
bool|null
$immediate
= null
$invoice
protected
string|null
$invoice
= null
$invoiceId
protected
string|null
$invoiceId
= null
$lastRefundNotification
protected
string|null
$lastRefundNotification
= null
$notificationURL
protected
string|null
$notificationURL
= null
$preview
protected
bool|null
$preview
= null
$reference
protected
string|null
$reference
= null
$refundAddress
protected
string|null
$refundAddress
= null
$refundFee
protected
float|null
$refundFee
= null
$requestDate
protected
string|null
$requestDate
= null
$status
protected
string|null
$status
= null
$supportRequest
protected
string|null
$supportRequest
= null
$token
protected
string
$token
$transactionAmount
protected
float|null
$transactionAmount
= null
$transactionCurrency
protected
string|null
$transactionCurrency
= null
$transactionRefundFee
protected
float|null
$transactionRefundFee
= null
$txid
protected
string|null
$txid
= null
$type
protected
string|null
$type
= null
Methods
__construct()
Constructor, create Refund object
public
__construct([float $amount = 0.0 ][, string $currency = "" ][, string $token = "" ]) : mixed
Parameters
- $amount : float = 0.0
- $currency : string = ""
- $token : string = ""
Return values
mixed —getAmount()
Gets amount to be refunded in the invoice currency
public
getAmount() : float
Return values
float —getBuyerPaysRefundFee()
Gets whether the buyer should pay the refund fee rather than the merchant
public
getBuyerPaysRefundFee() : bool|null
Return values
bool|null —getCurrency()
Gets reference currency used for the refund, the same as the currency used to create the invoice
public
getCurrency() : string
Return values
string —getGuid()
Gets a passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order ID in their system
public
getGuid() : string|null
Return values
string|null —getId()
Gets the ID of the refund
public
getId() : string|null
Return values
string|null —getImmediate()
Gets whether the funds should be removed from merchant ledger immediately on submission or at the time of processing
public
getImmediate() : bool|null
Return values
bool|null —getInvoice()
Gets the ID of the invoice being refunded
public
getInvoice() : string|null
Return values
string|null —getInvoiceId()
Gets the ID of the invoice to refund
public
getInvoiceId() : string|null
Return values
string|null —getLastRefundNotification()
Gets the last time notification of buyer was attempted
public
getLastRefundNotification() : string|null
Return values
string|null —getNotificationURL()
Gets URL to which BitPay sends webhook notifications. HTTPS is mandatory.
public
getNotificationURL() : string|null
Return values
string|null —getPreview()
Whether to create the refund request as a preview
public
getPreview() : bool|null
Return values
bool|null —getReference()
Present only if specified in the request to create the refund. This is your reference label for this refund.
public
getReference() : string|null
It will be passed-through on each response for you to identify the refund in your system. Maximum string length is 100 characters
Return values
string|null —getRefundAddress()
Gets the wallet address that the refund will return the funds to, added by the customer.
public
getRefundAddress() : string|null
Return values
string|null —getRefundFee()
Gets the amount of refund fee expressed in terms of pricing currency
public
getRefundFee() : float|null
Return values
float|null —getRequestDate()
Gets the date the refund was requested
public
getRequestDate() : string|null
Return values
string|null —getStatus()
Gets the refund lifecycle status of the request
public
getStatus() : string|null
Return values
string|null —getSupportRequest()
Gets the ID of the associated support request for the refund.
public
getSupportRequest() : string|null
Return values
string|null —getToken()
Gets API token
public
getToken() : string
Return values
string —getTransactionAmount()
Gets amount to be refunded in terms of the transaction currency.
public
getTransactionAmount() : float|null
Return values
float|null —getTransactionCurrency()
Gets the currency used for the invoice transaction.
public
getTransactionCurrency() : string|null
Return values
string|null —getTransactionRefundFee()
Gets the refund fee expressed in terms of transaction currency.
public
getTransactionRefundFee() : float|null
Return values
float|null —getTxid()
Gets the transaction ID of the refund once executed.
public
getTxid() : string|null
Return values
string|null —getType()
<p>Gets the type of refund.</p> <ul> <li>full (current rate): A full refund of the amount paid at the current rate.</li> <li>full (fixed rate): A full refund of the amount paid at the fixed rate.
public
getType() : string|null
Note: deprecated refund implementation only.
Return values
string|null —setAmount()
Sets amount to be refunded
public
setAmount(float $amount) : void
Parameters
- $amount : float
Return values
void —setBuyerPaysRefundFee()
Sets whether the buyer should pay the refund fee rather
public
setBuyerPaysRefundFee(bool $buyerPaysRefundFee) : void
Parameters
- $buyerPaysRefundFee : bool
Return values
void —setCurrency()
Sets currency used for the refund
public
setCurrency(string $currency) : void
Parameters
- $currency : string
Return values
void —setGuid()
Sets guid
public
setGuid(string $guid) : void
Parameters
- $guid : string
Return values
void —setId()
Sets id of the refund
public
setId(string $id) : void
Parameters
- $id : string
Return values
void —setImmediate()
Sets immediate value
public
setImmediate(bool $immediate) : void
Parameters
- $immediate : bool
Return values
void —setInvoice()
Sets the id of the invoice being refunded
public
setInvoice(string $invoice) : void
Parameters
- $invoice : string
Return values
void —setInvoiceId()
Sets invoice id
public
setInvoiceId(string $invoiceId) : void
Parameters
- $invoiceId : string
Return values
void —setLastRefundNotification()
Sets last refund notification
public
setLastRefundNotification(string $lastRefundNotification) : void
Parameters
- $lastRefundNotification : string
Return values
void —setNotificationURL()
Sets URL to which BitPay sends webhook notifications. HTTPS is mandatory.
public
setNotificationURL(string|null $notificationURL) : void
Parameters
- $notificationURL : string|null
Return values
void —setPreview()
Sets preview
public
setPreview(bool $preview) : void
Parameters
- $preview : bool
Return values
void —setReference()
Sets reference label for refund
public
setReference(string $reference) : void
Parameters
- $reference : string
Return values
void —setRefundAddress()
Sets the wallet address that the refund will return the funds to, added by the customer.
public
setRefundAddress(string|null $refundAddress) : void
Parameters
- $refundAddress : string|null
Return values
void —setRefundFee()
Sets amount of the refund fee
public
setRefundFee(float $refundFee) : void
Parameters
- $refundFee : float
Return values
void —setRequestDate()
Sets request date
public
setRequestDate(string $requestDate) : void
Parameters
- $requestDate : string
Return values
void —setStatus()
Sets refund status
public
setStatus(string $status) : void
Parameters
- $status : string
Return values
void —setSupportRequest()
Sets the ID of the associated support request for the refund.
public
setSupportRequest(string|null $supportRequest) : void
Parameters
- $supportRequest : string|null
Return values
void —setToken()
Sets API token
public
setToken(string $token) : void
Parameters
- $token : string
Return values
void —setTransactionAmount()
Sets amount to be refunded in terms of the transaction currency.
public
setTransactionAmount(float|null $transactionAmount) : void
Parameters
- $transactionAmount : float|null
Return values
void —setTransactionCurrency()
Sets the currency used for the invoice transaction.
public
setTransactionCurrency(string|null $transactionCurrency) : void
Parameters
- $transactionCurrency : string|null
Return values
void —setTransactionRefundFee()
Sets the refund fee expressed in terms of transaction currency.
public
setTransactionRefundFee(float|null $transactionRefundFee) : void
Parameters
- $transactionRefundFee : float|null
Return values
void —setTxid()
Sets the transaction ID of the refund once executed.
public
setTxid(string|null $txid) : void
Parameters
- $txid : string|null
Return values
void —setType()
<p>Sets the type of refund.</p> <ul> <li>full (current rate): A full refund of the amount paid at the current rate.</li> <li>full (fixed rate): A full refund of the amount paid at the fixed rate.
public
setType(string|null $type) : void
Note: deprecated refund implementation only.
Parameters
- $type : string|null
Return values
void —toArray()
Return Refund values as array
public
toArray() : array<string|int, mixed>