# Przelewy24 for Unified Payments API Przelewy24 payments follow a two-step process: 1. [Request a payment](#Request_a_payment). 2. [Redirect the customer](#Redirect_the_customer). --- ## Request a payment Use the following details to set up your request. ### Endpoints You can find the full list, as well as complete request and response examples, in our [API reference](https://api-reference.checkout.com/). **Live** `POST` `https://{prefix}.api.checkout.com/payments` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments` ### Request example ```json { "amount": 100, "currency": "PLN", "source": { "type": "p24", "payment_country": "PL", "account_holder_name": "John Smith", "account_holder_email": "john.smith@example.com", "billing_descriptor": "test payment" } } ``` ### Response example If you receive a `202 Success` response with a `status` field set to `Pending`, your request was successful. ```json { "id": "pay_yo7mr2qvrj5ubirhehlbjr4yda", "status": "Pending", "customer": { "id": "cus_dd7efezan2xexdfhtrhoz6tvam" }, "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda" }, "redirect": { "href": "https://r.girogate.de/ti/simp24?tx=431811890&rs=6FlzR3BeW8SvfX4U0H7weTEkDPSWJBVb&cs=dfcf0cab1a0522652133e8dc0302cdcae683ac07f1317b3db6450893ce007831" } } } ``` --- ## 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 payment To retrieve details about the payment, you can use either the `id` found in the payment response or the `cko-session-id` from the success/failure URL. For example, `https://www.checkout.com/order/succeeded?cko-session-id=sid_vii64oquze5u3h2x6hh4rurc4y`. > **Note** > > The `cko-session-id` expires 15 minutes after being created. ### Endpoints You can find the full list, as well as complete request and response examples, in our [API reference](https://api-reference.checkout.com/). **Live** `GET` `https://{prefix}.api.checkout.com/payments/{id}` **Sandbox** `GET` `https://{prefix}.api.sandbox.checkout.com/payments/{id}` ### Response example ```json { "id": "pay_yo7mr2qvrj5ubirhehlbjr4yda", "requested_on": "2024-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://{prefix}.api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda" }, "actions": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda/actions" }, "refund": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_yo7mr2qvrj5ubirhehlbjr4yda/refunds" } } } ``` --- ## Refund a payment Przelewy24 supports both partial and full refunds. You can refund a payment through the [Dashboard](https://dashboard.checkout.com) or by using the [Refund API](https://www.checkout.com/docs/payments/manage-payments/refund-a-payment.md). --- ## Cancel a payment If the customer fails to complete their payment within one hour of payment creation, we'll automatically void the payment and send a `payment_expired` webhook. If the customer explicitly cancels their payment, we'll send a `payment_canceled` webhook instead. --- ## Test Przelewy24 > **Information** > > To enable Przelewy24 payments in your sandbox environment for testing, contact your account manager. 1. Create a Przelewy24 transaction following the steps on this page, and open the redirect link in the response to Przelewy24's website. 2. Leave the _Bank name_ or _BIC_ field blank and select _Next_. 3. Leave the _Account Number_ and _PIN_ fields blank and then select _Login_. 4. Leave the _TAN_ field blank and select _Make Payment_. 5. Select _Back to where you came from_ to be redirected to your predefined success URL.