Adds a Tpay payment method to @payloadcms/plugin-ecommerce, replacing or complementing the built-in Stripe adapter. It supports BLIK, pay-by-link bank transfers and cards through one Tpay account. It mounts notification and BLIK endpoints and adds a tpay field group to the transactions collection, which requires a migration. Needs Payload 3.83 or newer and a Tpay merchant account.
Tpay payment adapter for @payloadcms/plugin-ecommerce: BLIK, bank transfers and cards for Polish shops built on Payload CMS 3.
Installation
npm i @wellmade-online/payload-ecommerce-tpay2
Stars
0
Forks
0
Open Issues
1 months ago
Last Updated
7
Weekly Downloads
v0.1.0
npm Version
224.2 KB
Unpacked Size
0
Dependencies
2+2 since Sep 13
| Date | Stars |
|---|---|
| Dec 5, 2026 | 2 |
| Dec 4, 2026 | 2 |
| Dec 3, 2026 | 2 |
| Dec 2, 2026 | 2 |
| Dec 1, 2026 | 2 |
| Nov 30, 2026 | 2 |
| Nov 29, 2026 | 2 |
| Nov 28, 2026 | 2 |
| Nov 27, 2026 | 2 |
| Nov 26, 2026 | 2 |
| Nov 25, 2026 | 2 |
| Nov 24, 2026 | 2 |
| Nov 23, 2026 | 2 |
| Nov 22, 2026 | 2 |
| Nov 21, 2026 | 2 |
| Nov 20, 2026 | 2 |
| Nov 19, 2026 | 2 |
| Nov 18, 2026 | 2 |
| Nov 17, 2026 | 2 |
| Nov 16, 2026 | 2 |
| Nov 15, 2026 | 2 |
| Nov 14, 2026 | 2 |
| Nov 13, 2026 | 2 |
| Nov 12, 2026 | 2 |
| Nov 11, 2026 | 2 |
| Nov 10, 2026 | 2 |
| Nov 9, 2026 | 2 |
| Nov 8, 2026 | 2 |
| Nov 7, 2026 | 2 |
| Nov 6, 2026 | 2 |
| Nov 5, 2026 | 2 |
| Nov 4, 2026 | 2 |
| Nov 3, 2026 | 2 |
| Nov 2, 2026 | 2 |
| Nov 1, 2026 | 2 |
| Oct 31, 2026 | 2 |
| Oct 30, 2026 | 2 |
| Oct 29, 2026 | 2 |
| Oct 28, 2026 | 2 |
| Oct 27, 2026 | 2 |
| Oct 26, 2026 | 2 |
| Oct 25, 2026 | 2 |
| Oct 24, 2026 | 2 |
| Oct 23, 2026 | 2 |
| Oct 22, 2026 | 2 |
| Oct 21, 2026 | 2 |
| Oct 20, 2026 | 2 |
| Oct 19, 2026 | 2 |
| Oct 18, 2026 | 2 |
| Oct 17, 2026 | 2 |
| Oct 16, 2026 | 2 |
| Oct 15, 2026 | 2 |
| Oct 14, 2026 | 2 |
| Oct 13, 2026 | 2 |
| Oct 12, 2026 | 2 |
| Oct 11, 2026 | 2 |
| Oct 10, 2026 | 2 |
| Oct 9, 2026 | 2 |
| Oct 8, 2026 | 2 |
| Oct 7, 2026 | 2 |
| Oct 6, 2026 | 2 |
| Oct 5, 2026 | 2 |
| Oct 4, 2026 | 2 |
| Oct 3, 2026 | 2 |
| Oct 2, 2026 | 2 |
| Oct 1, 2026 | 2 |
| Sep 30, 2026 | 2 |
| Sep 29, 2026 | 2 |
| Sep 28, 2026 | 2 |
| Sep 27, 2026 | 2 |
| Sep 26, 2026 | 2 |
| Sep 25, 2026 | 2 |
| Sep 24, 2026 | 2 |
| Sep 23, 2026 | 2 |
| Sep 22, 2026 | 2 |
| Sep 21, 2026 | 2 |
| Sep 20, 2026 | 2 |
| Sep 19, 2026 | 2 |
| Sep 18, 2026 | 1 |
| Sep 17, 2026 | 1 |
| Sep 16, 2026 | 1 |
| Sep 15, 2026 | 0 |
| Sep 14, 2026 | 0 |
| Sep 13, 2026 | 0 |
7−135 since Sep 17
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 7 |
| Dec 4, 2026 | 8 |
| Dec 3, 2026 | 6 |
| Dec 2, 2026 | 4 |
| Dec 1, 2026 | 7 |
| Nov 30, 2026 | 10 |
| Nov 29, 2026 | 10 |
| Nov 28, 2026 | 8 |
| Nov 27, 2026 | 11 |
| Nov 26, 2026 | 11 |
| Nov 25, 2026 | 13 |
| Nov 24, 2026 | 10 |
| Nov 23, 2026 | 7 |
| Nov 22, 2026 | 9 |
| Nov 21, 2026 | 9 |
| Nov 20, 2026 | 8 |
| Nov 19, 2026 | 10 |
| Nov 18, 2026 | 10 |
| Nov 17, 2026 | 10 |
| Nov 16, 2026 | 18 |
| Nov 15, 2026 | 16 |
| Nov 14, 2026 | 16 |
| Nov 13, 2026 | 17 |
| Nov 12, 2026 | 15 |
| Nov 11, 2026 | 13 |
| Nov 10, 2026 | 15 |
| Nov 9, 2026 | 8 |
| Nov 8, 2026 | 7 |
| Nov 7, 2026 | 7 |
| Nov 6, 2026 | 5 |
| Nov 5, 2026 | 7 |
| Nov 4, 2026 | 7 |
| Nov 3, 2026 | 5 |
| Nov 2, 2026 | 6 |
| Nov 1, 2026 | 8 |
| Oct 31, 2026 | 9 |
| Oct 30, 2026 | 9 |
| Oct 29, 2026 | 7 |
| Oct 28, 2026 | 7 |
| Oct 27, 2026 | 9 |
| Oct 26, 2026 | 10 |
| Oct 25, 2026 | 8 |
| Oct 24, 2026 | 7 |
| Oct 23, 2026 | 5 |
| Oct 22, 2026 | 15 |
| Oct 21, 2026 | 16 |
| Oct 20, 2026 | 14 |
| Oct 19, 2026 | 15 |
| Oct 18, 2026 | 17 |
| Oct 17, 2026 | 18 |
| Oct 16, 2026 | 19 |
| Oct 15, 2026 | 12 |
| Oct 14, 2026 | 12 |
| Oct 13, 2026 | 12 |
| Oct 12, 2026 | 9 |
| Oct 11, 2026 | 8 |
| Oct 10, 2026 | 7 |
| Oct 9, 2026 | 7 |
| Oct 8, 2026 | 7 |
| Oct 7, 2026 | 6 |
| Oct 6, 2026 | 7 |
| Oct 5, 2026 | 7 |
| Oct 4, 2026 | 8 |
| Oct 3, 2026 | 9 |
| Oct 2, 2026 | 8 |
| Oct 1, 2026 | 5 |
| Sep 30, 2026 | 6 |
| Sep 29, 2026 | 7 |
| Sep 28, 2026 | 7 |
| Sep 27, 2026 | 7 |
| Sep 26, 2026 | 18 |
| Sep 25, 2026 | 24 |
| Sep 24, 2026 | 37 |
| Sep 23, 2026 | 178 |
| Sep 22, 2026 | 176 |
| Sep 21, 2026 | 175 |
| Sep 20, 2026 | 173 |
| Sep 19, 2026 | 161 |
| Sep 18, 2026 | 155 |
| Sep 17, 2026 | 142 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1369615995-root)<a href="https://payloaddirectory.dev/plugins/1369615995-root"><img src="https://payloaddirectory.dev/badge/1369615995-root.svg" alt="Payload Directory"></a>README
Tpay payment adapter for @payloadcms/plugin-ecommerce. Gives a Payload CMS 3 shop the payment methods Polish customers actually use: BLIK, online bank transfers (pay-by-link) and cards, through a single Tpay account.
Written for the plugin's official PaymentAdapter contract, so it plugs in exactly where the built-in Stripe adapter would.
Dokumentacja po polsku: README.pl.md.
@payloadcms/plugin-ecommerceDeveloped and tested against Payload and @payloadcms/plugin-ecommerce 3.88.0. The plugin pins payload to an exact version in its own peer dependencies, so the two always move together; this package accepts the 3.x line and does not claim compatibility with 4.x.
npm install @wellmade-online/payload-ecommerce-tpay
Server side, in your Payload config:
import { ecommercePlugin } from '@payloadcms/plugin-ecommerce'
import { tpayAdapter, PLN } from '@wellmade-online/payload-ecommerce-tpay'
export default buildConfig({
plugins: [
ecommercePlugin({
currencies: {
defaultCurrency: 'PLN',
supportedCurrencies: [PLN],
},
payments: {
paymentMethods: [
tpayAdapter({
// every value below falls back to an environment variable
clientId: process.env.TPAY_CLIENT_ID,
clientSecret: process.env.TPAY_CLIENT_SECRET,
merchantId: process.env.TPAY_MERCHANT_ID,
securityCode: process.env.TPAY_SECURITY_CODE,
sandbox: process.env.TPAY_SANDBOX === 'true',
payerSuccessUrl: 'https://your-shop.example/order/confirmation',
payerErrorUrl: 'https://your-shop.example/order/failed',
}),
],
},
}),
],
})
Leave the plugin's access configuration alone unless you know what each function guards. The
development host in dev/ sets isDocumentOwner: () => true and
publicAccess: () => true so that scripts can drive it without logging in. Copied into a shop, that
configuration lets any signed in customer create an order with a plain POST /api/orders, without
paying anything: the plugin gives orders and transactions create: isAdmin, and the host's
isAdmin is "any logged in user". Nothing in this adapter can defend a shop whose own collections
accept orders from anyone. Keep the plugin defaults, or write access functions that check a role.
Client side, wherever you configure the storefront:
import { tpayAdapterClient } from '@wellmade-online/payload-ecommerce-tpay'
const paymentMethods = [tpayAdapterClient({ label: 'BLIK, transfer, card' })]
Every option is optional; the credentials fall back to environment variables, and the adapter throws at startup if clientId or clientSecret ends up empty.
| Option | Type | Default | What it does |
|---|---|---|---|
clientId | string | TPAY_CLIENT_ID | OAuth client ID from the Tpay panel (Integration > API). |
clientSecret | string | TPAY_CLIENT_SECRET | OAuth secret. |
merchantId | number | string | TPAY_MERCHANT_ID | Merchant number from the panel. Goes into the notification checksum. |
securityCode | string | TPAY_SECURITY_CODE | Notification security code. Without it notifications are refused, never waved through. |
sandbox | boolean | TPAY_SANDBOX === 'true' | Routes every call to the sandbox API. |
notificationUrl | string | derived from NEXT_PUBLIC_SERVER_URL or PAYLOAD_PUBLIC_SERVER_URL | Absolute public URL Tpay sends the result to. |
payerSuccessUrl | string | none | Where Tpay returns the payer after a successful payment. Set it - see the note below. |
payerErrorUrl | string | none | Where Tpay returns the payer after a failed payment. |
verifyJws | boolean | true | Verifies the X-JWS-Signature header over the whole notification body. false disables the layer explicitly. |
jwsRootCertificate | string (PEM) | none | Tpay root certificate, so the certificate chain is checked too, not only the signature. |
timeoutMs | number | 15000 | Ceiling on a single request to the Tpay API. 0 turns it off. |
cartsSlug | string | 'carts' | Slug of the carts collection. Set it if you renamed the collection - the plugin passes its own slug to confirmOrder but not to initiatePayment. |
lang | string | 'pl' | Language of the Tpay payment page. |
label | string | 'Tpay' | Readable name of the payment method. |
groupOverrides | object | none | Overrides for the field group the adapter contributes to transactions. |
payerSuccessUrl and payerErrorUrl are worth setting deliberately. The adapter sends the return URLs to Tpay only when you provide them. Leave them out and Tpay returns the payer wherever the merchant panel points, which is outside your shop, so confirm-order is never called - and that endpoint is where the plugin decrements stock. A shop missing these two settings takes payments and never adjusts inventory.
The adapter contributes a tpay field group to the plugin's transactions collection: transactionId, title, paymentUrl, shippingAddress and stockClaimedAt. Adding the adapter therefore changes your database schema - run your usual Payload migration step (payload migrate:create then payload migrate, or a dev push) after installing it.
tpay.stockClaimedAt is the one to know about: it is how the adapter hands the plugin's stock decrement trigger to at most one confirm-order call per transaction. It is also the field to query when reconciling inventory, because a succeeded transaction that has an order but no stockClaimedAt is one whose stock nobody adjusted. See Known limitations.
| Variable | Meaning |
|---|---|
TPAY_CLIENT_ID | OAuth client ID, Tpay panel: Integration > API |
TPAY_CLIENT_SECRET | OAuth client secret |
TPAY_MERCHANT_ID | Numeric merchant ID, part of the notification checksum |
TPAY_SECURITY_CODE | Notification security code, Tpay panel: Notifications > Security |
TPAY_SANDBOX | true routes every call to the sandbox API |
NEXT_PUBLIC_SERVER_URL | Used to derive the notification URL when you do not set one |
Every call to the Tpay API carries a deadline of 15 seconds, and the certificate fetch behind JWS verification carries a shorter one of 5 seconds, because that request runs while a notification is waiting for its answer. A provider that accepts a connection and then goes quiet would otherwise hold a checkout request, or a BLIK status poll, open for as long as your host allows. Change the API ceiling with timeoutMs on the adapter; timeoutMs: 0 turns it off and leaves only your host's own limits.
The adapter mounts an endpoint at:
POST /api/payments/tpay/notifications
Set that full public URL as the notification address, either per transaction (the adapter sends it with every transaction it creates) or in the Tpay panel. It has to be reachable from the public internet, so a tunnel is needed while developing locally.
POST /api/payments/tpay/initiate. The adapter writes a pending transaction, creates the matching transaction in Tpay and returns paymentUrl.paymentUrl.payerSuccessUrl, and the storefront calls POST /api/payments/tpay/confirm-order with the transactionID returned in step 1 and the cartID (plus the cart secret for a guest cart). The plugin's handler rejects the request with Cart ID is required. before the adapter is ever reached, and the adapter then checks that same secret (or the logged in owner) against the transaction being confirmed, so send all of them.Steps 3 and 4 both finish the order, whichever arrives first, and neither creates a second one. That matters because a redirect payment has no guarantee the browser ever comes back: the customer can pay with BLIK and close the tab.
Both paths are exercised against a real Payload instance with the plugin installed, using a real sandbox notification signed by Tpay, in dev/. Confirming an already confirmed transaction twice answers Order already confirmed and leaves exactly one order, which is measured rather than asserted.
The flow above sends the customer to Tpay to pick a method. BLIK level 0 keeps them where they already are: they type the six digit code from their banking app into your checkout, and nothing redirects anywhere. The adapter registers two endpoints for it.
| Endpoint | Body | Answers |
|---|---|---|
POST /api/payments/tpay/blik | transactionID, blikToken, and secret for a guest cart | the code has been sent |
POST /api/payments/tpay/blik-status | transactionID, and secret for a guest cart | pending, rejected, paid or failed |
A logged in customer who owns the transaction may omit secret. Anything else is answered with HTTP 403, and so is an unknown transactionID, so the endpoints do not tell an attacker which identifiers exist.
initiate exactly as before. Keep transactionID; ignore paymentUrl, nobody opens it.POST /blik with the code, then poll /blik-status every second or two until it stops answering pending.Three things here are measured against a live sandbox rather than assumed, and each of them will bite an integration that guesses instead:
success to a code that cannot possibly be valid. The literal code abcdef came back as result: success with the payment pending. The response to /blik therefore means "your request arrived", never "the customer paid". This adapter never reports a payment on the strength of it.pending, and the only trace of the refusal is paymentErrorCode on the last entry of payments.attempts. Measured with code 000000, which produced error 63 while the transaction still read pending. /blik-status reads that entry and answers rejected, so your checkout can ask for another code instead of leaving the buyer watching a spinner forever. The payment stays open and the next code goes to the same transaction, with no second order and no second transaction.confirm-order. That handler is written for a buyer coming back once, not for a loop: it decrements inventory whenever the adapter's answer carries transactionID, and BLIK level 0 requires polling until the code is accepted or refused. The claim described under Known limitations would hold the decrement to one, but a status poll has no business deciding stock at all. /blik-status finishes the order through the same idempotent path the server to server notification uses. The flip side is in Known limitations: a checkout that only ever uses BLIK never triggers the plugin's decrement, so it has to adjust stock itself.The whole path runs against a real Payload instance with the plugin installed in dev/, including the refusal: a good code moves the payment to paid with one order, a refused code answers rejected and leaves the payment open, and a second code sent to that same payment completes it.
A notification endpoint is a public URL, so everything about it assumes someone will try to fake a payment.
tr_crc and your security code. A notification without a matching checksum is answered with HTTP 400 and no order is created. Missing configuration is a refusal too, never a silent pass.tr_status, tr_paid, tr_currency, tr_email and test_mode sit outside it: change any of them and the same md5 still matches. Two of those, tr_status and tr_paid, are exactly the fields this adapter reads to decide that an order is paid. The checksum therefore authenticates which transaction a message is about, not what it says happened to it. Measured against a real sandbox notification and pinned in test/notification-shape.test.js.X-JWS-Signature header is answered with HTTP 400. The certificate is fetched only from the Tpay host for the current environment, so a forged x5u pointing anywhere else is rejected before any outbound request is made. Pass jwsRootCertificate to also verify the chain against Tpay's root. verifyJws: false switches the layer off, which leaves a paid order one leaked notification body away from anyone who can reach the endpoint; do that knowingly.test_mode is not an environment marker. A sandbox notification arrives with test_mode=0. Do not branch on it to tell test traffic from real traffic; use your own configuration.confirm-order asks Tpay what actually happened.confirm-order and /blik-status ask Tpay about the transaction ID stored on the document, never about one supplied in the request, and a correct answer only counts if Tpay reports the same amount and currency as the document. Without that, a buyer could pay for a cheap transaction and present that payment as proof for an expensive one. A mismatch is refused, and so is an API answer with no amount at all: a change in the API's shape stops sales loudly instead of waving everything through.confirm-order applies the same gate as the BLIK endpoints: the request has to come from the logged in owner of the transaction or carry the cart secret. That gate sits in front of the "already confirmed" answer too, so an order's accessToken is never handed to a stranger who guessed the ID. An identifier that matches nothing is refused with the same message and the same HTTP 403 as one that belongs to somebody else, so the endpoint cannot be walked to learn which transactions exist; the same holds when the cart the transaction points at has been deleted - a caller who cannot prove the payment is theirs gets the refusal, not a 500.initiate is what the order is created with. An email in a later request only fills the gap when the transaction has none, so knowing someone's transaction ID does not let you become the owner of their order.initiatePayment refuses a cart whose purchasedAt is set, because the goods behind it are already sold and a second payment would be taken for the same order. The flag is read from the database rather than from the cart object handed in: the plugin's endpoint loads the cart without purchasedAt, so a check against what it passes would never fire. If you renamed the carts collection, give the adapter its slug as cartsSlug - the plugin passes its own slug to confirmOrder but not to initiatePayment. A cart that cannot be read at all leaves a warning in the log and does not block the checkout; that is not evidence of a second payment.403, 409) comes back from the BLIK endpoints as a fixed message; the text of the underlying exception, including Tpay API paths and status codes, is written to the Payload logger only.Payload stores money in minor units (integer grosze), Tpay expects decimals. On the way out, and for every value that arrives as a string - a notification body, tr_paid, tr_amount - the conversion is digit shuffling only: strings padded and sliced, nothing divided or multiplied, because a one grosz drift changes the checksum and the payment is rejected with no readable reason.
The REST API is the exception, and it is worth knowing about. GET /transactions/{id} returns amount as a JSON number, so by the time the value reaches this package it is already a float; apiAmountToMinor scales it with Math.round(value * 10 ** decimals). That is rounding rather than exact arithmetic, and for two decimal places it is exact for every amount a shop can realistically charge - the error of the product stays far below the half unit that would round to the wrong integer. test/amount.test.js pins the values instead of asking you to take that on trust.
import { minorToDecimalString, decimalStringToMinor } from '@wellmade-online/payload-ecommerce-tpay'
minorToDecimalString(1999) // '19.99'
decimalStringToMinor('19.99') // 1999
Two decimal currencies only. Every conversion here assumes a minor unit of two decimal places, which is the ISO 4217 default and holds for everything Tpay settles (PLN, EUR, USD, GBP). A currency with a different exponent - JPY has none, KWD has three - is refused by initiatePayment with a loud error rather than converted by the wrong power of ten, and the same table guards the checks on the way back, so such a currency cannot pass the amount gate by both ends making the same mistake. Take it out of the plugin's supportedCurrencies.
Inventory is decremented by the plugin's confirm-order endpoint, and only when the buyer comes
back. The plugin's handler decrements stock whenever the adapter's answer carries a
transactionID, and it has no idempotency gate of its own: measured against plugin-ecommerce
3.88.0 on a live instance, two identical confirm-order calls for one already confirmed
transaction took stock from 5 to 4 to 3. The adapter now hands that trigger out at most once per
transaction. The claim is a conditional write of tpay.stockClaimedAt on the transaction
document, so only the call that wins it gets transactionID back; a reloaded return page, a second
browser tab or a hand written curl all get the same answer with no trigger in it, and stock stays
put. Which path closed the order makes no difference: the buyer's first confirm-order, a repeated
one, and a notification that finished the order before the browser returned all go through the same
claim.
The flip side of that is deliberate: a payment finished only by the notification adjusts no
stock. If the customer pays and never returns to the shop, nothing calls confirm-order, so the
plugin's decrement never runs. The adapter does not decrement on the notification path either,
because then a buyer who did come back would take a second unit off the shelf. Reconciling that
case is on the shop, and tpay.stockClaimedAt is the field to look at: a succeeded transaction
with an order and no stockClaimedAt is one whose stock nobody adjusted.
A BLIK checkout adjusts no stock at all unless you do it. The two limitations above are about
confirm-order running too often; this one is the opposite. BLIK level 0 never returns the browser
anywhere, so a checkout built on /blik and /blik-status alone never calls confirm-order and
therefore never reaches the plugin's decrement. Measured on a live instance: a completed BLIK
payment created the order and left stock at 5. Adjust inventory yourself once, when /blik-status
first answers paid.
Record "stock already adjusted" on the order, not in memory. The demo shop keeps that marker in
a process level set, which is fine for a demo and wrong for a shop: a restart forgets it, and the
next paid answer decrements the same transaction again. Persist it on the order document.
A chargeback changes the transaction, not the order. A CHARGEBACK notification sets the
transaction to refunded and leaves the order in processing. A shop that watches orders alone
will not see that the money went back; watch the transaction status, or add a hook that mirrors it.
Finishing an order is not an atomic compare and swap. payload.update with a where clause is a find followed by a per-document write, so there is a narrow window in which the notification and the browser both believe they finished the order. The result is an orphaned order document, never a double charge, since there is only ever one payment. Closing the window would mean bypassing collection hooks, which is the worse trade. The race is decided by whoever attaches an order first, not by the transaction status: a transaction that already has an order gets that same order back, and a transaction with no order gets one on a verified paid notification even when its status has already moved somewhere else, because a settled refusal followed by a late transfer must not cost the buyer their order.
The demo shop adjusts stock from the cart, the order is built from the transaction. Its
/shop/decrement-stock route reads cart.items, while the order created here comes from
transaction.items - the snapshot taken when the payment started. The two lists are the same in
the demo and can differ in a shop, because a cart stays editable after initiate (another tab, a
slow buyer). Adjust stock from the transaction's items, the list the order is actually made of.
The guest cart secret is issued once, by the plugin, when the cart is created. There is no
rotation and this adapter does not add one: anyone holding a copy can prove that cart until it is
purchased, which is exactly why it must not travel in a URL, a log line or an analytics event.
Keep it where the cart lives and send it only in the request body.
Recurring payments, card tokenisation, marketplace transactions and refunds through the API are not implemented.
npm install
npm test # builds, then runs the suite
The suite runs offline against fixtures and a Payload stub: no Tpay account is needed. Certificates for the signature tests are generated at test time with openssl, so no private key is checked in.
dev/ holds a real Payload instance with @payloadcms/plugin-ecommerce and this adapter installed, plus a click-through demo shop: a catalogue, a cart, and a checkout with a six digit BLIK field next to a "pay on the Tpay page" button. A side panel shows what each step actually wrote to the database. It is how the behaviour described in this README was measured, and the quickest way to see the adapter work before wiring it into your own shop.
npm install && npm run build # the host imports the built ../dist
cd dev
pnpm install
export TPAY_CLIENT_ID=... TPAY_CLIENT_SECRET=... TPAY_MERCHANT_ID=... TPAY_SECURITY_CODE=...
export NEXT_PUBLIC_SERVER_URL=https://<public tunnel to 127.0.0.1:8099>
node --import tsx shop.mts # then open http://127.0.0.1:8099/
Sandbox credentials are enough; the host sets sandbox: true itself. The BLIK path needs no tunnel, because it reads the payment state by asking Tpay rather than waiting for a notification; the redirect path does, since Tpay delivers the result as a server to server request that never reaches a local address. dev/README.md covers the tunnel, the scripted runs for an accepted and a refused BLIK code, and an instrument check to run before you trust a silent notification endpoint.
The access configuration in dev/payload.config.ts is deliberately wide open so scripts can drive the instance without logging in. Do not copy it into a shop; the Configure section above says why.
Built and maintained by Wellmade, a studio building Payload and headless commerce shops. It came out of running a Payload shop in production that needed the Polish payment methods Stripe does not cover.
Gaps are listed under Known limitations above; issues and pull requests are welcome, and paid work on this package is possible.
MIT - see LICENSE. Copyright (c) 2026 Wellmade.
stripe
Connect Stripe and Payload CMS to work with Stripe data from your Payload project
10022.2k/wk46.1kv3 v4
payload mercadopago
Mercado Pago Checkout Pro payments, signed webhooks, refunds and reconciliation for Payload
350v3
payload paystack plugin
Sync Payload collections with Paystack resources through webhooks, a REST proxy and customer blacklisting
30143/wk6v3
ecommerce
Ecommerce utilities for Payload with idempotent Stripe confirmation, orders, carts and inventory handling
10019.0k/wk46.1kv3 v4
payload plugin membership
Patreon-style membership tiers and category pledges billed as Stripe subscriptions, with a backers wall
791.5k/wk1v3
payload payments
Credit ledger, credit packs, plans and subscriptions for Payload with a Stripe gateway and a custom gateway contract
75849/wk0v3 v4