Przelewy24

Accept payments using Przelewy24, the most popular payment method in Poland.

📘

To start accepting Przelewy24 payments, please contact your customer success manager.

Process a Przelewy24 payment

Przelewy24 payments follow a two-step process:

  1. Request a Przelewy24 payment
  2. Redirect the customer

Step 1: Request a Przelewy24 payment

The request

Use the details below to set up your request.

Endpoints

Live

https://api.checkout.com/payments

Sandbox

https://api.sandbox.checkout.com/payments

Header parameters

Header

Value

Authorization Required

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type\ Required

application/json

Body parameters

📘

The table below describes the minimum recommended fields. You can find the full list, as well as complete request and response examples, in our API reference.

Field name

Description

amount Integer required

The payment amount.

currency\ String\ required

The three-letter ISO 4217 currency code.

source\ Object\ required

Details about the payment source.

source.type\ String\ required

The type of payment source. Set this to p24.

source.payment_country\ String\ required

The 2-letter ISO country code of the country in which the payment instrument is issued/operated.

source.account_holder_name\ String\ required

The account holder's name.

source.account_holder_email\ String\ required

The account holder's email address.

source.billing_descriptor\ String\ optional

Information that appears on the customer's billing statement.

Request example

{
  "amount": 100,
  "currency": "PLN",
  "source": {
    "type": "p24",
    "payment_country": "PL",
    "account_holder_name": "Bruce Wayne",
    "account_holder_email":"[email protected]",
    "billing_descriptor": "P24 Demo Payment"
  }
}

The response

If you receive a 202 Success response with a status field set to Pending, your request was successful.

Response example

{
  "id": "pay_yo7mr2qvrj5ubirhehlbjr4yda",
  "status": "Pending",
  "customer": {
    "id": "cus_dd7efezan2xexdfhtrhoz6tvam"
  },
  "_links": {
    "self": {
      "href": "https://api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda"
    },
    "redirect": {
      "href": "https://r.girogate.de/ti/simp24?tx=431811890&rs=6FlzR3BeW8SvfX4U0H7weTEkDPSWJBVb&cs=dfcf0cab1a0522652133e8dc0302cdcae683ac07f1317b3db6450893ce007831"
    }
  }
}

Step 2: Redirect the customer

Redirect your customer to the redirect link’s href in the response. The customer will be redirected to a Przelewy24 page where they can authorize the payment, before being transferred to your predefined success or failure URL.

Get details about a Przelewy24 payment

You can use the payment_id found in the payment response, or the cko-session-id from the success/failure URL (e.g., https://www.checkout.com/order/succeeded?cko-session-id=**sid_vii64oquze5u3h2x6hh4rurc4y**) to retrieve details about the payment.

🚧

The cko-session-id expires 15 minutes after being created.

The request

Use the details below to set up your request.

Endpoint

Live

GEThttps://api.checkout.com/payments/{payment_id}

Sandbox

GEThttps://api.sandbox.checkout.com/payments/{payment_id}

Header and path parameters

Header

Value

Authorization Required

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type\ Required

application/json

Path

Value

payment_id Required

The payment ID, found in the payment response, or the session ID from the success/failure URL.

The response

Response example

{
  "id": "pay_yo7mr2qvrj5ubirhehlbjr4yda",
  "requested_on": "2019-08-08T06:48:21Z",
  "source": {
    "type": "p24",
    "p24_descriptor": "P24-H99-999-999 ABC1234 Dynamic"
  },
  "amount": 100,
  "currency": "PLN",
  "payment_type": "Regular",
  "status": "Captured",
  "approved": true,
  "risk": {
    "flagged": false
  },
  "customer": {
    "id": "cus_dd7efezan2xexdfhtrhoz6tvam"
  },
  "_links": {
    "self": {
      "href": "https://api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda"
    },
    "actions": {
      "href": "https://api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda/actions"
    },
    "refund": {
      "href": "https://api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda/refunds"
    }
  }
}

Refund a Przelewy24 payment

Przelewy24 supports both partial and full refunds. You can refund a payment through the Hub or using the refund API.

Testing Przelewy24

🚧

To start testing, you'll need to:

  • create a test account, and
  • contact your customer success manager or integrations engineer to activate Przelewy24 payments in the sandbox environment.
  1. Create a Przelewy24 transaction as above, following the redirect link in the response to Przelewy24's website.

  2. Leave the 'Bank name or BIC' field blank and click 'Next'.

  3. Leave the 'Account Number' and 'PIN' fields blank and then click 'Login'.

  4. Leave the 'TAN' field blank and click 'Make Payment'.

  5. Click 'Back to where you came from' to be redirected to your predefined success URL.

Can we help?

Thanks for using Checkout.com. If you need help or have a question, message our support team at [email protected].