Accept a Przelewy24 payment
Learn how to accept Przelewy24 (P24), the most popular payment method in Poland.
Vorsicht
The content of this section refers to a Legacy product. You should use the Accept a payment guide for the most recent integration path instead. While Stripe still supports this product, this support might end if the product is deprecated.
Przelewy24 is a single use payment method where customers are required to authenticate their payment. Customers pay with Przelewy24 by redirecting from your website, authorizing the payment, then returning to your website where you get immediate notification on whether the payment succeeded or failed.
Set up StripeServer-side
First, you need a Stripe account. Register now.
Use our official libraries for access to the Stripe API from your application:
Create a PaymentIntentServer-side
A PaymentIntent represents your intent to collect payment from a customer and tracks the lifecycle of the payment process.
Create a PaymentIntent
on your server and specify the amount
to collect, and eur
or pln
as the currency. If you have an existing Payment Intents integration, add p24
to the list of payment method types.
Instead of passing the entire PaymentIntent object to your app, return its client secret. The PaymentIntent’s client secret is a unique key that lets you confirm the payment and update payment details on the client, without allowing manipulation of sensitive information, like the payment amount.
Statement descriptors with Przelewy24
You can set a custom statement descriptor before confirming the PaymentIntent. For Przelewy24, the statement descriptor is limited to 14 characters. It is visible on your customer’s bank records within the payment’s description, with the format /OPT/X/////P24-XXX-XXX-XXX {statement_
, where /OPT/X/////P24-XXX-XXX-XXX
is a unique reference for the payment generated by Przelewy24.
Collect payment method detailsClient-side
Collect payment information on the client with Stripe Elements. Elements is a set of prebuilt UI components for collecting payment details.
A Stripe Element contains an iframe that securely sends the payment information to Stripe over an HTTPS connection. The checkout page address must also start with https:// rather than http:// for your integration to work.
You can test your integration without using HTTPS. Enable it when you’re ready to accept live payments.
Set up Stripe Elements
Submit the payment to StripeClient-side
Rather than sending the entire PaymentIntent object to the client, use its client secret. This is different from your API keys that authenticate Stripe API requests. The client secret should be handled carefully because it can complete the charge. Do not log it, embed it in URLs, or expose it to anyone but the customer.
When your customer submits a payment, Stripe redirects them to the return_
and includes the following URL query parameters. The return page can use them to get the status of the PaymentIntent so it can display the payment status to the customer.
When you specify the return_
, you can also append your own query parameters for use on the return page.
Parameter | Description |
---|---|
payment_ | The unique identifier for the PaymentIntent . |
payment_ | The client secret of the PaymentIntent object. For subscription integrations, this client_secret is also exposed on the Invoice object via confirmation_ |
When the customer is redirected back to your site, you can use the payment_
to query for the PaymentIntent and display the transaction status to your customer.
You can find details about the bank account the customer used to complete the payment on the resulting Charge under the payment_method_details property.
{ "charges": { "data": [ { "payment_method_details": { "p24": { "bank": "inteligo", "reference": "P24 123-456-789", "verified_name": "JENNY ROSEN" }, "type": "p24" }, "id": "src_16xhynE8WzK49JbAs9M21jaR", "object": "source", "amount": 1099,
Test your integration
Select any bank in the P24 bank list with your test API keys. After confirming the payment, you’re redirected to a test page with options to succeed or fail the payment. You can test the successful payment case by authenticating the payment on the redirect page. The PaymentIntent will transition from requires_
to succeeded
.
To test the case where the user fails to authenticate, select any bank with your test API keys. On the redirect page, click Fail test payment. Your PaymentIntent will transition from requires_
to requires_
.
Przelewy24 requirements 
Przelewy24 requires customers to agree to their Terms of Service in order to successfully authorize the transaction. This means that the customer will first be redirected to a Przelewy24 page where they can accept these terms. In order to skip the intermediate page, you are required to present the Przelewy24 terms on your website, and collect consent on their behalf. When you have done that, you will be able to set the p24[tos_
payment method option.
Requirement | Details |
---|---|
Present a hyperlinked Przelewy24 Terms of Service standard wording with hyperlinks. | The following text should be clearly visible to the customer, with hyperlinks included:
|
Bank values 
Bank name | Value |
---|---|
Alior Bank | alior_bank |
Bank Millenium | bank_millennium |
Bank Nowy BFG S.A. | bank_nowy_bfg_sa |
Bank PEKAO S.A | bank_pekao_sa |
Banki SpBdzielcze | banki_spbdzielcze |
Blik via redirect | blik |
BNP Paribas | bnp_paribas |
BOZ | boz |
CitiHandlowy | citi_handlowy |
Credit Agricole | credit_agricole |
e-Transfer Poctowy24 | etransfer_pocztowy24 |
Getin Bank | getin_bank |
IdeaBank | ideabank |
ING | ing |
inteligo | inteligo |
mBank-mtransfer | mbank_mtransfer |
Nest Przelew | nest_przelew |
Noble Pay | noble_pay |
Płać z iPKO (PKO BP) | pbac_z_ipko |
Plus Bank | plus_bank |
Santander-przelew24 | santander_przelew24 |
Toyota Bank | toyota_bank |
Volkswagen Bank | volkswagen_bank |
VeloBank | velobank |