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 |
Settlement currencies | EUR |
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.
Step 1. Make a transaction request
After placing the order, the customer clicks the “pay” button. Your system sends a pre-auth request to the payabl. system and the customer will be redirected to the P24 transaction panel.
From your server, make a POST /payment_preauthorize request.
POST https://sandbox.payabl.com/pay/backoffice/payment_preauthorize
Include in request:
merchantid
: The merchant identification number.orderid
: The field orderid is optional and exclusively for the merchant's convenience.amount
: The amount field contains the transaction’s total amount. This is the amount that will be transmitted to the authorizing system.currency
: The currency field contains the alphanumeric currency code for the transaction, according to ISO 4217, e.g. PLN.payment_method
: The payment method id - 120signature
: The signature field contains a 40-figure hexadecimal value. This signature value is a checksum designed to protect the merchant account from unauthorized access.language
: This parameter determines the language in which P24 pages will be shown.country
: Customer's country in ISO Alpha-3 format. Supported countries: POL.email
: The customer's email address.url_return
: After the successful transaction, the customer will be redirected tourl_success
and after the failed transaction, the customer will be redirected tourl_failed
.notification_url
: The payment gateway will send the merchant notification to that URL. Merchant has to provide that URL during the initial request.
You can see a full list of parameters in Pre-Authorization.
Redirection to url_return does not confirm that the transaction is successful. Always check the transaction via notification_url or use diagnose interface to get the final status of the transaction.
Request example
/payment_preauthorize&merchantid=8b22a30sdjkldsjfkldjsfk9e79e72ac2b875b14&orderid=fdfdfg7e3f35f0&amount=1000.00¤cy=PLN&payment_method=120¬ification_url=https%3A%2F%2Fgateway.merchant_url.com%2Fpostback%2FCO-69ab-f0cc-a997-5a95-5d5c-c4ca%2F6eebd443fb407e3f35f0&url_return=https%3A%2F%2Fgateway.gateway.com%2Fbackdirect%2Fsuccess%2FCO-69ab-f0cc-a997-5a95-5d5c-c4ca%2F6eebd443fb407e3f35f0&language=en&firstname=muster&lastname=mann&country=LTU&email=some_email%40mail.ru&customerid=16064844&custom1=17425882&signature=641fae10
5559d7cca133d7ace0bcf5ebb9c5cdcf
Step 2. Handle the redirect
To complete the payment, you need to redirect the customer to the correct URL in the response.
Response
transactionid=213528258&transid=213528258&status=2000&errormessage=pending&errmsg=pending&amount=1.23&price=1.23¤cy=EUR&orderid=PowerPay21-Test&payment_method=116&redirect_url=http%3A%2F%2Fdevpc21n-04.inatec.local%3A19700%2Fpowercash21-3-2%2Fcfbe334335d00179a6212b050a0079ba8b4b7025%2Fpayment%2Fredirect_to_bank&user_id=18155
Once the customer completes the transaction on the P24 site, an asynchronous notification is sent to the notification_url to the merchant confirming the final state of the transaction.
Unlike other Online Bank Transfer methods, P24 has limited account information in the notification.
Below is the list of fields that will be posted to the notification_url
:
account_holder
: Name of the customer (same as what was sent in the request)account_number
: MD5sum of bank account numberbank_number
: Empty field, we do not get this from P24error_code
: 0 = successful, 2000 = pending, all other values are indicate failed state of transaction, e.g -5003 means failed.errormessage
: For failed or pending, will contain the error description.payment_method
: 120payment_state
: Status of the transaction:orderid
: Merchant reference for the transaction. E.g cashier IDsecurity
: A sha256 hash generated based on specific notification parameters and shared secret.timestamp
: Timestamp when the notification is generatedtransaction_id
: Powercash21 transaction IDtype
: The type of transaction. It can be only authorization (indicates the first step of the transaction) and capture (indicates the final step of the transaction).
Notification example
"bank_number=&account_number=MD5sasdasd&payment_state=credited&bank_name=Santander&errormessage=&type=capture&transactionid=116033311&account_holder=muster+mann×tamp=1605788760&payment_method=120&security=19667fb6d9d2f3c8457e29d949f72319a9986b88b0be47050d9fc49f746d279b&orderid=6eebd443fb407e3f35f0&errorcode=0" "https://www.notification_url"
Przelewy24 сontains an additional notification parameter which is payment_state
, which could contain the following values:
not_credited_yet
: Capture - Accepted.credited
: Capture - Successful.not_credited
: Capture - Failed.
Each state change would trigger a notification to the notification URL, notification URL is the URL that was provided when the merchant account was created.
url_return
andnotification_url
should be provided by you to payabl. technical team.
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.
Updated 4 months ago