openapi: 3.0.0
servers:
- url: https://sandbox.przelewy24.pl
description: Sandbox server (uses test data)
- url: https://secure.przelewy24.pl
description: Production server (uses live data)
info:
x-logo:
url: getfile/przelewy24-logo_mini.png
altText: LogoP24
contact:
name: Przelewy24 Support
url: https://www.przelewy24.pl/support
title: Przelewy24 REST API Documentation
description: >
# Payment system
Przelewy24 provides an authorisation and clearing system and provides payment services as a Domestic Payment Institution.
Through Przelewy24 API you can access all of the services offered by the system. Below documentation includes most common used functionalities. Contact the [Sales Department](https://www.przelewy24.pl/pomoc/formularz-kontaktowy) to find out more.
In order to be able to access Przelewy24 API, you first need to [create an account](https://panel.przelewy24.pl/rejestracja.php) in the P24 Administration Panel.
After registration, among others, the merchant may use the administration panel to keep track of the account balance, all payments made by their clients and refunds.
## Transaction process
After placing the order, customer clicks the **"pay"** button. Merchant system sends a register transaction request to the P24 system and receives a unique TOKEN. Afterwards customer will be redirected to the P24 transaction panel.
In case of payment cancellation, the customer is redirected to the **“urlReturn"** address.
Upon successful completion of the transaction, the customer is redirected to the "urlReturn" address. P24 sends the transaction notification to the "urlStatus" address. The transaction notification is sent **asynchronously**.
To verify the credibility of the received confirmation, the Merchant’s system sends a return request to P24 as a transaction verification.
## Transaction requirement
In order to carry out the transaction correctly, merchant’s website should offer transaction registering as well as handling transaction result.
The entire process is fully automatic and does not require any interference of the shop personnel in it.
After the payment process has been completed successfully, status of the order on the merchant website should automatically change to paid/accepted. At this point, merchant may proceed with order fulfilment.
# Definitions
**CVV** – card verification value/code.
**Cyclic Redundancy Check (CRC)** – unique key (String) obtained from Przelewy24 used to generate the checksum of the parameters sent.
**Dynamic Currency Conversion (DCC)** – process whereby the amount of card transaction is converted to the currency of the payment card’s country of issue at the point of sale.
**Merchant** – an institution or a private person using Przelewy24 services.
**Session ID** – unique ID used to identify single transaction in merchant system.
# Use cases
## How to display a full selection of payment methods in your shop?
In order to facilitate the process of payment, it is possible to move the customer's selection of payment method to the very stage of placing an order. If the customer additionally accepts the terms and conditions of Przelewy24 (in the request, you need to set regulationAccept = true), they would be redirected from the shop's website directly to the bank or to the form for card payments, after clicking "pay".
The following text must be placed on the store's website and displayed to the customer: “I declare that I have read the terms and conditions and information obligation of the Przelewy24 service.” The words "terms and conditions" and "information obligation" must be followed by a link to the pages containing these documents. The checkbox cannot be pre-selected.
In order to download the list of payment methods, you need to use the PaymentMethods method, described in the Additional Services.

The list may be presented on your website in any form.
## How to redirect a customer to specific method of payment?
In order to redirect the customer directly to selected method of payment, an identifier of a given method must be sent in the method field in transaction request. For instance, when redirecting to the mTransfer method, the request looks as follows:
```json
{
"merchantId": {{merchantId}},
"posId": {{posId}},
"sessionId": "{{sessionId}}",
"amount": {{amount}},
"currency": "{{currency}}",
"description": "{{description}}",
"email": "{{email}}",
"country": "PL",
"language": "pl",
"method": {{method}},
"urlReturn": "{{urlReturn}}",
"sign": "{{sign}}",
}
```
## How to limit the time allowed for finalise the payment by a customer?
Depending on specific character of a given system, it might be necessary to limit the time that customer has for completing their payment. This option is controlled by timeLimit parameter. Setting this parameter to 0 would switch off the timer. Entering values 1-99 sets the time limit in minutes.
## How to enable customer's return to the shop, so that they don't have to wait for synchronic payment confirmation?
In case of some payment methods, especially e-transfers, payment is confirmed within couple of minutes after making it. The client may either wait for result of the transaction in the transaction service and be redirected back to the shop upon receiving confirmation (that way the shop would already get the payment notification), or the client may be immediately redirected to the shop, without waiting for the result of the transaction. The choice between these two variants is made by means of the transaction request parameter waitForResult. The latter option is enabled when the parameter is set on false, the former, when the parameter is set on true.
## How to process a refund to a customer?
Processing refunds, like all services in Przelewy24, is fully automatic and done via webservices. Refunds are processed by means of transaction/refund method.
Multiple refund requests may be ordered, as long as the sum of refunds does not exceed the sum of the original transaction.
## Can a customer finalise a transaction process after the end of a session?
If a customer discontinues payment process (e.g. after accessing the bank’s website), Przelewy24 system offers an option of sending an automatic e-mail with a link that allows to finalise the initiated payment process. If the customer use this option, the outcome will be no different than the outcome of a transaction finalised on-line.
To have this functionality enabled, please contact Partner Support via contact form
# Graphic materials
P24 logo and banners are available at:
[https://www.przelewy24.pl/en/download?#materialy-graficzne](https://www.przelewy24.pl/en/download?#materialy-graficzne)
# Environments
## Production environment
Every request is differentiated by its own unique request URL. This way P24 knows which API-function you want to access. Combined with the base URL for either the production- or test-environment, you will get the complete API-URL.
Base URL production system:
https://secure.przelewy24.pl/api/v1
Production transactions will be visible in the panel
https://panel.przelewy24.pl/index.php
## Test environment
During implementation of the mechanisms in merchant’s system, it is recommended to use test environment. Test environment allows to reproduce system functionalities without making actual payments.
Test environment endpoint:
https://sandbox.przelewy24.pl/api/v1
Test transactions will be visible in the test panel
https://sandbox.przelewy24.pl/panel/index.php
**The testing environment cannot be used for production transactions.**
# IP server addresses
We recommend script protection against suspicious calls using address filtering for incoming connections. IP server ranges for the P24 servers:
5.252.202.255 , 5.252.202.254
20.215.81.124
193.178.213.0/24
91.220.177.0/24
20.215.183.48/28
134.112.88.8/29
# Environment requirements
Transport Layer Security - TLS 1.2 (minimum required)
https://wiki.mozilla.org/Security/Server_Side_TLS
https://en.wikipedia.org/wiki/Transport_Layer_Security
OpenSSL 1.0.1 (minimum required)
https://www.openssl.org/news/changelog.html#x31
cURL 7.34.0
https://curl.haxx.se/docs/manpage.html#--tlsv12
# Possible error codes
| ErrorCode | Description |
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| err00 | Invalid script call |
| err01 | No confirmation of reception of authorisation has been received from the shop |
| err02 | No authorisation has been received |
| err03 | This query has already been processed |
| err04 | Authorisation query incomplete or invalid |
| err05 | Reading of web-shop configuration failed |
| err06 | Record of authorisation query failed |
| err07 | A different person is making the payment |
| err08 | Status of connection with the shop not established. |
| err09 | Limit on the number of data corrections exceeded. |
| err10 | Invalid transaction amount! |
| err49 | Transaction risk assessment score too high. |
| err51 | Invalid website call |
| err52 | Invalid feedback session information! |
| err53 | Transaction error! |
| err54 | Incompatible transaction amounts! |
| err55 | Invalid response code! |
| err56 | Invalid card |
| err57 | IncompatibleTEST flag! |
| err58 | Invalid sequence number! |
| err59 | Invalid transaction currency! |
| err101 | Website call error A required parameter is missing from the transaction request or an inadmissible value has appeared. |
| err102 | Allowed time for transaction has expired |
| err103 | Invalid amount of transfer |
| err104 | Transaction is awaiting confirmation. |
| err105 | Transaction made after expiry of time allowed for transaction |
| err161 | Request for transaction interrupted by User The customer has interrupted the payment procedure by clicking "Go back" on the payment method selection site. |
| err162 | Request for transaction interrupted by User The customer has cancelled the payment procedure by clicking „Resign” on the payment instructions site. |
# Authentication
P24 supports the mechanism of Basic Authentication.
version: 1.0.0.
x-tagGroups:
- name: Transaction service
tags:
- Transaction service API
- Notification
- Calculating Sign
- name: Additional services
tags:
- Additional API functionality
- RefundNotification
- Additional services Additional Notifications
- Payment Methods Use Cases
- Additional services Mass Payments Transactions
- name: Card payment
tags:
- Card API
- Card Notification
- Pre-authorization
- name: BLIK
tags:
- BLIK Use Cases
- BLIK API
- BLIK Additional
- Alias Update Notification
- name: Reports
tags:
- Report API
- name: Card payment 2.0
tags:
- Introduction
- Google Pay
- Apple Pay
- Form initialization
- Form initialization v2
- Tokenization
- Card payment flow
- Recursion (doPayment)
- Card API v2
- Card notification
- Mobile payment (Android)
- Mobile payment (iOS)
- name: How to integrate installments?
tags:
- Buttons and banners
- Widget
- Simulator
paths:
/api/v1/transaction/register:
post:
tags:
- Transaction service API
summary: Transaction registration
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/TransactionRequestBody1"
description: Before sending the transaction request, transaction data must be saved
in the merchant’s local database. In particular, the session ID and
the transaction amount should be stored.
| GET | [https://secure.przelewy24.pl/api/v1/report/history/{token}](https://secure.przelewy24.pl/api/v1/report/history/{token}) |
|---|
| GET | [https://secure.przelewy24.pl/api/v1/report/batch/details](https://secure.przelewy24.pl/api/v1/report/batch/details) |
|---|
To activate the specific channels, their values should be summed up.
Example:
transfer and traditional transfer:
channel=6"
type: integer
enum:
- 1
- 2
- 4
- 8
- 16
- 32
- 64
- 128
- 256
- 4096
- 8192
- 16384
waitForResult:
type: boolean
description: Parameter determines wheter a user should wait for result of the transaction in the transaction service and be redirected back to the shop upon receiving confirmation or be redirected back to the shop immediately after payment. Read more
regulationAccept:
type: boolean
description: 'Acceptance of Przelewy24 regulations:
false – display consent on p24 website (default),
true – consent granted, do not display.
In case the „true” parameter is sent, the consent – worded as follows – must be displayed on the Partner’s website: „I hereby state that I have read the [regulations](https://www.przelewy24.pl/regulamin) and [information obligation](https://www.przelewy24.pl/obowiazekinformacyjny) of ”Przelewy24”.
Under words regulations and information obligation there must be hyperlinks redirecting to websites with these documents. The checkbox must not be ticked by default.'
default: false
shipping:
name: shipping
in: formData
description: Delivery cost
type: integer
transferLabel:
name: transferLabel
in: formData
description: "Description forwarded to transfer's description (not in every payment methods). A parameter can contain values only in a range [a-z A-Z 0-9 ęółśążźćńĘÓŁŚĄŻŹĆŃ . /\ :- ]"
type: string
maxLength: 20
mobileLib:
name: mobileLib
description: The parameter is necessary while using SDK libraries. The value passed in mobileLib parameter is always 1 and value passed in sdkVersion determines which version of library should be used.
type: integer
enum:
- 1
sdkVersion:
name: sdkVersion
in: formData
description: Version of mobile library. Determines if transaction is mobile.
type: string
maxLength: 10
sign:
name: sign
in: formData
type: string
maxLength: 100
description:
Checksum of parameters:
{"sessionId":"str","merchantId":int,"amount":int,"currency":"str","crc":"str"}
calculated with the use of sha384
IMPORTANT!:
in case json_encode function is used, the following attributes should be added
"JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES"
encoding:
name: encoding
in: formData
description: "Coding system for characters sent: ISO-8859-2, UTF-8, Windows-1250"
type: string
maxLength: 15
methodRefId:
name: methodRefId
in: formData
description: Special parameter for some payment flows e.g. BLIK and Card
one-click.
type: string
maxLength: 250
cardData:
type: object
allOf:
- $ref: "#/components/schemas/cardData"
cart:
description: cart
items:
$ref: "#/components/schemas/CartParameters"
additional:
type: object
description: Set of additional information about the transaction or the payer
allOf:
- $ref: "#/components/schemas/AdditionalProperties"
simpCountryCode:
type: string
maxLength: 2
description: Country code according to ISO 3166 to create an IBAN number. Currently, the only one supported is PL.
simpClientId:
type: string
maxLength: 8
description: Gives the possibility to assign an individual ID to the customer. After completing this parameter, the IBAN number in its last 8 digits, contains the specified ID (e.g. 59 1050 XXXX XXXX 1234 5678 for simpClientId = 12345678).
required:
- merchantId
- posId
- sessionId
- amount
- currency
- description
- email
- country
- language
- urlReturn
- ttl
- sign
- simpCountryCode
TransactionVerificationResponse:
properties:
data:
properties:
status:
type: string
default: success
type: object
responseCode:
type: number
default: 0
PaymentMethodsResponseMethod:
properties:
name:
type: string
description: Name of payment method
id:
type: integer
description: Payment method ID
group:
type: string
description: "Possible values: FastTransfers, Blik, eTransfer, Credit Card, Installments, Wallet, Foreign, PrePayment, TraditionalTransfer, Another. SplitPayment"
subgroup:
type: string
description: "Possible values: PBL, Blik, BlikWhiteLabel, eTransfer, Credit Card, Installments, Wallet, Foreign, PrePayment, TraditionalTransfer, Another, SplitPayment, PIS"
status:
type: boolean
example: true
description: Specifies whether a given method is active
imgUrl:
type: string
description: Link to graphics
mobileImgUrl:
type: string
description: Link to mobile graphics
mobile:
type: boolean
example: true
description: Is the payment mobile method available?
availabilityHours:
$ref: "#/components/schemas/availabilityHours"
availabilityHours:
type: object
description: An object containing information about the method's availability hours (methods with ID 177, 178 return bool true/false information)
properties:
mondayToFriday:
type: string
saturday:
type: string
sunday:
type: string
TransactionVerificationBody:
properties:
merchantId:
description: Merchant ID
type: integer
posId:
description: Shop identification number (defaults to merchant ID)
type: integer
sessionId:
description: Unique identifier from merchant's system
type: string
maxLength: 100
amount:
description: Transaction amount which format is presented as amount in lowest currency unit, e.g. 1.23 PLN = 123
type: integer
currency:
description: Currency
type: string
maxLength: 3
default: "PLN"
orderId:
description: Id of an order assigned by P24
type: integer
format: int64
sign:
description: Checksum of parameters:
{"sessionId":"str","orderId":int,"amount":int,"currency":"str","crc":"str"}
calculated with the use of sha384
IMPORTANT!:
in case json_encode function is used, the following attributes should be added
"JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES"
type: string
required:
- posId
- sessionId
- amount
- currency
- orderId
- sign
- merchantId
AvailabilityHoursResponse:
properties:
mondayToFriday:
type: string
saturday:
type: string
default: unavailable
sunday:
type: string
TransactionRequestBody1:
type: object
properties:
merchantId:
name: merchantId
in: formData
description: Merchant identification number
type: integer
posId:
name: posId
in: formData
description: Shop identification number (defaults to merchant ID)
type: integer
sessionId:
name: sessionId
in: formData
description: Unique identifier from merchant's system
type: string
maxLength: 100
amount:
name: amount
in: formData
description: Transaction amount expressed in lowest currency unit, e.g. 1.23 PLN = 123
type: integer
currency:
name: currency
in: formData
description: Currency compatible with ISO, e.g. PLN
type: string
maxLength: 3
default: PLN
description:
name: description
in: formData
description: Transaction description
type: string
maxLength: 1024
email:
name: email
in: formData
description: Customer's e-mail
type: string
maxLength: 50
client:
name: client
in: formData
description: Customer's first name and surname
type: string
maxLength: 40
address:
name: address
in: formData
description: Customer's address
type: string
maxLength: 80
zip:
name: zip
in: formData
description: Customer's postal code
type: string
maxLength: 10
city:
name: city
in: formData
description: Customer's city
type: string
maxLength: 50
country:
name: country
in: formData
description: Country codes compatible with ISO, e.g. PL, DE, etc.
type: string
maxLength: 2
default: PL
phone:
name: phone
in: formData
description: "Customer's telephone in the following format: 481321132123"
type: string
maxLength: 12
language:
name: language
in: formData
description: "One of following language codes according to ISO 639-1: bg, cs, de,
en, es, fr, hr, hu, it, nl, pl, pt, se, sk, ro"
type: string
maxLength: 2
default: pl
method:
name: method
in: formData
description: Payment method ID. List of payment methods provided in the panel or
available through API
type: integer
urlReturn:
name: urlReturn
in: formData
description: URL address to which customer will be redirected when transaction is
complete
type: string
maxLength: 250
urlStatus:
name: urlStatus
in: formData
description: URL address to which transaction status will be send
type: string
maxLength: 250
urlNotify:
name: urlNotify
in: formData
description: URL address to which transaction notifications will be sent
type: string
maxLength: 250
timeLimit:
name: timeLimit
in: formData
description: Time limit for transaction process, 0 - no limit, max. 99 (in
minutes)
type: integer
channel:
name: channel
description: "
1 - card + ApplePay + GooglePay,
2 - transfer,
4 - traditional transfer,
8 -
N/A,
16 - all 24/7 – makes available all payment methods,
32 -
use pre-payment,
64 – only pay-by-link methods,
128 –
instalment payment forms,
256 – wallets,
4096 - card,
8192 - blik,
16384 - all methods except blik
To activate the specific channels, their values should be summed up.
Example:
transfer and traditional transfer:
channel=6"
type: integer
enum:
- 1
- 2
- 4
- 8
- 16
- 32
- 64
- 128
- 256
- 4096
- 8192
- 16384
waitForResult:
type: boolean
description: Parameter determines wheter a user should wait for result of the transaction in the transaction service and be redirected back to the shop upon receiving confirmation or be redirected back to the shop immediately after payment. Read more
regulationAccept:
type: boolean
description: 'Acceptance of Przelewy24 regulations:
false – display consent on p24 website (default),
true – consent granted, do not display.
In case the „true” parameter is sent, the consent – worded as follows – must be displayed on the Partner’s website: „I hereby state that I have read the [regulations](https://www.przelewy24.pl/regulamin) and [information obligation](https://www.przelewy24.pl/obowiazekinformacyjny) of ”Przelewy24”.
Under words regulations and information obligation there must be hyperlinks redirecting to websites with these documents. The checkbox must not be ticked by default.'
default: false
shipping:
name: shipping
in: formData
description: Delivery cost
type: integer
transferLabel:
name: transferLabel
in: formData
description: "Description forwarded to transfer's description (not in every payment methods). A parameter can contain values only in a range [a-z A-Z 0-9 ęółśążźćńĘÓŁŚĄŻŹĆŃ . /\ :- ]"
type: string
maxLength: 20
mobileLib:
name: mobileLib
description: The parameter is necessary while using SDK libraries. The value passed in mobileLib parameter is always 1 and value passed in sdkVersion determines which version of library should be used.
type: integer
enum:
- 1
sdkVersion:
name: sdkVersion
in: formData
description: Version of mobile library. Determines if transaction is mobile.
type: string
maxLength: 10
sign:
name: sign
in: formData
type: string
maxLength: 100
description:
Checksum of parameters:
{"sessionId":"str","merchantId":int,"amount":int,"currency":"str","crc":"str"}
calculated with the use of sha384
IMPORTANT!:
in case json_encode function is used, the following attributes should be added
"JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES"
encoding:
name: encoding
in: formData
description: "Coding system for characters sent: ISO-8859-2, UTF-8, Windows-1250"
type: string
maxLength: 15
methodRefId:
name: methodRefId
in: formData
description: Special parameter for some payment flows e.g. BLIK and Card
one-click.
type: string
maxLength: 250
cardData:
type: object
allOf:
- $ref: "#/components/schemas/cardData"
cart:
description: cart
items:
$ref: "#/components/schemas/CartParameters"
additional:
type: object
description: Set of additional information about the transaction or the payer
allOf:
- $ref: "#/components/schemas/AdditionalProperties"
required:
- merchantId
- posId
- sessionId
- amount
- currency
- description
- email
- country
- language
- urlReturn
- ttl
- sign
AdditionalProperties:
properties:
shipping:
type: object
description: Additional shipping information
properties:
type:
type: integer
description: Type of shipment:
0 - courier
1 - delivery point
2 - parcel locker
3 - package in a shop
enum:
- 0
- 1
- 2
- 3
address:
type: string
description: 'Shipment address: street and number'
zip:
type: string
description: Shipment zip code
city:
type: string
description: Shipment city
country:
type: string
description: Shipment country
required:
- type
- address
- zip
- city
- country
PSU:
type: object
description: >
Payment Service User
IMPORTANT!:
Object required when using methods blikChargeByCode or blikChargeByAlias.
properties:
IP:
type: string
description: IPv4 or IPv6
userAgent:
type: string
maxLength: 255
description: UserAgent is a string identifying the browser and operating system.
TransactionRegistrationResponse:
properties:
data:
properties:
token:
type: string
type: object
responseCode:
type: number
default: 0
cardData:
type: object
description: IN PREPARATION! An object containing card data
discriminator:
propertyName: transactionType
mapping:
recurring: "#/components/schemas/recurring"
standard: "#/components/schemas/other2"
initial: "#/components/schemas/other"
1click: "#/components/schemas/other2"
properties:
means:
type: object
properties:
card:
type: object
properties:
pan:
type: string
description: Payment card number (PAN - personal account number)
expYear:
type: integer
description: The year in which the card expires
expMonth:
type: integer
description: The month in which the card expires
clientName:
type: string
description: Name and surname of the card holder
securityCode:
type: string
description: CVV/CVC code
required:
- pan
- expYear
- expMonth
- clientName
referenceNumber:
type: object
properties:
id:
type: string
description: Reference number (token assigned by P24)
securityCode:
type: string
description: Security code
required:
- id
schemeToken:
type: object
properties:
pan:
type: string
description: Token number
expYear:
type: integer
description: The year in which the card expires
expMonth:
type: integer
description: The month in which the card expires
securityCode:
type: string
description: Cryptogram
eci:
type: string
description: The Electronic Commerce Indicator
type:
type: string
description: Typ tokenu
enum:
- visaToken
- mcToken
- visaMobile
- applepay
- googlepay
required:
- pan
- expYear
- expMonth
- type
xPayPayload:
type: object
properties:
payload:
type: string
description: Base64 encrypted payment payload
type:
type: string
description: Payment type
enum:
- applepay
- googlepay
required:
- payload
- type
transactionType:
type: string
description: >
Transaction type:
- standard - standard transaction
- initial - 1click or recurring initialization transaction. Launched in SCA mode
- 1click - transaction with a saved card in the presence of the customer
- recurring - recurring transaction
required:
- means
- transactionType
Transaction200Blik:
properties:
data:
description: Array of objects related to the BLIK alias
items:
$ref: "#/components/schemas/BlikAlias200"
responseCode:
type: integer
default: 0
recurring:
description: recurring transaction
allOf:
- $ref: "#/components/schemas/cardData"
properties:
traceID:
type: string
description: "Initialization transaction reference number (required for recurring, if the following have been provided: card, schemeToken)"
required:
- traceID
type: object
other:
description: recurring transaction
allOf:
- $ref: "#/components/schemas/cardData"
- type: object
type: object
other2:
description: recurring transaction
allOf:
- $ref: "#/components/schemas/cardData"
- type: object
properties:
3dsMode:
type: string
default: LSRequired
description: >
Tryb autoryzacji 3D Secure:
- LSRequired - transaction with submitted Liability Shift requirement
- SCA - transaction with submitted Liability Shift requirement + Force
- lowValue - transaction with Low_Value exception sent
- tra - transaction with Transaction_Risk_Analysys exception thrown
- exemption - the default RTS exception is thrown
- noPreference - transaction without any preferences (also without Liability Shift requirement)
enum:
- LSRequired
- SCA
- lowValue
- tra
- exemption
- noPreference
required:
- 3dsMode
type: object
BlikAlias200:
properties:
value:
type: string
description: alias value
type:
type: string
description: alias type
status:
type: string
description: alias status
expirationDate:
type: string
description: alias expiration date
InvalidInputData:
properties:
error:
type: string
default: Invalid input data
example: Invalid input data
code:
type: number
default: 400
example: 400
UnauthorizedResponse:
properties:
error:
type: string
default: Incorrect authentication
example: Incorrect authentication
code:
type: number
default: 401
example: 401
TransactionTestAccess200:
properties:
data:
type: boolean
default: true
error:
type: string
PaymentMethodsResponse:
properties:
name:
type: string
description: Name of payment method
id:
type: integer
description: Payment method ID
status:
type: boolean
description: Specifies whether a given method is active
imgUrl:
type: string
description: Link do grafiki
mobileImgUrl:
type: string
description: Link do grafiki mobilnej
mobile:
type: boolean
description: Czy forma płatności jest dostępna mobilnie
availabilityHours:
$ref: "#/components/schemas/AvailabilityHoursResponse"
BasicResponse:
properties:
data:
type: array
default: Payment methods not found
items:
type: string
default: Payment methods not found
responseCode:
default: 404
type: number
TransactionRefundJsonRequestBody:
properties:
requestId:
type: string
description: Individual request ID
maxLength: 45
refunds:
type: array
items:
$ref: "#/components/schemas/RefundRequestArrayDataBasic"
refundsUuid:
type: string
description: Individual ID for a correct refund request in the merchant’s system
maxLength: 35
urlStatus:
type: string
description: Notification address for the refund batch transferred
required:
- requestId
- refunds
- refundsUuid
RefundRequestArrayDataBasic:
properties:
orderId:
type: integer
format: int64
description: Transaction order ID from Przelewy24
sessionId:
type: string
description: Transaction session ID from the Partner’s system
amount:
type: integer
description: Amount of refund
description:
type: string
description: Refund description visible in transfer details
maxLength: 35
type: object
required:
- orderId
- sessionId
- amount
TransactionRefund201:
properties:
data:
type: array
items:
$ref: "#/components/schemas/TransactionRefund201Item"
responseCode:
type: number
TransactionRefund201Item:
properties:
orderId:
type: integer
format: int64
description: Transaction order ID from Przelewy24
sessionId:
type: string
description: Transaction session ID from the Partner’s system
amount:
type: integer
description: Amount of refund
description:
type: string
description: Transaction description
status:
type: boolean
example: true
description: Was refund attempt successful?
message:
type: string
example: success
description: Text description of successful refund
InvalidInputDataRefund:
properties:
error:
type: string
description: Error message. Possbile values:
"Invalid input parameters" - in case incorrect parameters or their values,
"Request already exists" - in case the refund was already created,
"Concurrent call" - in case the refund is multiplied.
code:
type: number
default: 400
example: 400
TransactionRefund409:
properties:
error:
type: array
items:
$ref: "#/components/schemas/TransactionRefund409Item"
code:
type: integer
example: 409
TransactionRefund409Item:
properties:
orderId:
type: integer
format: int64
description: Transaction order ID from Przelewy24
sessionId:
type: string
description: Transaction session ID from the Partner’s system
amount:
type: integer
description: Amount of refund
description:
type: string
description: Refund description
status:
type: boolean
example: false
description: Was refund attempt successful?
message:
type: string
example: The amount of refund exceeds available amount for the transaction
description: Error message. Possible values:
"Transaction not found" - in case the transaction is not found,
"Transaction in wrong status - cannot refund" - in case the transaction is in wrong status, therefore the refundis not possible,
"Insufficient funds available" - in case there are not enough funds to execute the refund,
"The amount of refund exceeds available amount for the transaction" - in case the amount of the refund request exceeds available amount for the transaction
Refund500Response:
properties:
error:
type: string
example: Unknown error
description: Error message
code:
type: integer
example: 500
default: 500
TransactionRegisterOfflineRequest:
properties:
token:
type: string
TransactionRegistrationOffline200:
properties:
data:
properties:
orderId:
type: integer
format: int64
description: Unique transaction ID assigned by P24
sessionId:
type: string
description: Unique ID assigned by the merchant’s system
amount:
type: integer
description: Transaction amount
statement:
type: string
description: Full payment title
iban:
type: string
description: Number of account for payment
ibanOwner:
type: string
description: Name of payment recipient
ibanOwnerAddress:
type: string
description: Address of payment recipient
type: object
responseCode:
type: number
example: 0
TransactionRegistrationOffline409:
properties:
error:
type: string
default: Unable to create offline transaction
example: Unable to create offline transaction
code:
type: number
example: 409
ErrorCodeResponse:
properties:
error:
type: string
example: Undefined error
default: Undefined error
code:
type: integer
example: 500
default: 500
type: object
TranstactionSplitPayment:
required:
- merchantId
- posId
- sessionId
- amount
- currency
- description
- email
- country
- language
- urlReturn
- sign
- splitPaymentDetails
- description
properties:
merchantId:
name: merchantId
in: formData
description: Merchant identification number
type: integer
posId:
name: posId
in: formData
description: Shop identification number (defaults to merchant ID)
type: integer
sessionId:
name: sessionId
in: formData
description: Unique identifier from merchant's system
type: string
maxLength: 100
amount:
name: amount
in: formData
description: Transaction amount expressed in lowest currency unit, e.g. 1.23 PLN = 123
type: integer
currency:
name: currency
in: formData
description: Currency compatible with ISO, e.g. PLN
type: string
maxLength: 3
default: PLN
description:
name: description
in: formData
description: Transaction description
type: string
maxLength: 1024
email:
name: email
in: formData
description: Customer's e-mail
type: string
maxLength: 50
client:
name: client
in: formData
description: Customer's first name and surname
type: string
maxLength: 40
address:
name: address
in: formData
description: Customer's address
type: string
maxLength: 80
zip:
name: zip
in: formData
description: Customer's postal code
type: string
maxLength: 10
city:
name: city
in: formData
description: Customer's city
type: string
maxLength: 50
country:
name: country
in: formData
description: Country codes compatible with ISO, e.g. PL, DE, etc.
type: string
maxLength: 2
default: PL
phone:
name: phone
in: formData
description: "Customer's telephone in the following format: 481321132123"
type: string
maxLength: 12
language:
name: language
in: formData
description: "One of following language codes according to ISO 639-1: bg, cs, de,
en, es, fr, hr, hu, it, nl, pl, pt, se, sk, ro"
type: string
default: pl
maxLength: 2
method:
name: method
in: formData
description: Payment method ID. List of payment methods provided in the panel or
available through API
type: integer
urlReturn:
name: urlReturn
in: formData
description: URL address to which customer will be redirected when transaction is
complete
type: string
maxLength: 250
urlStatus:
name: urlStatus
in: formData
description: URL address to which transaction status will be send
type: string
maxLength: 250
timeLimit:
name: timeLimit
in: formData
description: Time limit for transaction process, 0 - no limit, max. 99 (in
minutes)
type: integer
channel:
name: channel
in: formData
description: "
1 - card + ApplePay + GooglePay,
2 - transfer,
4 - traditional transfer,
8 -
N/A,
16 - all 24/7 – makes available all payment methods,
32 -
use pre-payment,
64 – only pay-by-link methods,
128 –
instalment payment forms,
256 – wallets,
4096 - card,
8192 - blik,
16384 - all methods except blik
To activate the specific channels, their values should be summed up.
Example:
transfer and traditional transfer:
channel=6"
type: integer
enum:
- "1"
- "2"
- "4"
- "8"
- "16"
- "32"
- "64"
- "128"
- "256"
- "4096"
- "8192"
- "16384"
shipping:
name: shipping
in: formData
description: Delivery cost
type: integer
transferLabel:
name: transferLabel
in: formData
description: "Description forwarded to transfer's description (not in every payment methods). A parameter can contain values only in a range [a-z A-Z 0-9 ęółśążźćńĘÓŁŚĄŻŹĆŃ . /\ :- ]"
type: string
maxLength: 20
sdkVersion:
name: sdkVersion
in: formData
description: Version of mobile library. Determines if transaction is mobile.
type: string
maxLength: 10
sign:
name: sign
in: formData
type: string
maxLength: 100
description:
Checksum of parameters:
{"sessionId":"string","merchantId":int,"amount":int,"currency":"string","crc":"string"}
calculated with the use of sha384
IMPORTANT!:
in case json_encode function is used, the following attributes should be added
"JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES"
encoding:
name: encoding
in: formData
description: "Coding system for characters sent: ISO-8859-2, UTF-8, Windows-1250"
type: string
maxLength: 15
cart:
description: cart
items:
$ref: "#/components/schemas/CartParameters"
methodRefId:
name: methodRefId
in: formData
description: Special parameter for some payment flows e.g. BLIK and Card
one-click.
type: string
maxLength: 250
splitPaymentDetails:
type: object
properties:
vatAmount:
type: integer
description: Kwota podatku VAT
invoiceNumber:
type: string
description: Numer faktury
nip:
type: string
description: Numer identyfikacji podatkowej
iban:
type: string
description: Międzynarodowy numer rachunku bankowego IBAN (international bank account number)
required:
- vatAmount
- invoiceNumber
- nip
CartParameters:
description: Cart Parameters
type: object
required:
- sellerId
- sellerCategory
properties:
sellerId:
type: string
description: Shop ID on the part of Partner
sellerCategory:
type: string
description: Shop category
name:
type: string
description: Product name
Required for PayPal payment method
description:
type: string
description: Product description
Required for PayPal payment method
quantity:
type: integer
description: Product quantity
Required for PayPal payment method
price:
type: integer
description: Product price
Required for PayPal payment method
number:
type: string
description: Product number
Required for PayPal payment method
TransactionRefundsInfoResponse:
properties:
data:
$ref: "#/components/schemas/TransactionWithRefundsResponse"
responseCode:
type: number
example: 0
TransactionWithRefundsResponse:
properties:
orderId:
type: integer
format: int64
sessionId:
type: string
amount:
type: integer
currency:
type: string
refunds:
type: array
items:
$ref: "#/components/schemas/RefundsCollection"
type: object
RefundsCollection:
properties:
batchId:
type: integer
requestId:
type: string
date:
type: string
login:
type: string
description:
type: string
status:
type: integer
example: 3
default: 3
description: 1 - completed,
2 - pending,
3 - awaiting P24's acceptance,
4 - rejected
amount:
type: integer
type: object
TransactionNotFoundResponse:
properties:
error:
type: string
default: Transaction not found
example: Transaction not found
responseCode:
type: number
default: 0
example: 0
TransactionBySessionIdSuccessResponse:
properties:
data:
$ref: "#/components/schemas/TransactionBySessionIdResponse"
responseCode:
type: number
default: 0
type: object
TransactionBySessionIdResponse:
properties:
statement:
type: string
description: Transfer title
orderId:
type: integer
format: int64
description: Transaction ID
sessionId:
type: string
description: Transaction ID assigned by Merchant
status:
type: integer
description: Transaction status. 0 - no payment, 1 - advance payment, 2 - payment made, 3 - payment returned
amount:
type: integer
description: Transaction amount
currency:
type: string
default: PLN
description: Transaction currency
date:
type: string
description: Transaction registration date
dateOfTransaction:
type: string
description: Date of payment
clientEmail:
type: string
description: Customer's e-mail
accountMD5:
type: string
description: Customer's hashed bank account number
paymentMethod:
type: integer
description: Payment method ID
description:
type: string
description: Transaction description
clientName:
type: string
description: Customer's first name and surname
clientAddress:
type: string
description: Customer's address
clientCity:
type: string
description: Customer's city
clientPostcode:
type: string
description: Customer's zip code
batchId:
type: integer
description: Batch number in which the transaction was paid
fee:
type: string
description: Commission
RecurringParams:
type: object
properties:
token:
type: string
description: Token obtained during transaction registration request via transaction/register.
IMPORTANT!:
In order to correctly charge the payer using the blikChargeByCode method the PSU object must be sent in the additional object in the transaction/register request.
blikCode:
type: string
description: 6-digit, one-time BLIK code generated in the app
aliasValue:
type: string
description: Unique alias of the user which can be used to charge client's next transactions.
IMPORTANT!: Parameter required if a `recurring` object was sent in the request.
aliasLabel:
type: string
description: Alias label displayed in the app.
IMPORTANT!: Parameter required if a `recurring` object was sent in the request.
minLength: 5
maxLength: 35
recurring:
type: object
$ref: "#/components/schemas/RecurringParamsIn"
required:
- token
- blikCode
RecurringParamsIn:
description: >
An object containing information on BLIK recurring payment.
To activate the specific channels, their values should be summed up.
Example:
transfer and traditional transfer:
channel=6"
type: integer
enum:
- 1
- 2
- 4
- 8
- 16
- 32
- 64
- 128
- 256
- 4096
- 8192
- 16384
shipping:
description: Delivery cost
type: integer
transferLabel:
description: "Description forwarded to transfer's description (not in every payment methods). A parameter can contain values only in a range [a-z A-Z 0-9 ęółśążźćńĘÓŁŚĄŻŹĆŃ . /\ :- ]"
type: string
maxLength: 20
sdkVersion:
description: Version of mobile library. Determines if transaction is mobile
type: string
sign:
description:
Checksum of parameters:
{"sessionId":"str","merchantId":int,"amount":int,"currency":"str","crc":"str"}
calculated with the use of sha384
IMPORTANT!:
in case json_encode function is used, the following attributes should be added
"JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES"
type: string
encoding:
description: "Coding system for characters sent: ISO-8859-2, UTF-8, Windows-1250"
type: string
cart:
description: cart
type: array
items:
$ref: '#/components/schemas/CartParameters'
methodRefId:
description: Special parameter for some payment flows e.g. BLIK and Card one-click.
type: string
CardPaymentPositiveNotification:
type: object
properties:
merchantId:
type: integer
description: Merchant identification number
posId:
type: integer
description: Shop identification number (defaults to merchant ID)
orderId:
type: integer
format: int64
description: Transaction number assigned by P24
sessionId:
type: string
description: Unique identifier from merchant's system
example: "c3b520e2-5429-11e8-a782-43fdbbec70f2"
method:
type: integer
description: Payment method used by customer
result:
type: object
description: Transactions details
allOf:
- $ref: "#/components/schemas/CardPaymentPositiveNotificationResult"
sign:
type: string
example: "SHA384"
description: Checksum of parameters calculated using SHA384. Details of sign calculation below.
CardPaymentPositiveNotificationResult:
type: object
properties:
error:
type: string
example: "0"
description: Error code
message:
type: string
description: Description of error
example: "Correct Transaction"
cardInfoData:
type: object
description: Detailed information about the card
allOf:
- $ref: "#/components/schemas/CardPaymentPositiveNotificationCardInfoData"
CardPaymentPositiveNotificationCardInfoData:
type: object
properties:
cardType:
type: string
description: Card type
bank:
type: string
description: The bank issuing the card
refId:
type: string
description: Card alias
bin:
type: string
description: BIN number
mask:
type: string
description: Card mask
cardDate:
type: string
description: Card expiration date
hash:
type: string
description: Card hash
cardCountry:
type: string
description: Card issuing country code
example: "PL"
security:
type: object
description: "Information regarding transaction security"
allOf:
- $ref: "#/components/schemas/CardPaymentPositiveNotificationSecurity"
CardPaymentPositiveNotificationSecurity:
type: object
properties:
3ds:
type: boolean
description: Flag indicating whether 3D Secure authorization was required
frictionless:
type: boolean
description: Flag indicating frictionless occurrence
risk:
type: integer
description: Risk level
liabilityshift:
type: boolean
description: Liabilityshift flag
traceID:
type: string
description: Global transaction ID
3dsMode:
type: string
description: 3D Secure authorization mode
softDecline:
type: boolean
description: Transaction retry due to softDecline flag
CardPaymentNegativeNotification:
type: object
properties:
merchantId:
type: integer
description: Merchant identification number
posId:
type: integer
description: Shop identification number (defaults to merchant ID)
orderId:
type: integer
format: int64
description: Transaction number assigned by P24
sessionId:
type: string
description: Unique identifier from merchant's system
example: "c3b520e2-5429-11e8-a782-43fdbbec70f2"
result:
allOf:
- $ref: "#/components/schemas/CardPaymentNegativeNotificationResult"
sign:
type: string
example: "SHA384"
description: Checksum of parameters calculated using SHA384. Details of sign calculation below.
CardPaymentNegativeNotificationResult:
type: object
description: Transaction details
properties:
error:
type: string
example: "0"
description: Error code
message:
type: string
description: Description
example: "Incorrect Transaction"
rejectReason:
type: string
description: Reason for rejection of the transaction
example: "declined"
behaviour:
type: string
description: Guidelines for further course of action in case of rejection or decline
example: "abort"
issuerResponseCode:
type: string
description: Response code from the bank
####end components####
####descriptions####
tags:
####ADDITIONAL API####
- name: Transaction service API
x-displayName: Transaction service API
- name: Additional API functionality
x-displayName: Additional API functionality
- name: Notification
x-displayName: Notification
description:
client, city, zip, address.
The minimum amount sent in a request for PayPo method is currently PLN 5, its maximum value is PLN 5,000.
PayPo payments are paid after receiving funds from the operator. By default, the merchant will receive the funds within 5 business days.
## PayPal
For the PayPal method to work properly on your website, it must be activated for the account on the Przelewy24 website. In order to activate the PayPal method, please contact us using the e-mail address assigned to your account in the Przelewy24 panel via contact form.
To correctly perform a transaction for the indicated method, it is necessary to send the full object cart with the required parameters sent in the request transaction register.
- name: Calculating Sign
x-displayName: Calculating Sign
description: >
$params = [
'sessionId' => 'unique-session-id', // Here you should put the unique generated session ID
'merchantId' => 999999, // Here you should put the Seller ID from the Przelewy24 panel
'amount' => 1234, // Here you should put the transaction amount in groszy, 1234 means PLN 12.34
'currency' => 'PLN', // Transaction currency should be placed here
'crc' => 'crc-z-panelu-p24', // Here you should place the CRC key downloaded from the Przelewy24 panel
];
// Combining parameters into a string
$combinedString = json_encode($params, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
// Hashing with SHA-384
$hash = hash('sha384', $combinedString);
echo 'The checksum of the parameters is: ' . $hash;
const params = {
sessionId: "unique-session-id", // Here you should put the unique generated session ID
merchantId: 999999, // Here you should put the Seller ID from the Przelewy24 panel
amount: 1234, // Here you should put the transaction amount in groszy, 1234 means PLN 12.34
currency: "PLN", // Transaction currency should be placed here
crc: "crc-z-panelu-p24" // Here you should place the CRC key downloaded from the Przelewy24 panel
};
// Combining parameters into a string
const combinedString = JSON.stringify(params);
// Hashing with SHA-384
const hash = crypto.createHash('sha384').update(combinedString).digest('hex');
console.log('The checksum of the parameters is:', hash);
import hashlib
# Parameters in JSON format
json_string = '{"sessionId":"sessionId","merchantId":999999,"amount":1000,"currency":"PLN","crc":"crc"}'
# Hashing with SHA-384
checksum = hashlib.sha384(json_string.encode('utf-8')).hexdigest()
print('The checksum of the parameters is:', checksum)
import com.fasterxml.jackson.databind.ObjectMapper;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
public class ChecksumExample {
public static void main(String[] args) throws Exception {
String json = createJson("sessionId", 999999, 1000, "PLN", "crc");
String checksum = calculateChecksum(json);
System.out.println("The checksum of the parameters is: " + checksum);
}
private static String createJson(String sessionId, int merchantId, int amount, String currency, String crc) throws Exception {
return new ObjectMapper().writeValueAsString(Map.of(
"sessionId", sessionId,
"merchantId", merchantId,
"amount", amount,
"currency", currency,
"crc", crc
));
}
private static String calculateChecksum(String json) throws Exception {
byte[] hash = MessageDigest.getInstance("SHA-384").digest(json.getBytes(StandardCharsets.UTF_8));
StringBuilder hexString = new StringBuilder();
for (byte b : hash) {
hexString.append(String.format("%02x", b));
}
return hexString.toString();
}
}
$params = [
'sessionId' => 'unique-session-id', // Here you should put the unique generated session ID
'orderId' => 999999, // Here you should put the numeric transaction ID received e.g. from a notification
'amount' => 1234, // Here you should put the transaction amount in groszy, 1234 means PLN 12.34
'currency' => 'PLN', // Transaction currency should be placed here
'crc' => 'crc-z-panelu-p24', // Here you should place the CRC key downloaded from the Przelewy24 panel
];
// Combining parameters into a string
$combinedString = json_encode($params, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
// Hashing with SHA-384
$hash = hash('sha384', $combinedString);
echo 'The checksum of the parameters is: ' . $hash;
const params = {
sessionId: "unique-session-id", // Here you should put the unique generated session ID
orderId: 999999, // Here you should put the numeric transaction ID received e.g. from a notification
amount: 1234, // Here you should put the transaction amount in groszy, 1234 means PLN 12.34
currency: "PLN", // Transaction currency should be placed here
crc: "crc-z-panelu-p24" // Here you should place the CRC key downloaded from the Przelewy24 panel
};
// Combining parameters into a string
const combinedString = JSON.stringify(params);
// Hashing with SHA-384
const hash = crypto.createHash('sha384').update(combinedString).digest('hex');
console.log('The checksum of the parameters is:', hash);
import hashlib
# Parameters in JSON format
json_string = '{"sessionId":"sessionId","orderId":999999,"amount":1000,"currency":"PLN","crc":"crc"}'
# Hashing with SHA-384
checksum = hashlib.sha384(json_string.encode('utf-8')).hexdigest()
print('The checksum of the parameters is:', checksum)
import com.fasterxml.jackson.databind.ObjectMapper;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
public class ChecksumExample {
public static void main(String[] args) throws Exception {
String json = createJson("sessionId", 999999, 1000, "PLN", "crc");
String checksum = calculateChecksum(json);
System.out.println("The checksum of the parameters is: " + checksum);
}
private static String createJson(String sessionId, int orderId, int amount, String currency, String crc) throws Exception {
return new ObjectMapper().writeValueAsString(Map.of(
"sessionId", sessionId,
"orderId", orderId,
"amount", amount,
"currency", currency,
"crc", crc
));
}
private static String calculateChecksum(String json) throws Exception {
byte[] hash = MessageDigest.getInstance("SHA-384").digest(json.getBytes(StandardCharsets.UTF_8));
StringBuilder hexString = new StringBuilder();
for (byte b : hash) {
hexString.append(String.format("%02x", b));
}
return hexString.toString();
}
}

# What is 1-click BLIK payment?
As the name suggests the payment allows to make purchases with one click. It doesn't require entering the BLIK code, only simple one-click acceptance in the application.
# How to get information about an alias?
There are two ways to get information about an alias:




# How to set up payment frequency (only PAYID)?
To define recurring payment frequency following data should be passed:
# How to change PAYID during payment referenced by alias (only PAYID)?
You can change the PAYID during recurring payment. A new invitation is sent to the client which must be accepted.
In order to carry out payments by payment cards, it is necessary to use the transaction/register method in order to register transaction in Przelewy24 and, subsequently, transfer the received transaction token for the call made by Przelewy24 JavaScript. The data provided in the form are transferred directly to Przelewy24, and, as a result, script on the shop’s part (indicated in the configuration) is activated.

| GET | https://secure.przelewy24.pl/inchtml/ajaxPayment/ajax.js?token={TOKEN} |
|---|
- form inside the store
2. Then, by card/info or additional notification, you can get information about the card, including the reference number necessary for subsequent charges.
3. Then, depending on whether we want to accept the payment, we perform transaction/verify or transaction/reject, if it was only a sample payment, e.g. for 1 PLN.
# How to get card information?
There are two ways to get information about a card:
- Use method card/info
- Use additional notification
The notification can be used for any card transactions:
- in the card/chargeWiths3ds, card/charge, card/pay processes for immediately displaying a message to a customer about a successful / failed transaction
- in the RISK process on the part of the Partner to check the client's card and protect against fraud
- when saving the card to the 1-click process, there is no need to ask for the card reference number

-->
# How to make a 1-click card payment with 3DS?
The dedicated card/chargeWith3ds method is used for this purpose.
# How to handle payments without customer participation (recurring)?
The method card/charge enables recurrent card charging based on transferred reference number.

Output parameters
| Field name | Type | Description | |---------------|:---------------------|:----------------------| | orderId | INT| Transaction number assigned by P24 | | sessionId | STRING | Unique identifier from merchant's system | | method | INT | Payment method used by customer (e.g. for installment payments = 303)| | result | OBJECT | Transaction result object, individual for each method| | merchantId | INT | Merchant identification number | | posId | INT | Shop identification number (defaults to merchant ID)| | sign | STRING | Checksum of parameters calculated with the use of sha384:Result object
| Field name | Type | Description | |---------------|:---------------------|:----------------------| | generalStatus | STRING | General status of transaction | | detailedStatus | STRING | Detailed status od transactionIMPORTANT! In case json_encode function is used, the following attributes should be added "JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES"
The notification for a correctly booked transaction
```json { "orderId":int, "sessionId":"string", "method":int, "result": { "generalStatus":"done", "detailedStatus":"string", "paymentId":"string", "provider":"string" }, "merchantId":int, "posId":int, "sign":"string" } ```The notification for a transaction awaiting bank confirmation
```json { "orderId":int, "sessionId":"string", "method":int, "result": { "generalStatus":"done", "detailedStatus":"string", "paymentId":"string", "provider":"string" }, "merchantId":int, "posId":int, "sign":"string" } ```The notification for a transaction accepted for execution by the bank
```json { "orderId":int, "sessionId":"string", "method":int, "result": { "generalStatus":"done", "detailedStatus":"string", "paymentId":"string", "provider":"string" }, "merchantId":int, "posId":int, "sign":"string" } ```The notification for a rejected transaction
```json { "orderId":int, "sessionId":"string", "method":int, "result": { "generalStatus":"done", "detailedStatus":"string", "paymentId":"string", "provider":"string" }, "merchantId":int, "posId":int, "sign":"string" } ```The notification for a pending transaction (waiting for execution by the bank)
```json { "orderId":int, "sessionId":"string", "method":int, "result": { "generalStatus":"done", "detailedStatus":"string", "paymentId":"string", "provider":"string" }, "merchantId":int, "posId":int, "sign":"string" } ```The notification for a cancelled transaction
```json { "orderId":int, "sessionId":"string", "method":int, "result": { "generalStatus":"done", "detailedStatus":"string", "paymentId":"string", "provider":"string" }, "merchantId":int, "posId":int, "sign":"string" } ``` ####GPAY#### - name: GPay Description x-displayName: Google Pay Description description: >
Google Pay is fast and simple method of payments offered by Google. Card details are safely stored on Google servers. Service allows users to perform the payment process without manually filling card details or contact form.
## Communication scheme
Once the customer clicks „Pay with Google Pay” button, the Google Pay form is displayed. This form allows customer to confirm Google account and choose card to be used for payment process. At this stage card may be changed to a different one (previously saved) or new card may be added. Google Pay script displays encrypted card details using postMessage function which the shop must intercept, encrypt once again using the base64 function and send in "methodRefId" parameter along with the transaction data.| POST | https://secure.przelewy24.pl/api/v1/transaction/register |
|---|
## Description
During the shopping process, Apple Pay uses the number assigned to a specific device and a unique transaction code. As a result, your card number is never stored on your device or Apple servers. And at the time of payment, Apple never makes card numbers available to sellers.
| POST | https://secure.przelewy24.pl/api/v1/transaction/register |
|---|
Note!
To ensure proper implementation of the solution:
- for card methods method 241 or 242 is required to be enabled - in accordance with business arrangements
- for Google Pay method 264 or 265 is required to be enabled - in accordance with business arrangements
- for Apple Pay method 252 or 253 is required to be enabled - in accordance with business arrangements
Example view of the card form with Click to Pay enabled
Within the Click to Pay service, for the moment there is no possibility to use the payer profile data to permanently enroll data that could later be used for oneClick transactions, recurrences, etc.
## Library
Calling the library for the production environment:
```javascript
```
Calling a library for a sandbox environment:
```javascript
```
## Class Przelewy24CardTokenization
In order to generate a card form in an iFrame window, use the implemented library to define the Transfers24CardTokenization class and call the render method
{
"lang": "pl",
"c2p": "true",
"psu": {
"email": "Jan.Kowalski@gmail.com"
},
"labels": {
"cardholder": "Imię i nazwisko posiadacza karty",
"card": "Numer karty",
"cvv": "Numer CVV/CVC karty",
"exp": "Data ważności karty"
},
"buttons": {
"tokenize_temporary": {
"label": "Zapisz kartę"
}
},
"styles": {
"font": {
"basic": {
"size": "20px",
"family": "Roboto"
}
}
}
}
{
"c2p": "true",
"psu": {
"email": "Jan.Kowalski@gmail.com"
},
"placeholders": {
"card": "Podaj numer karty",
"cvv": "Podaj numer CVV/CVC karty",
"exp": "Podaj datę ważności karty",
"cardholder": "Podaj imię i nazwisko posiadacza karty"
},
"agreement": {
"contentEnabled": {
"enabled": true,
"checkboxEnabled": false
}
},
"buttons": {
"tokenize": {
"label": "Zapisz kartę"
}
}
}
{
"placeholders": {
"card": "",
"cvv": "",
"exp": "",
"cardholder": ""
},
"agreement": {
"contentEnabled": {
"enabled": true,
"checkboxEnabled": true
}
},
"styles": {
"font": {
"basic": {
"size": "20px",
"family": "Roboto"
}
},
"background": {
"basic": {
"color": "#F6F3FD"
}
}
}
}
Flow of enrollment of card data from Click to Pay. A buttons object and a c2p parameter with the value true have been passed in options. The payer has the Click to Pay profile stored in the device.
During the creation of the iframe on the merchant page, the loading event will be sent. The start event will be passed as soon as the card form view is rendered. According to the assumptions, until the ready enent is passed with the status set to true, the buttons for saving card data must be inactive. Before the view in the iframe is rendered, the verification of the payer's login to Click to Pay by the stored device takes place. If the payer's login to Click to Pay succeeds, an event start will be sent and immediately an event ready with a status of true, but only for the temporary button. At the moment, within Click to Pay there is no possibility to save data pernamentally. When you click on the temporary button, the P24.tokenize method with the temporary parameter will be called. In response, you may see a fail event with an error message or a success event with the data needed to charge the payer. In order to process the payment later, you need to register the transaction and use a dedicated library for this. Read more
Flow of enrollment of card data from Click to Pay. The options passed a buttons object and a c2p parameter with the value true. The payer does not have the Click to Pay profile memorized with the device.
During the creation of the iframe on the merchant page, the loading event will be sent.
The start event will be passed as soon as the card form view is rendered.According to the assumptions, until the ready enent is passed with the status set to true, the buttons for saving card data must be inactive. Before the view in the iframe is rendered, verification of the payer's login to Click to Pay takes place. If it fails, the card form view with the option to log in to Click to Pay is rendered. The payer selects the option to log in to Click to Pay. He enters his email and then the OTP code. Only after the payer correctly logs into the Click to Pay profile will an event be transmitted ready with a status of true for the temporary button. At the moment, there is no way to save data permanently within Click to Pay. When the temporary button is clicked, the P24.tokenize method will be called with the temporary parameter. In response, you may see a fail event with an error message or a success event with the data needed to charge the payer. In order to process the payment later, you need to register the transaction and use a dedicated library for this. Read more
Flow of enrollment of card data from Click to Pay. The options passed a buttons object and a c2p parameter with the value true. The payer sets up a Click to Pay profile
During the creation of the iframe on the merchant page, the loading event will be sent. The start event will be passed immediately after the card form view is rendered. The assumption is that until the ready enent is passed with the status set to true, the buttons for saving card data must be disabled. Before the view is rendered in the iframe, the payer's login to Click to Pay is verified. If it fails, the card form view with the option to log in to Click to Pay will be rendered. An event ready with a status of true for both types of buttons will be sent after the payer completes the required data (name of the cardholder, card number, expiration date and cvv/cvc of the card). In addition, there will be a checkbox with the option to save the card in Click to Pay. Once it is checked, an event ready will be sent with a status of false for both buttons. A 'next' button will appear in the iFrame. After the payer clicks it, an additional view will be presented asking for email address, phone number and country. Once it is completed correctly, an event ready will be sent with a status of true for the temporary button. At the moment, there is no possibility to save data permanently within Click to Pay. When you click on the temporary button, the P24.tokenize method with the temporary parameter will be called. In response, you may see a fail event with an error message or a success event with the data needed to charge the payer. In order to process the payment later, you need to register the transaction and use a dedicated library for this. Read more
- name: Card payment flow
x-displayName: Card payment flow
description: >
The Przelewy24 process allows you to execute card transactions based on standardized JavaScript. The system recognizes the method, userId and transaction registration used and executes the transaction according to them.
One-time payment - register a transaction using transaction/register method with the token that was passed in the refId parameter in the success type event after using cardTokenizationIframe.min.js library. The cardData.means.referenceNumber parameter should pass the refId value and the TransacationType should take the standard value. In the response, a transaction token will be passed, which must be passed when the script is executed: https://{{environment}}.przelewy24.pl/whitelabel/card/javascript/{{token_transakcyjny}}
Recurring payment and oneClik - register a transaction using transaction/register method with the token that was passed in the refId parameter in the success type event after using cardTokenizationIframe.min.js library. In the cardData.means.referenceNumber parameter, the refId value should be passed and the TransacationType should take the initial value. In response, you will be given a transaction token, which you need to pass when executing the script: https://{{environment}}.przelewy24.pl/whitelabel/card/javascript/{{token_transakcyjny}}. Any subsequent use of the token from the refId parameter for subsequent transactions will require a corresponding change in the TransacationType parameter to a value of oneClick or recurring, depending on the type of transaction that will take place.
JavaScript Callback:
```
```
- name: Recursion (doPayment)
x-displayName: Recurrence
description: >
In order to register a recurring transaction, it is necessary to send transaction registration request first to /transaction/register endpoint. . For the transaction to be performed, the `“cardData”` object must be added in the transaction registration request.
```json
{
"cardData": {
"means": {
"card": {
"pan": "1234123412341234",
"expYear": "2027",
"expMonth": "01",
"clientName": "Name and surname",
"securityCode": "123"
}
},
"transcationType": "recurring",
"traceID": ""
}
}
```
Description of the specific parameters of the object:
- the `"card"` object contains card data such as:
- `"pan"` - 16-digit card number
- `"expYear"` - card expiry year
- `"expMonth"` - card expiry month
- `"securityCode"` – CVV/CVC code
- `"transactionType"` - takes the “recurring” value
- `"traceID"` - initiating transaction reference number (required for recurring, if the following have been provided: card, schemeToken)
Provided that all the parameters in the transaction registration request are correct, a token required for `transaction/doPayment` request is returned in response.
- name: Card notification
x-displayName: Card notification
description: >
In case of the forms of payment that require additional information on transaction progress, it is possible to obtain additional notification. In order to declare return address, provide urlNotify parameter during transaction registration
## Posivite notification
In the case of a positive result of the transaction, where payment was made by card, the following notification will be provided:
| POST | https://secure.przelewy24.pl/api/v1/transaction/register |
|---|
| POST | https://secure.przelewy24.pl/api/v1/transaction/register |
|---|
This is how you’ll reach a wide circle of customers. Newcomers will get the signal that they may pay in instalments.
Add the instalments logo to the payment methods presented in the webpage’s footer. That’s one of the key spots where customers look for information on the payment methods available.
If your website is internally complex (categories, subcategories), place the “Buy in instalments” button on the subpages as well.
Informing customers on the availability of payment in instalments on product cards serves to increase the conversion of this payment method by over 40%, while it is only 8% when the information is provided as late as at the cart stage or at checkout.
The minimum option is static graphic ads. Thanks to them, you will let your customer know that Przelewy24 Instalments service is available.
List of products is yet another spot where you can attract your customers to make quicker shopping decisions or to add additional products to their carts.
Basket / order summary - this is where placing information on instalments is a must.
Home stretch. You don’t want your customer to abandon the cart at this point. Give a clear signal concerning the finalisation of instalment payments. Remember that at this stage the customer will already have selected the payment method, so make sure you keep telling them about instalments from the very start of their purchasing journey.
Checkout - place the instalment payment method at checkout.
To find out how to display a given payment method, visit
How to display the full selection of payment methods on the shop’s website?
By default, the instalment method is available as method=303. Redirection should be done in compliance with the z guidelines
All graphic materials are available here: (https://www.przelewy24.pl/storage/app/media/do-pobrania/p24_raty/p24_raty_materialy_graficzne.zip)
- name: Widget
x-displayName: Widget
description: >
Present the lowest possible instalment for a given product.
Once customers click on the widget, any element may be displayed, for example a pop-up window with information on Przelewy24 I Instalments.
In order to activate the widget, the following java script must be entered:
MINI version
```javascript
```
MAX version
```javascript
```
- name: Simulator
x-displayName: Simulator
description: >
This is a way to increase user engagement. The calculator allows you to present more detailed information about the available installments.
“Clicking through” different installment options will bring the customer closer to the next stage of the purchasing path.
sha384({„crc”:”string”,”posId”:int,”method”:int}) |
| posId | Shop ID (by default Partner ID) |
| method | By default 303 |
| amount | Amount in grosz |
| lang | Allowed: pl |
| currency | Allowed: PLN |
Parameters optional to call the widget or the simulator:
| Parametr | Description |
|--------------|:----------------------|
| test | Allowed: true, false |
When the test parameter is sent with the value `true`, the `sign`, `posId` and `method` fields are not validated, but must instead be passed in the `config` object.