Allegro WebAPI

Programming interface of the Allegro platform

doGetMyIncomingPayments

Group: PayU
Last change: 16.05.2016 r.
Availability:

This method allows you to retrieve a list of completed payments made by buyers via PayU for transactions concluded within 90 days. In case the time range is not set, a list of payments made within a week (25 items) is retrieved and sorted in a descending order by their completion time.

Available filters::

  • buyerId - user making the payment
  • itemId - offer related to the payment
  • transRecvDateFrom/transRecvDateTo - time range to filter the payments
Different filters can be combined. If an incorrect user’s identifier is transferred, an empty structure is returned.

The strictedSearch field allows you to filter data by date. If you provide 0 or the field is not transferred at all (optional parameter with a default 0 value), the filter will work as follows:

If a particular value is provided in transRecvDateFrom, but 0 is provided in transRecvDateTo:

  • transRecvDateFrom will be set to the provided date starting at 0:00, e.g. if you enter timestamp=1462486320 (05.05.2016 22:12:00), the system will change it to 1462406400 (05.05.2016 00:00:00)
  • transRecvDateTo will be calculated in the following manner and the lower value will be applied:
    • date provided in transRecvDateFrom + 7 days (1463011200 - 12.05.2016 00:00:00)
    • the day following the date provided in transRecvDateFrom (1462492800 - 06.05.2016 00:00:00); in this example the transRecvDateTo value will be set to 1462492800.

In an opposite case, if 0 is provided in transRecvDateFrom, but a particular value is provided in transRecvDateTo:

  • transRecvDateTo will be set to the provided date + 1 starting at 0:00, e.g. if you enter timestamp=1462536000 (06.05.2016 12:00:00), the system will change it to 1462579200 (07.05.2016 00:00:00)
  • transRecvDateFrom will be calculated in the following manner and the higher value will be applied:
    • zero (0)
    • transRecvDateTo - 7 days (1461974400 - 30.04.2016 00:00:00), which means that in this case transRecvDateFrom will be set to 1461974400

Provide particular values in start date, e.g. 1462486320 (05.05.2016 22:12:00) and in end date, e.g. 1462536000 (06.05.2016 22:12:00) to receive a list of payments processed in that period:

  • transRecvDateFrom will be set to 1462406400 (05.05.2016 00:00:00)
  • transRecvDateTo will be set to 1462579200 (07.05.2016 00:00:00)

If the strictedSearch field transfers 1, the filter will work as follows:

  • When a particular value is provided as the start date (transRecvDateFrom) and 0 as the end date (transRecvDateTo), a list of payments made between start date and 7 following days will be returned.
  • In an opposite case, (when 0 is provided as the start day, but the end date has a particular value) a list of payments made between end date and 7 preceding days will be returned. Provide particular values for both start and end date to receive a list of payments processed in a given period.


  1. session-handle | string | required
    User's session identifier received using the doLogin(Enc) method.
  2. buyer-id | int | non-required
    Identifier of a buyer whose payments are to be loaded..
  3. item-id | long | non-required
    Identifier of an offer related to the payment (also when an offer is a part of a combined payment).
  4. trans-recv-date-from | long | non-required
    Start date of time range (in the Unix time format) to load a list of payments.
  5. trans-recv-date-to | long | non-required
    End date of time range (in the Unix time format) to load a list of payments.
  6. trans-page-limit | int | non-required
    Size of data portion (range 1-25; default value: 25).
  7. trans-offset | int | non-required
    Controlling (through the incrementation of provided value) the process of loading new data portions (portion numbers are indexed from 0).
  8. stricted-search | int | non-required
    Precise (up to seconds) search operation based on data provided in transRecvDateFrom and transRecvDateTo (0 - no, 1 - yes).



Sample structure of method call

$dogetmyincomingpayments_request = array(
   'session-handle' => '22eb99326c6be29aa16d07d622bcfbcbee94ad54846f2f4e03_1',
   'buyer-id' => 0,
   'item-id' => 0,
   'trans-recv-date-from' => 1269129600,
   'trans-recv-date-to' => 0,
   'trans-page-limit' => 0,
   'trans-offset' => 0
   'stricted-search' => 0
);

  1. pay-trans-income | UserIncomingPaymentStruct[]
    Array of structures containing information on payments of users.
    1. pay-trans-id | long
      Transaction identifier.
    2. pay-trans-it-id | long
      Offer identifier (or 0 for combined payments for which information on particular offers are in the pay-trans-details structure).
    3. pay-trans-buyer-id | int
      Buyer's identifier.
    4. pay-trans-type | string
      Payment method (mBank, Multibank, BZ WBK, Pekao SA, BPH, Inteligo, Nordea, iPKO BP, ING, Raiffeisen Bank, Millennium, Kredyt Bank, Polbank, Citi Handlowy, Deutsche Bank, Getin Bank, Invest-Bank, Meritum Bank, Eurobank, Alior Bank, BGŻ, Payment card, Bank transfer, Standard transfer (outside PayU system), COD).
    5. pay-trans-status | string
      PayU transaction status (list of all possible payment statuses can be found here).
    6. pay-trans-amount | float
      Amount of payment from a user.
    7. pay-trans-create-date | long
      Date of creating PayU transaction (in the Unix time format).
    8. pay-trans-recv-date | long
      Date of completing PayU transaction (in the Unix time format).
    9. pay-trans-price | float
      Value of items bought within the offer (or offers for combined payments) and paid via the given PayU transaction (or 0 in case of an additional payment).
    10. pay-trans-count | int
      Number of items bought within the offer and paid via the given PayU transaction (or 0 in case of a combined payment or an additional payment).
    11. pay-trans-postage-amount | float
      Total cost of delivery method selected by a user, paid via PayU (or 0 in case of an additional payment).
    12. pay-trans-details | PaymentDetailsStruct[]
      Array of structures containing information on offers forming the combined payment.
      1. pay-trans-details-it-id | long
        Offer identifier.
      2. pay-trans-details-price | float
        Value of item bought within the offer and paid via the given PayU transaction.
      3. pay-trans-details-count | int
        Number of items bought within the offer and paid via the given PayU transaction.
    13. pay-trans-incomplete | int
      Information on payment completion (1 - incomplete payment, 0 - complete payment).



Sample structure of server reply

$dogetmyincomingpayments_response = array(
   'pay-trans-income' => array(
      array(
         'pay-trans-id' => 3381748,
         'pay-trans-it-id' => 0,
         'pay-trans-buyer-id' => 2580451,
         'pay-trans-type' => 'Payment card',
         'pay-trans-status' => 'Completed',
         'pay-trans-amount' => 6.00,
         'pay-trans-create-date' => 1269616926,
         'pay-trans-recv-date' => 1269618127,
         'pay-trans-price' => 6.00,
         'pay-trans-count' => 0,
         'pay-trans-postage-amount' => 0.00,
         'pay-trans-details => array(
            array(
               'pay-trans-details-it-id' => 972090662,
               'pay-trans-details-price' => 1.00,
               'pay-trans-details-count' => 1),
            array(
               'pay-trans-details-it-id' => 916649765,
               'pay-trans-details-price' => 5.00,
               'pay-trans-details-count' => 1),
         'pay-trans-incomplete' => 0),
      array(
         'pay-trans-id' => 2970725,
         'pay-trans-it-id' => 946792459,
         'pay-trans-buyer-id' => 1510558,
         'pay-trans-type' => 'iPKO BP',
         'pay-trans-status' => 'Completed',
         'pay-trans-amount' => 64.50,
         'pay-trans-create-date' => 1269266038,
         'pay-trans-recv-date' => 1269266231,
         'pay-trans-price' => 50.00,
         'pay-trans-count' => 1,
         'pay-trans-postage-amount' => 14.50,
         'pay-trans-details' => array(),
         'pay-trans-incomplete' => 0))
);


  • ERR_INPUT_DATE_RANGE
    Incorrect range of dates (the range between start and end date exceeds 90 days, end date equals or precedes start date or provided values are lower than 0).
  • ERR_INCORRECT_BUYER_ID
    Invalid (< 0) buyer's identifier.
  • ERR_INCORRECT_ITEM_ID
    Invalid (< 0) offer identifier or no offer with such identifier.
  • ERR_INCORRECT_PAGE_NUMBER
    Invalid (< 0) data portion number.
  • ERR_INCORRECT_PAGE_SIZE
    Invalid (< 0) data portion size.
  • ERR_NEW_PAYMENT_INTERNAL_ERROR
    Internal system error due to loading PayU transactions
  • ERR_NO_SESSION / ERR_SESSION_EXPIRED
    Invalid session identifier or the session has expired.
  • ERR_WEBAPI_KEY_INACTIVE
    The session-generating WebAPI key has been deactivated (the owner did not accept the User Agreement).
  • ERR_YOU_NOT_SOLD_THIS_ITEM
    The logged-in user was not a seller in this offer.

Allegro is not to be held liable for consequences of using examples of the published code. It does not guarantee its correct operation either. The code you see serves as an example only and may contain errors.