---
title: "Tpay Open API Integration from PLN 999 | VulCode"
description: "Tpay integration through the Open API from PLN 999: transfers, BLIK on your page, cards, JWS-signed notifications, refunds and marketplace. Usually 2-3 days."
url: "https://vulcode.com/en/services/integrations/tpay"
lang: "en"
---

[Home](https://vulcode.com/en) [Services](https://vulcode.com/en/services) [Integrations](https://vulcode.com/en/services/integrations) [Online payments](https://vulcode.com/en/services/integrations/polish-payments)

# Tpay integration through the Open API

A Tpay integration from VulCode brings Tpay (a Polish payment operator) payments into stores, apps and platforms with many sellers through the Open API: transfers, BLIK (Poland's mobile payment method) on your own page or without a code, cards and refunds. It costs from PLN 999 (about EUR 220) and usually takes 2-3 days. We verify the JWS signature on every notification, so payment statuses can be trusted.

[Free quote](https://vulcode.com/en/quote) [Full pricing](https://vulcode.com/en/services/pricing)

## What a Tpay integration is made of

From the checkout form to booking the payment. Every layer has its job and its test.

- 1Checkout and form
  method choiceBLIK code fieldrecurring consent

- 2Your server
  OAuth tokenPOST /transactionstransaction stored on the order
  The client_id and client_secret live in environment variables, never in code, as the documentation advises.

- 3Tpay
  payment page or BLIK Level 0bank authorisationsettlement

- 4Notifications
  JWS signature in X-JWS-Signaturecertificate checked against the Tpay root CA
  Tpay publishes no IP list, because the addresses are dynamic. The signature is the only safeguard, so checking it is mandatory.

- 5The order
  status paidrefundsevent log

Before we start

- You open the Tpay account and sandbox access as the merchant.

- If the store runs on a popular platform, Tpay has a ready plugin for it and we start there.

- Marketplace needs the Tpay Partner Programme and a separate agreement, so we settle that first.

## Three ways to take BLIK with Tpay

BLIK can redirect the customer, stay on your page or remember the store for next time.

|  | With a redirectthe eBLIK form (Tpay's BLIK payment form) | Level 0code on your page | One Clickan alias instead of a code |
| --- | --- | --- | --- |
| Where the code is entered | on the Tpay form | in your form | only on the first payment |
| Field in the request | groupId 150 | blikToken with the code | the user alias |
| Customer stays in the store | No | Yes | Yes |
| Later purchases without a code | No | No | Yes |
| Good for | the simplest start | phone purchases | stores and apps with accounts |

A BLIK code is valid for 2 minutes. We design the messages for a customer who does not confirm in time around that.

## Refunds: the status trap

Full and partial refunds behave differently in Tpay. Your panel has to add refunds up itself, not just read the transaction status.

- 01 **paid**
  The transaction is booked, the order is being fulfilled.
  - balance too low **insufficient funds**
  A refund only goes through when the account balance covers the amount and fee. The panel shows this up front.

- 02 **partial refund**
  The Tpay transaction status does not change, even when partial refunds reach 100%. Your system counts the refunded amount.

- 03 **refund**
  The status after a full refund. We close the order as refunded.

## A payment in the Tpay marketplace

One customer payment for products from several sellers. This is the flow in the marketplace API.

**Customer****Your platform****Tpay**

Your platform → Tpay

GET /accounts and /accounts/pos

Seller and point-of-sale ids, stored on the platform side

Customer → Your platform

A cart from several sellers

Your platform → Tpay

POST /marketplace/v1/transaction

A parent transaction with child transactions for sellers

Customer → Tpay

Payment

Tpay → Your platform

Paid notification

With the value the platform gave the transaction, such as the order number

Your platform → Your platform

Totals checked on the platform side

Tpay does not compare child amounts with product prices, so your code does

- **The precondition**: The marketplace only works within the Tpay Partner Programme and after a separate agreement.
- **Identifiers**: Sellers and points of sale have ULID ids encoded in base32. We store them with the seller accounts.

## Checklist before going live

What we check on the Tpay sandbox before you take the first real payment.

- The payment path
  ### The OAuth token and its renewal
  By default a token lives 2 hours. The module renews it before it expires instead of waiting for an error.

- ### Redirect to transactionPaymentUrl
  The payment address comes back when the transaction is created. We never build it ourselves.

- ### BLIK after the time runs out
  A code lives 2 minutes. We check the customer message and the retry path.

- ### The JWS signature on every notification
  With no IP list, the signature is the only proof a notification came from Tpay.

- ### A repeated notification
  A second notice about the same payment must not activate a service or ship a parcel twice.

- ### The partial refund counter
  The Tpay status does not say how much was refunded, so the panel counts it.

## Who does what

The Tpay agreement is on your side, the code on ours and settlement on the gateway's.

You

VulCode

Tpay

Everyone

All items by role

- You The Tpay account, the agreement and sandbox access.

- VulCode Transactions, BLIK, notifications and refunds in your code.

- Tpay Payment methods and settlement.

- You For a marketplace: joining the Partner Programme.

- VulCode JWS verification and handling of repeated notifications.

- Tpay Turning on the marketplace once the agreement is signed.

- You Signing off the payment path on the test version.

- VulCode Payment statuses and history in your panel.

- Tpay The certificates it signs notifications with.

## Common questions about Tpay

The main questions about Tpay: BLIK, recurring payments, marketplace, cost and code.

**Can a customer pay by BLIK without leaving the store?**

Yes, with Level 0. They type the code in your form and you pass it to Tpay in the blikToken field.

**How long does it take?**

Usually 2-3 days. The exact dated schedule comes with the free quote, and if anything is going to move, you know in advance.

**How much does a Tpay integration cost?**

A Tpay integration costs from PLN 999 (about EUR 220) for a payment with a redirect, under our [API and integrations](https://vulcode.com/en/services/api-integrations) service, and usually takes 2-3 days. BLIK Level 0, One Click, refunds from the panel and marketplace raise the price. You pay the transaction commission to Tpay. The quote is free and comes back within an hour.

**Can you handle recurring BLIK payments?**

Yes, Tpay lets you invite the customer to recurring payments during a Level 0 payment. We cover details and limits on our [BLIK](https://vulcode.com/en/services/integrations/blik) page.

**Can we build a marketplace with many sellers?**

Yes, through the Tpay marketplace. It requires the Partner Programme and a separate agreement with Tpay, which you arrange.

**Why not filter notifications by IP?**

Because Tpay publishes no address list; the addresses are dynamic. Instead we check the JWS signature of every notification.

**Will the Tpay integration code be mine?**

Yes. Once the work is accepted and paid in full, the economic copyright in the Tpay integration code passes to you and you get the repository with run instructions. Open source libraries keep their own licences.

**How do you check a Tpay integration before launch?**

On the Tpay sandbox. We run a payment, an error, a notification with a JWS signature and a full and a partial refund, and only then switch the integration on in production.

**What if the Tpay integration stops working?**

The integration logs every operation and retries the ones that failed by itself. When the problem does not go away you get a notification, and bugs that come from our work are fixed free of charge within the 90 days of support after launch.

**What if Tpay changes its API?**

We adjust the integration to Tpay's changes: within the 90 days of support included after launch, later under a [maintenance](https://vulcode.com/en/services/website-maintenance) plan or as a separate short order. We follow Tpay's change notices and tell you in advance what needs fixing.

## Sources

Technical details come from the Tpay Open API documentation.

- [OAuth 2.0 authorisation](https://docs-api.tpay.com/pl/first-steps/authorization/)

- [Notifications and the JWS signature](https://docs-api.tpay.com/pl/webhooks/)

- [BLIK payments](https://docs-api.tpay.com/pl/payment-methods/blik/)

- [Refunds](https://docs-api.tpay.com/pl/refunds/)

- [Marketplace](https://docs-api.tpay.com/pl/marketplace/)

## Related pages

Other gateways and pages worth a look when choosing payments.

- [**Online payments** A gateway comparison and how to choose.](https://vulcode.com/en/services/integrations/polish-payments)

- [**BLIK** BLIK by code, by alias and in recurring payments.](https://vulcode.com/en/services/integrations/blik)

- [**Web platforms** Platforms and marketplaces with seller accounts.](https://vulcode.com/en/services/web-platforms)

- [**Online stores** A custom-built store with payments.](https://vulcode.com/en/services/online-stores)

- [**Przelewy24** Przelewy24 through the REST API, with BLIK and marketplace.](https://vulcode.com/en/services/integrations/przelewy24)

- [**PayU** PayU through REST API 2.1, with cards and BLIK.](https://vulcode.com/en/services/integrations/payu)

## Describe your project.

A free quote comes back within an hour during working hours.

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)

## More on this in our blog

- [BLIK fees in Polish payment gateways: Przelewy24, PayU, Tpay, Paynow and Stripe Five gateways charge in three ways: a percentage plus a per-transaction fee, a lower percentage with a monthly package, or a percentage alone. We put the standard BLIK rates side by side and show which gateway wins at which basket size.](https://vulcode.com/en/blog/polish-payment-gateways-compared)
