P24 Deposit (Przelewy24)

Przelewy24 is the premier online banking payment method in Poland.

The following method IDs are covered in this section:

IDNameCredit/Debit State
151P24DepositDepositedByProvider (13)

Payment method interaction type: Redirection to External Payment Provider (see Interaction Types).

After a redirect to Provider, users have to authorize a payment. PXP Financial will receive an instant notification of the authorization from provider, and then PXP Financial has to finalize the payment with another call to the provider. Payments remain in Pending state until confirmed, in rare cases - Offline payments at a post office - authorizations may be confirmed up to 14 days after the submission data. Unconfirmed payments will be move to the final state Expired. Funds unclaimed by PXP Financial/the merchant are returned after 30 days.

Redirect Integration

Currently not supported.

Backend2BackendIntegration

The Backend2Backend integration consists of an optional step of getPaymentInputDataList call to retrieve a list of supported banks to display as a dropdown list (or similar) on the merchants website. Some polish banks (below called payment methods) are not available all the time. Please see also the initiatePayment call to start the payment.

Optional Pre-Step: getPaymentInputDataList

Przelewy24 supports various methods (or banks) for making a payment. Available payment methods can be retrieved using getPaymentInputDataList before initiatePaymentRequest is executed so that the merchant can display the available payment methods (banks) to the user.

getPaymentInputDataListRequest:

<?xml version="1.0" encoding="utf-8"?>
<getPaymentInputDataListRequest xmlns="http://www.cqrpayments.com/PaymentProcessing" 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<merchantID>KalixaAcceptDemo</merchantID>
	<shopID>KalixaAcceptDemo</shopID>
<user>
		<id>NotRelevant</id>
	</user>
	<paymentMethodID>151</paymentMethodID>
	<details>
		<data xsi:type="keyStringValuePair">
			<key>LanguageCode</key>
			<value>PL</value>
		</data>
	</details>
</getPaymentInputDataListRequest>

getPaymentInputDataListResponse (Successful):

<?xml version="1.0" encoding="utf-8"?>
<getPaymentInputDataListResponse xmlns="http://www.cqrpayments.com/PaymentProcessing"
                                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <paymentInputDataList>
    <paymentInputData>
      <data xsi:type="keyStringValuePair" >
        <key>PaymentMethodID</key>
        <value>1</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>PaymentMethodName</key>
        <value>PaymentMethod ONE</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>PaymentMethodStatus</key>
        <value>True</value>
      </data>             
    </paymentInputData>
  </paymentInputDataList>
  <paymentInputDataList>
    <paymentInputData>
      <data xsi:type="keyStringValuePair">
        <key>PaymentMethodID</key>
        <value>2</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>PaymentMethodName</key>
        <value>PaymentMethod TWO</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>PaymentMethodStatus</key>
        <value>False</value>
      </data>             
    </paymentInputData>
  </paymentInputDataList>
</getPaymentInputDataListResponse>

getPaymentInputDataListResponse (Unsuccessful):

<?xml version="1.0" encoding="utf-8"?>
<getPaymentInputDataListResponse xmlns="http://www.cqrpayments.com/PaymentProcessing"
                                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <paymentInputDataList>
    <paymentInputData>
      <data xsi:type="keyStringValuePair" >
        <key>ErrCode</key>
        <value>1</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>ErrDescription</key>
        <value>Access denied</value>
      </data>
    </paymentInputData>
  </paymentInputDataList> 
</getPaymentInputDataListResponse>

Payment - initiatePayment request

The following table contains the fields to be sent in the initiatePaymentRequest.specificPaymentData xml section:

key (value type, account type, required)value
SuccessPageUrl
(string)
The URL to redirect user in case of successful payment (Required in case MerchantNotificationUrl not provided)
ErrorPageUrl (string)The URL to redirect user in case of unsuccessful
payment (Required in case parameter MerchantNotificationUrl is not provided)
PendingPageUrl (string)The URL to redirect user in case of pending payment (Required in case of browser redirect and MerchantNotificationUrl not provided)
CancelPageUrl (string)The URL to redirect user in case of cancellation (Required in case of browser redirect and MerchantNotificationUrl not provided)
MerchantNotificationUrl (string)URL to the listener that will handle a notification from provider (If provided it overrides parameters Success PageUrl and ErrorPageUrl)
EmailAddress (string, required)Email Address used for payment
PaymentDescription (string, required (see note on the right)The payment description (up to 255 characters). Alternatively the description is taken from shop.URL (depending on configuration).
PaymentMethod (string, required)Method used for payment

There are no SpecificPaymentAccountData.

Example initiatePaymentRequest:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <merchantID>KalixaAcceptDemo</merchantID>
  <shopID>KalixaAcceptDemo</shopID>
  <merchantTransactionID>78ad5462-f890-4e28-9103-b37aa988a81f</merchantTransactionID>
  <paymentMethodID>151</paymentMethodID>
  <amount currencyCode="PLN">100</amount>
  <userID>4a77e72d-e0b9-45cb-ad61-23ee6988ee54</userID>
  <userIP>127.0.0.1</userIP>
  <userSessionID>60a5482f-0ef3-4e6b-8994-6db5bd5c8dd5</userSessionID>
  <creationTypeID>1</creationTypeID>
  <specificPaymentData>
    <data xsi:type="keyStringValuePair">
      <key>SuccessPageUrl</key>
      <value>http://successpage.url</value>
    </data>
    <data xsi:type="keyStringValuePair">
      <key>ErrorPageUrl</key>
      <value>http://errorpage.url</value>
    </data>
    <data xsi:type="keyStringValuePair">
      <key>EmailAddress</key>
      <value>[email protected]</value>
    </data>
  </specificPaymentData>
</initiatePaymentRequest>

Example initiatePaymentRequest with user data and description/method:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<merchantID>KalixaAcceptDemo</merchantID>
	<shopID>KalixaAcceptDemo</shopID>
	<merchantTransactionID>78ad5462-f890-4e28-9103-b37aa988a81f</merchantTransactionID>
	<paymentMethodID>151</paymentMethodID>
	<amount currencyCode="PLN">100</amount>
	<userID>4a77e72d-e0b9-45cb-ad61-23ee6988ee54</userID>
	<userData>
		<firstname>UserFirstname</firstname>
		<lastname>UserLastname</lastname>
		<currencyCode>PLN</currencyCode>
		<languageCode>PL</languageCode>
		<address>
			<street>StreetAddress</street>
			<postalCode>1234</postalCode>
			<city>Krakow</city>
			<state>Poland</state>
			<countryCode2>PL</countryCode2>
		</address>
	</userData>
	<userIP>127.0.0.1</userIP>
	<userSessionID>60a5482f-0ef3-4e6b-8994-6db5bd5c8dd5</userSessionID>
	<creationTypeID>1</creationTypeID>
	<specificPaymentData>
		<data xsi:type="keyStringValuePair">
			<key>SuccessPageUrl</key>
			<value>http://successpage.url</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>ErrorPageUrl</key>
			<value>http://errorpage.url</value>
		</data>
	<data xsi:type="keyStringValuePair">
			<key>EmailAddress</key>
			<value>[email protected]</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>PaymentDescription</key>
			<value>Przelewy24 redirect deposit</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>PaymentMethod</key>
			<value>255</value>
		</data>
	</specificPaymentData>
</initiatePaymentRequest>

Example initiatePaymentResponse:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentResponse xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<payment xsi:type="paymentWithPaymentAccount" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<merchantID>YourMerchantID</merchantID>
		<shopID>YourShopID</shopID>
		<paymentMethod>
			<key>151</key>
			<value>P24Deposit</value>
		</paymentMethod>
		<merchantTransactionID>78ad5462-f890-4e28-9103-b37aa988a81f </merchantTransactionID>
		<paymentID>ebba5193-09da-4708-9020-5beb626eadcc</paymentID>
		<userID>4a77e72d-e0b9-45cb-ad61-23ee6988ee54</userID>
		<paymentProvider>
			<key>108</key>
			<value>Przelewy24</value>
		</paymentProvider>
		<amount currencyCode="PLN">100</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>a1d10ac7-57f5-4c6d-a75d-e30d5949fda1</id>
			<definition>
				<key>287</key>
				<value>RedirectDataCreated</value>
			</definition>
			<createdOn>2012-05-04T12:18:32.5929903Z</createdOn>
<description>http://dev.backend.cqrpayments.com/WebMockProviders/Przelewy24Deposit.aspx
p24_session_id='872'
p24_id_sprzedawcy='15161'
p24_kwota='100.00'
p24_crc='e6584f068a5575acf3c823fdb5d438b0'
p24_email='[email protected]'
p24_return_url_ok='http://successpage.url'
p24_return_url_error='http://errorpage.url'
                  </description>
                  <paymentStateDetails>
                  <detail xsi:type="keyStringValuePair">
                     <key>RedirectionUrl</key>             <value>http://dev.backend.cqrpayments.com/WebMockProviders/Przelewy24Deposit.aspx</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_session_id</key>
                     <value>872</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_id_sprzedawcy</key>
                     <value>15161</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_kwota</key>
                     <value>100.00</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_crc</key>
                     <value>e6584f068a5575acf3c823fdb5d438b0</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_email</key>
                     <value>[email protected]</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_return_url_ok</key>
                     <value>http://successpage.url</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDatap24_return_url_error</key>
                     <value>http://errorpage.url</value>
                  </detail>
                  <detail xsi:type="keyStringValuePair">
                     <key>PostDataKeys</key>                    <value>p24_session_id,p24_id_sprzedawcy,p24_kwota,p24_opis,p24_crc,p24_email,p24_return_url_ok,p24_return_url_error</value>
                  </detail>
               </paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">23.84</baseAmount>
		<paymentDetails>		
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>872</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>0</paymentAccountID>
		</paymentAccount>
	</payment>
</initiatePaymentResponse>

Possible payment states in initiatePayment response:

Payment StatesDescription
RedirectDataCreated (287)OK state; Redirect user to the URL
DuplicatePaymentValidationFailed (369)Error state; Duplication of payment

Once the user has been redirected to the provider web site and has executed the payment, then the user is redirected back to the merchant. The merchant should then call handleProviderNotificationToMerchant API method with the query string and post data received from the provider (see handleProviderNotificationToMerchant).

If the merchant does not invoke handleProviderNotificationToMerchant API method, then the provider notifies PXP Financial about the status of the transaction, and PXP Financial notifies the merchant using the standard merchant notification mechanism (see below).

Possible payment states in handleProviderNotificationToMerchantResponse or handlePaymentStateChangedNotificationRequest:

Payment StatesDescription
DepositedByProvider (13)Success state; Payment have been successfully finalized and executed.
PendingOnProvider (120)Pending state; Payment is pending on provider; Final status may be pushed later via asyncronous notification
RefusedByProvider (100)Refused state. Payment was not accepted by provider.
Expired (14)Payment is Expired after being in PendingOnProvider for a predefined amount of time

If a payment execution fails, the state details of RefusedByProvider payment state change notification will contain ProviderErrorResponseCode and ProviderErrorResponseMessage as defined by Przelewy24 provider.

Deposit Cancellation

The merchant can cancel a payment by calling the executePaymentAction method with actionID = 1. The payment will be cancelled if it exists in the system and if it is in state DepositedByProvider, otherwise an error message will be returned. See executePaymentAction for more information.

Notifications

Example handlePaymentStateChangedNotificationRequest:

<?xml version="1.0" encoding="utf-8"?>
<handlePaymentStateChangedNotificationRequest xmlns:q1="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>KalixaAcceptDEMO</merchantID>
		<shopID>KalixaAcceptDEMO_NEW</shopID>
		<paymentMethod>
			<key>151</key>
			<value>P24Deposit</value>
		</paymentMethod>
		<merchantTransactionID>05012015_8</merchantTransactionID>
		<paymentID>fb56ebd4-83e8-4812-9d5f-6fe396673d86</paymentID>
		<userID>Kalxia_PLN</userID>
		<paymentProvider>
			<key>108</key>
			<value>Przelewy24</value>
		</paymentProvider>
		<amount currencyCode="PLN">100.0000</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>195.72.132.1</userIP>
		<state>
			<id>f1eb207e-4dee-496a-957d-aae83c681808</id>
			<definition>
				<key>29</key>
				<value>DepositedByProvider</value>
			</definition>
			<createdOn>2015-01-05T15:12:40.253</createdOn>
			<paymentStateDetails xsi:nil="true" />
		</state>
		<isExecuted>true</isExecuted>
		<baseAmount currencyCode="EUR">23.1700</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>724628</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>PaymentMethod</key>
				<value>105</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>0</paymentAccountID>
		</paymentAccount>
	</payment>
</handlePaymentStateChangedNotificationRequest>