Search historical payouts
Overview
Use the searchPayouts method to extract information on the historical payouts issued by 2Checkout for your account.
You can retrieve information on the payment for a specific invoice, or search based on numerous filters such as payment status, transfer date, or payout method.
Search filters
| Parameters | Type/Description |
|---|---|
| Reference |
Optional/String InvoicePrefix (PREFIX) + InvoiceNo (00000) will search for transfers containing an invoice with prefix + number. The invoice reference is generated by 2Checkout and can be found in the Accounting area from your Control Panel. |
| Status |
Optional/Array of strings Possible payout statuses:
|
| Currency |
Optional/String 3 letter ISO currency code. |
| StartDate |
Optional/String Start payment date. Format: Yyyy-mm-dd. |
| EndDate |
Optional/String End payment date. Format: Yyyy-mm-dd. |
| PaymentType |
Optional/String Possible payout methods:
|
| OrderBy |
Optional/Array of objects Details below |
| Field |
String Variable used for ordering the returned data. Possible values:
|
| Direction |
String Order direction. Possible values:
|
| Pagination |
Optional/Object Use this object for paginating the results. Default behavior is to display 10 results per page. |
| Page |
Integer Number of pages used for displaying results. |
| Limit |
Integer Limit the number of results. |
Request
<?php
require('PATH_TO_AUTH');
$SearchOptions = new stdClass();
//$SearchOptions->Reference = 'FBV8572'; // search for a specific invoice
$SearchOptions->Status = ['PAID', 'CANCELED'];
$SearchOptions->Currency = 'USD';
$SearchOptions->StartDate = '2018-05-01';
$SearchOptions->EndDate = '2018-06-01';
$SearchOptions->PaymentType = 'WIRE';
$SearchOptions->OrderBy = [];
$orderBy = new stdClass();
$orderBy->Field = 'TransferCompletionDate';
$orderBy->Direction = 'DESC';
$SearchOptions->OrderBy[] = $orderBy;
$SearchOptions->Pagination = new stdClass();
//$SearchOptions->Pagination->Page = 1;
//$SearchOptions->Pagination->Limit = 200;
try {
$subscriptionInfo = $client->searchPayouts($sessionID, $SearchOptions);
}
catch (SoapFault $e) {
echo "AccountPayouts: " . $e->getMessage();
exit;
}
var_dump("Payouts", $subscriptionInfo);
Response
Historical payout object
| Parameters | Type/Description | |
|---|---|---|
| Items |
Array of objects Details below |
|
| PaymentInstance |
Object Details below |
|
| TransferCompletionDate | String | |
| Payment date. Format: Yyyy-mm-dd. | ||
| PaymentType | String | |
|
Payout method used for the transfer. Possible values:
|
||
| Amount | Float | |
| Amount transferred. Can be negative, for invoices deducted from your payment. | ||
| Currency | String | |
| Currency in which the amount was transferred. Three letters ISO currency code. | ||
| Status | String | |
|
Payment status. Possible values:
|
||
| Invoices |
Array of objects An object is created for each invoice part of the payment. |
|
| Reference | String | |
| System generated invoice reference. Formed by InvoicePrefix (PREFIX) + InvoiceNo (00000). | ||
| Amount | Float | |
| Invoice amount. | ||
| Description | String | |
| Comments submitted on the invoice. | ||
| Type | String | |
|
Invoice type. Possible values:
|
||
| Code | String | |
|
Code used for identifying the invoice type. Possible values:
|
||
| Date | String | |
| Date the invoice was generated. | ||
| PaidAmount | Float | |
| Invoice amount paid on this transfer. | ||
| PaidDate | String | |
| Transfer date. | ||
| PaidCurrency | String | |
| Currency of the transfer. | ||
| Summary |
Object A summary of all the invoices included in this transfer. |
|
| ServicesAmount | Float | |
| Amount paid or retained for 2Checkout service invoices. | ||
| PurchaseOrdersAmount | Float | |
| Amount paid for purchase orders. | ||
| ChargeBacksAmount | Float | |
| Amount paid for chargebacks retained and released. | ||
| RollingReserveAmount | Float | |
| Amount paid for rolling reserves. | ||
| PeriodNetSales | Float | |
| Amount paid for period net sales. | ||
| VendorToVendor | Float | |
| Amount paid for vendor 2 vendor invoices. | ||
| ChargeBackFund | Float | |
| Amount paid for the chargeback fund. | ||
| Pagination |
Object Details below |
|
| Page | Integer | |
| Number of pages used for displaying the results. | ||
| Limit | Integer | |
| Limitation of the result numbers. | ||
| Count | Integer | |
| Total number of results. | ||