ApiRefunds class provides methods to retrieve refund transactions. Refunds are created through the PayIn or PayOut objects.
Methods
Get
Get a refund object by ID.The unique identifier of the refund
\MangoPay\Refund - The Refund object
Example:
To create refunds, use
ApiPayIns->CreateRefund() for pay-in refunds. Refunds for payouts are created through the payout endpoints.Refund Entity
TheRefund entity represents a refund transaction.
Properties
The unique identifier of the refund
Unix timestamp of when the refund was created
Custom data for your use
The user ID who initiated the refund
The user ID being credited by the refund
The ID of the wallet being debited for the refund
The ID of the wallet being credited by the refund
The amount debited for the refund
The amount credited by the refund (DebitedFunds - Fees)
The fees for the refund transaction
The status of the refund:
CREATED, SUCCEEDED, FAILEDThe result code of the refund
The result message explaining the result code
Unix timestamp of when the refund was executed
The transaction type:
PAYOUT or TRANSFERThe transaction nature:
REFUNDThe ID of the initial transaction being refunded
The type of the initial transaction:
PAYIN, PAYOUT, TRANSFERContains information about the reason for the refund
Custom reference for the refund
A description that appears on the bank statement