Allegro WebAPI

Programming interface of the Allegro platform

doGetPaymentMethods

Last change: 01.09.2011 r.
Availability:
This method allows for loading all available (for a logged-in user) payment methods. Use it mostly with doSendPostBuyForm.

  1. session-id | string | required
    User's session identifier received using the doLogin(Enc) method.
  2. item-ids | long[] | non-required
    An array of offer identifiers for which a list of payment methods is to be returned (minimum: 1, maximum: 25).



Sample structure of method call

$dogetpaymentmethods_request = array(
   'session-id' => '22eb99326c6be29aa16d07d622bcfbcbee94ad54846f2f4e03_1',
   'item-ids' => (3023953853, 3023953875)
);

  1. payment-methods | PaymentMethodsStruct[]
    Array of structures containing information on available payment methods.
    1. payment-method-id | string
      Payment method identifier.
    2. payment-method-name | string
      Full name of a payment method.
    3. payment-method-image | string
      Link to an image representing the given payment method.
    4. payment-method-usage | int
      Information on type of a payment method the given payment can be used with (mask: 1 - PayU, 2 -standard transfer, 4 - COD).



Sample structure of method call

$dogetpaymentmethods_response = array(
   'payment-methods' => array(
      array(
         'payment-method-id' => 'm',
         'payment-method-name' => 'mBank',
         'payment-method-image' => 'https://www.platnosci.pl/static/images/paytype/on-m.gif',
         'payment-method-usage' => 1),
      array(...),
      array(
         'payment-method-id' => 'wp',
         'payment-method-name' => 'Polbank',
         'payment-method-image' => 'https://www.platnosci.pl/static/images/paytype/on-wp.gif',
         'payment-method-usage' => 1),
      array(...),

      array(
         'payment-method-id' => 'wire_transfer',
         'payment-method-name' => 'Standard transfer (outside PayU system)',
         'payment-method-image' => '',
         'payment-method-usage' => 2),
      array(...))

);

  • ERR_INCORRECT_ITEM_ID
    Incorrect auction identifier or the indicated auction has been moved to the archive.
  • ERR_ITEM_FROM_OTHER_COUNTRY
    Item is listed in other country than country which user is logged in.
  • ERR_ITEMS_ARRAY_EMPTY_OR_OVERFLOWED
    No auction identifier or too many auction identifiers.
  • 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).

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.