Statements

1 Statement features

Statements are reports of completed purchase transactions, refunds and payouts. They can be configured in the merchant panel.
Please note: Creating statements that will be sent on URL to retrieve via API requires configuration change on Company level. Therefore, it requires contact with PayU Technical Support in order to enable such configuration. For this purpose please use this contact form.

Available statement file formats are: .csv, .pdf and .abo* (*specific to Czech market).

Statements could be:

  • delivered via email as .zip attachment,
  • downloaded from the merchant panel,
  • retrieved via API.

2 CSV format description

Below is a description of all available data fields in the most common and flexible format (.csv) with reference to related fields in REST API and Classic API protocols.

Column name Classic API REST API Data type Description
Date trans_recv localReceiptDateTime yyyy-mm-dd Transaction completion date
Trans ID trans_id properties.payment_id NUM {0,10} Transaction ID assigned by PayU
Amount amount amount NUM {2,14} Amount entered on the billing (1,00)
Type of operation n/a n/a STR {1,4} Most common values: 't' - purchase transaction‘c' - refund (credit) transaction'w' - withdrawal (payout to merchant's bank account)'wc' - cancelled withdrawal (payout to merchant's bank account)‘rc’ – fee return (return of commission billed by PayU)‘bc’ – billing (commission) correction‘nt’ – no balance transaction (operation which does not change merchant account balance)‘or’ – overpayment return‘orc’ – cancelled overpayment return
Account balance n/a n/a NUM {2,14} Merchant account balance after transaction
Change account balance n/a n/a BOOL TRUE/FALSE
Order ID order_id extOrderId STR {1,1024} Order/purchase id provided by the merchant
Description desc description STR {1,2000} Order description provided by the merchant (or by PayU, if operation type is connected with fees/commission)
Description2/Account number desc2 additionalDescription STR {0,1024} Enhanced order description provided by the merchant or bank account number if type of operation is withdrawal (w, wc)
Payment type trans_pay_type payMethod value STR {1,4} Payment method chosen by the payer (available values are here).
Session ID session_id extOrderId STR {1,1024} Payment identifier given by merchant
City city buyer.delivery.city STR {0,50} City address of the payer
Postal code post_code buyer.delivery.postalCode STR {0,25} Postal code of the payer
Phone phone buyer.phone STR {0,100} Phone number of the payer
E-mail email buyer.email STR {0,100} E-mail address of the payer
Street street buyer.delivery.street STR {0,150} Street address of the payer
Name and surname first_name, last_name buyer.firstName, buyer.lastName STR {0,200} Name and surname of the payer
Commission n/a n/a NUM {2,14} PayU Commission (negative value - deducted from transaction amount; positive value - not deducted and to be post-paid via invoice)
Currency n/a currencyCode STR {3} Billing currency
Operation amount n/a n/a NUM {2,14} Operation amount of transaction, refund, corrections or payouts (1,00)
Operation currency n/a n/a STR {3} Operation currency
Commission currency n/a n/a STR {3} Commission currency
Exchange rate n/a n/a NUM {20,10} Exchange rate for shop with different transcation currency and billing currency
Time n/a n/a {hh-mm-ss} 24 hour format Time when operation was logged on billing
POS ID pos_id merchantPosId STR {1,7} POS ID on which operation took place
POS name n/a n/a STR Name of Point of Sales determined in PayU Manager Panel
Split payment n/a n/a BOOL Was payment a "split payment"
Payout public id n/a payout.payoutId STR Assigned by PayU - can be retrieved over API
Payout external id n/a payout.extPayoutId STR Unique payout ID assigned by Merchant (uniqueness on Shop level required)
Shop name n/a n/a STR Defined in PayU Manager Panel

3 Retrieval via API

To get statement notifications and then retrieve statement files via API, the 'Notification mode' option on 'Create statement' screen in the merchant panel must be set to 'Notify url'.

Statement notification

XML form notification will be sent once the statement is ready for retrieval. Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <reportNotifyRequest xmlns="http://www.openpayu.com/public/21/openpayu">
    <report>
     <reportId>4a3534fb-85b5-4f29-9da8-a6d73b34d528</reportId>
     <reportPlanId>635601897450895020</reportPlanId>
     <reportUrl>https://secure.payu.com/api/v2_1/reports/4a3534fb-85b5-4f29-9da8-a6d73b34d528</reportUrl>
     <status>READY</status>
    </report>
   </reportNotifyRequest>
Where:
  • <reportId> - report ID
  • <reportPlanId> - merchant assigned fixed report ID
  • <reportUrl> - url the report is availabe
  • <status> - report status

Statement retrieval

After the notification is received, call the reportUrl with HTTP GET. The message header should contain:

Authorization: Basic {string}

where the {string} is the base64 encoded string of posId:Second key (MD5) - mind the colon between POS ID and the MD5 key values!

For authorization you have to use the POS that was chosen in PayU Manager Panel when the statement was generated. If there is only one POS on given Shop it might be used as default POS for statement for this Shop. Authorization attempt with different POS will not work. HTTP 404 error means that you are trying to obtain statement generated for different POS (report is not found for used POS).