Przelewy24
Learn how to accept Przelewy24 payments.
Przelewy24 is a real-time bank transfer payment method. Customers based in Poland can use it to transfer funds directly to merchants from their bank accounts.
The customer selects their bank from a list of banks displayed. The customer confirms payment and bank transfer instructions to activate a bank transfer, and they can also print out the bank transfer details. The customer re-directs to their banks' login page and logs in. They check that the bank transfer information matches that shown on the Przelewy24 payment page and submits their payment.
| Payment type | Online banking |
| Market | Poland |
| Customer currencies | PLN |
| Processing currencies | PLN |
| Refunds | Yes |
If you want to use Przelewy24 logos in your marketing materials or on the checkout page, please use the source of the official guidelines: P24 logos.
General flow
POST Request -> to /payment_preauthorize < - Response (direct, synchronous) with status=0&errormessage=pending and redirect_url Customer is redirected to redirect_url to complete payment < - HTML response with status=0 (or decline) to return_url < - Callback (asynchronous) with errorcode=0 to notification_url
Step 1. Make a transaction request
From your server, make a POST /payment_preauthorize request.
POST https://sandbox.payabl.com/pay/backoffice/payment_preauthorizeInclude in request:
| Parameter | Format | Description |
|---|---|---|
merchantid | 40 characters | Merchant identification number assigned during account creation |
orderid | max. 40 characters | The field orderid is optional and exclusively for the merchants' convenience |
amount | digits only, either no decimals or two decimal places (e.g. 8 or 8.50) | Transaction’s total amount that will be deducted from the customer |
currency | 3 characters. ISO 4217 | The currency field contains the alpha-3 currency code for the transaction. Links to ISO. Supported currencies: PLN |
payment_method | 5 | payabl. Payment methods IDs |
custom2 | p24 | |
signature | 40 characters | Signature Calculation |
email | max. 50 characters | Customer email. An RFC 822 compliant email address |
firstname | max. 50 characters | First name of the customer |
lastname | max. 50 characters | Last name of the customer |
url_success | max. 255 characters starting with http or https | Successful transaction redirection URL |
url_failed | max. 255 characters starting with http or https | Failed transaction redirection URL |
url_return | max. 255 characters starting with http or https | URL for customer redirection |
You can see a full list of parameters in Pre-Authorization.
Request example:
merchantid=gateway_test&orderid=Payabl-Test&amount=109.82¤cy=PLN&country=POL&[email protected]&firstname=John&
lastname=Doe&payment_method=5&custom2=p24&street=ul. Spacerowa&house=42&city=Warszawa&customerip=2.22.75.244&
url_return=https://yourshop.example/thank_you¬ification_url=https://yourshop.example/notification&url_success=
https://yourshop.example/payment_successful&url_failed=https://yourshop.example/payment_failed&signature=5e44a6db4c7ead910a390ed81ff616758340a710
Public Sandbox informationDo not use your personal email address, Order ID with sensitive information, real customer details and credit card data in the public Sandbox. For email field you may use [email protected].
Redirection to
url_returndoes not confirm that the transaction is successful. Always check the transaction vianotification_urlor use the diagnose interface to get the final status of the transaction.
Step 2. Handle the redirect
To complete the payment, you need to redirect the customer to the correct URL in the response.
Response example:
transactionid=104582047&transid=104582047&status=0&errormessage=pending&errmsg=pending&amount=19.99&price=19.99¤cy=EUR&
orderid=Payabl-Test&payment_method=5&fail_reason=&redirect_secret=GFUFPbxIoHK7O8Dad1kO8Qzu9AkWAPe&ppro_id=877698472&payment_guarantee=&
redirect_url=https%3A%2F%2Fr3.girogate.de%2Fti%2Fsimideal%3Ftx%3D877698470%26rs%3DQjAoDRjCYKJ5kdcubbO0j59KnZwZ47Em%26cs%3Deac6b9d3a19918d3fcc28ee9397a6bd939a7eddc6940699de89e50731f0a52eb&user_id=506801
Response fields reference:
| Parameter | Description |
|---|---|
transactionid | payabl. internal transaction id. Please use this transaction id when referring to the transaction in communications with the payabl. team |
transid | The same as transactionid |
status | Transaction error code |
errormessage | Brief explanation of transaction decline reason (empty on success) |
errmsg | The same as errormessage |
amount | Transaction amount |
price | The same as amount |
currency | Transaction currency |
orderid | Optional transaction identifier given by the merchant |
redirect_url | URL for customer redirection to finalize the payment (URL encoded) |
user_id | Payment system user identifier |
ppro_id | Payment system's transaction id |
fail_reason | Payment system's explanation of fail reason |
redirect_secret | Signature for redirection to the payment system's iframe (no actions needed) |
payment_guarantee | Payment system technical field |
Step 3. Receive the final status
Once the customer completes the payment, we will send a notification with the transaction's final status to the notification_url specified by you.
Payment methods that are accessible under ID 5 have a callback structure different from other payment methods. Please note that payabl. transaction ID is not passed in them, so you will need to identify the transaction in question by the Order ID (which is passed in the TXID field).
Also, the notification signature for these payment methods is calculated differently from other payment methods. Please see the calculation steps below:
Sort all notification parameters values by parameter name in alphabetical order. Append your secret to the end of the concatenated string. Calculate a SHA-1 hex value of the string.
Notification example:
"HASH=e7be47411bfe8e317894f80b27df9d3d00c1d639&TAG=p24&REQUESTSTATUS=SUCCEEDED&TXID=Payabl-Test&ERRMSG=&STATUS=SUCCEEDED&PAYMENTGUARANTEE=NONE"
Notification fields reference:
| Parameter | Description |
|---|---|
TAG | Payment method identifier |
PAYMENTGUARANTEE | Payment system technical field |
REQUESTSTATUS | Request status (technical field) |
STATUS | Transaction status (SUCCEEDED for success) |
ERRMSG | Brief explanation of transaction decline reason (empty on success) |
TXID | payabl. order ID - optional transaction identifier given by the merchant |
HASH | Signature to verify the authenticity of the notification. You can find more information here |
After the customer has finished or canceled the payment, they will be redirected back to url_return, provided by you in the initial request to payment_preauthorize. After that, you will receive a notification, posted to notification_url, with the final transaction status, which you are supposed to use to update your system.
Notification URL can be configured by our tech support team in your account on our side,
or you can send it as a parameternotification_urlin the initial request topayment_preauthorize.
Refunds
Przelewy24 supports refunds and can be initiated only on a successful captured transaction.
The request will send a credit note to the authorization system after the customer has already been charged. The refund amount will be credited to the customer and the merchant’s account will be charged.
The refund can be done in two ways:
- Through API integration
- Through payabl. dashboard
If you have API integration, you can check more in our documentation Refund.
Our Technical Support team is there to help you:
Email: [email protected]
Available Monday – Friday between 09:00 and 17:00 CET/CEST
Updated 6 days ago
