
PayTR for OpenCart — card payments and installments (taksit) via the PayTR iFrame API
Card payments in Turkey through the PayTR iFrame API for OpenCart 4, 3 and 2.3: the PayTR form on a store page, an order becomes paid only on a signed PayTR notification or a Status Inquiry answer, amount and currency checks, TRY / EUR / USD / GBP / RUB. Pro — an installment (taksit) table on the product page, "single payment only" for categories and products, installment interest as an order line, a payment journal with re-check and refunds. Lifetime licence.
- Compatibility
- OpenCart 4.0.2 – 4.1.x, 3.0.x and 2.3.0.2 (tested on 4.1.0.3, 4.0.2.3 with the pdo driver, 3.0.5.0 on PHP 8.2 and 2.3.0.2 on PHP 7.0) · default checkout · module languages English and Türkçe · currencies TRY, EUR, USD, GBP, RUB
- Version
-
v1.0.0 (OpenCart 4)
v1.0.0 (OpenCart 3.x)
v1.0.0 (OpenCart 2.3) - Licence
- one site, lifetime
- Trial
- 7 days, no card, one per site
What Free has,
and what Pro adds
The free version works with no time limit. Pro adds the rest of the features in the table.

The trial starts when you ask
A fresh install is the free version, nothing switches on by itself. The “Try Pro for 7 days” button → e-mail → the key right in the window and by e-mail.

One key — one site
Moving the store? Unbind the licence on the old domain and activate it on the new one yourself. For studios — keys for 5 or 25 sites, or unlimited.
Technical requirements
OpenCart 4.0.2 – 4.1.x, 3.0.x or 2.3.0.2; PHP 7.0+ (for OpenCart 4 — the PHP version your OpenCart requires), curl and openssl extensions.
A PayTR merchant account (Mağaza No, Mağaza Parola, Mağaza Gizli Anahtar) with the iFrame API enabled.
A storefront reachable from the internet — so PayTR can send notifications to the Notification URL; SSL recommended.
Frequently bought with PayTR for OpenCart
4 modules in one order — 40% cheaper than separately


Nova Poshta Premium — a Nova Poshta module for OpenCart 2.3, 3.x and 4.x

LiqPay — Card Payments for OpenCart 2.3, 3.x and 4.x

Telegram notifications and Viber/SMS for customers for OpenCart
Full module description
PayTR for OpenCart connects the Turkish payment service PayTR through its iFrame API: the buyer pays by card in the PayTR form right on a store page, with 3D Secure and installments (taksit), and the order becomes paid only when PayTR has confirmed it with a signed notification. One module for OpenCart 4, 3 and 2.3, languages English and Türkçe.
Honestly about testing. We do not have a PayTR merchant account, so we have not made real payments through PayTR. The module is written from the official dev.paytr.com documentation (signature formulas, request and response fields) and tested in clean stores on OpenCart 4.1.0.3, 4.0.2.3 (pdo driver), 3.0.5.0 and 2.3.0.2 on PHP 7.0 against a test server that checks signatures the way the PayTR documentation describes. We ran real storefront checkouts with a coupon, shipping, product options, in a second currency (EUR) and in Turkish, a declined card, repeated and forged notifications, a return before the notification, a double payment, a cart change during payment and refunds from the admin — checking the order and its total lines in the database. Before going live, make a few payments in PayTR test mode on your own account — the 7-day Pro trial is there for that.
Running WooCommerce? There is a separate PayTR for WooCommerce plugin: the same PayTR form (iFrame API) at the classic and block checkout, signed notifications and Status Inquiry, and in Pro an installment table on the product page and refunds from the order screen.
⚠ One Notification URL per PayTR account
PayTR sends the result of every payment to the address set in the panel: Mağaza Paneli → Ayarlar → Bildirim URL. It is a single field in the store settings. If another site or another PayTR module already uses the same PayTR account, notifications will arrive at only one of the addresses, and some orders will not be confirmed automatically.
- The most reliable way is a separate PayTR account for each store; if in doubt, ask PayTR support.
- Our module answers “OK” to notifications with foreign merchant_oid values and changes nothing, so it does not get in the way of another site if the address points to ours.
- The module checks its own orders once more through Status Inquiry when the buyer returns to the store after paying, and the journal (Pro) has a “Re-check” button.
What the buyer sees
- The “Kredi / banka kartı (PayTR)” payment method at the checkout — in Turkish lira and in the currencies PayTR has enabled for the store (EUR, USD, GBP, RUB). In other currencies the method is not shown.
- The PayTR form on a store page: after “Pay by card” the “Kartla ödeme” page opens with the PayTR form inside (iFrame), its height follows the form. In test mode a warning above the form says no money is charged.
- Return to the store: after payment — the “Thank you” page, after a decline — the checkout with the same cart, and “Pay” can be pressed again right away.
- The installment table (Pro) on the product page: as a tab next to the description or under the “Add to cart” button, the monthly payment and total for every card programme.
What the admin gets
- Settings: Mağaza No, Mağaza Parola (key) and Mağaza Gizli Anahtar (salt) — the key and salt are stored encrypted and not shown after saving; the “Check credentials” button makes a signed request to PayTR with the details on screen.
- A ready Notification URL for the PayTR panel — with https if the storefront is on SSL.
- Installments: all options, up to N payments (2–12) or single payment only; test mode; form language; payment time limit; geo zone; statuses for paid, review, declined and refunded.
- History in every order: amount, number of payments, merchant_oid and where the confirmation came from (notification or Status Inquiry); on a decline — the reason from PayTR.
- Debug log
cc_paytr.logwithout keys, salt or signatures.
Protection against payment errors
- Paid — only by PayTR. Browser redirects mark nothing: the status changes only on a notification with a valid HMAC-SHA256 signature or a Status Inquiry answer.
- Amount check. The attempt amount, currency, collected amount and current order total must match; otherwise a “review” status with an explanation of what exactly is wrong.
- Retries without duplicates. PayTR repeats a notification until it gets “OK”: the module counts only the first one and answers exactly “OK”, without a single extra character.
- A double payment is not lost. If the buyer paid the same order twice (two tabs), the status does not change, and the history gets an entry about the second payment — so you can refund it in the PayTR panel.
- The “Back” button after payment will not send the same order to PayTR again.
Pro: installment table, interest in the order, journal and refunds
- Installment table (taksit tablosu) on the product page: World, Bonus, Axess, Maximum, CardFinans, Paraf, Advantage, Combo — rates from the PayTR Installment Rates service, refreshed once a day. Show amounts with interest (the buyer pays) or without it (peşin fiyatına).
- Single payment only for selected categories (with their subcategories) and products: PayTR receives no_installment=1, the table is not shown.
- Installment interest in the order: the difference between the collected amount and the goods total is added once as an “Installment interest (N installments)” line — the order total equals what the buyer paid.
- Payment journal: received, interest, installments, test / live, merchant_oid, refunded.
- Refunds from the admin: full or partial, several times in a row; negative, non-numeric and above-remaining amounts are rejected, the “Refunded” status is set only after a full refund.
How it works step by step
- The buyer picks “Kredi / banka kartı (PayTR)” and presses “Pay by card”.
- The module creates a payment attempt with its own merchant_oid and gets a form token from PayTR (iFrame API, step 1) with the order amount, cart, currency and installment settings.
- The buyer pays in the PayTR form on a store page; 3D Secure and the number of payments are chosen in the PayTR form.
- PayTR sends the result to the Notification URL (step 2). The module checks the signature, compares the amount and currency, changes the order status and answers “OK”.
- The buyer returns to the “Thank you” page. If the notification has not arrived yet, the module asks PayTR once through Status Inquiry.
Under the hood
- PayTR iFrame API: get-token with an HMAC-SHA256 signature per the dev.paytr.com documentation, notifications with a hash check, Status Inquiry (durum-sorgu), Refund (iade), Installment Rates (taksit-oranlari).
- The module’s own tables for payment attempts, payments and rates; settings are written key by key, without overwriting the whole group.
- No core edits and no OCMOD: a standard OpenCart payment extension and an event on the product page for the installment table.
- After the module is uninstalled the payment tables stay — the journal and refunds are available after reinstalling.
Installation
- OpenCart 4 and 3: “Extensions → Installer” → upload the zip for your version. OpenCart 2.3: copy the contents of the
upload/folder from the archive to the store root. - “Extensions → Payments” → PayTR (CatCode) → install → edit.
- Enter Mağaza No, Mağaza Parola and Mağaza Gizli Anahtar from the PayTR panel (Destek & Kurulum → Entegrasyon Bilgileri), press “Check credentials”.
- Copy the Notification URL from the module settings to the PayTR panel: Ayarlar → Bildirim URL → Değiştir.
- Turn on test mode, make a test payment, then turn it off.
Versions
- 1.0.0 — first release: iFrame API, Notification URL, Status Inquiry, amount and currency checks, installment table, “single payment only”, installment interest in the order, journal and refunds; OpenCart 4, 3 and 2.3; English and Türkçe.
Questions
about the module
Didn't find the answer? Message us on Telegram and we'll reply within a business day.
I have one PayTR account for several sites. Will the module fit?
Carefully. The PayTR panel has a single "Bildirim URL" (Notification URL) field in the store settings, so payment notifications go to one address only. If another site or another PayTR module already works on the same account, some notifications will go elsewhere. Our module answers "OK" to foreign notifications and changes nothing, and checks its own orders once more through Status Inquiry when the buyer returns to the store. The reliable way is a separate PayTR account for each store; if in doubt, ask PayTR support.
What happens if the buyer closes the tab right after paying?
The order still becomes paid as soon as PayTR sends the notification to the Notification URL: the module checks its signature and amount. If the buyer came back to the store before the notification, the module asks PayTR itself through Status Inquiry. Until PayTR answers, the order has status 0 (in the "Missing Orders" list), as with PayPal for OpenCart.
Can someone mark an order as paid just by opening the "Thank you" page?
No. The return page does not mark a payment: only a signed PayTR notification or a Status Inquiry answer makes an order paid, and both are checked against the amount and currency of the attempt. We tested a forged notification and a forged return link — the order did not change.
The buyer changed the cart in another tab while the payment form was open. What then?
The module compares the paid amount with the current order total. If they differ, the order gets a "review" status with an explanation in the history instead of "paid" — so you do not ship more than you received.
How is the installment table calculated?
From the rates of the PayTR Installment Rates service (cached for a day), based on the product price with tax, for prices in Turkish lira only. You can show amounts with interest (the buyer pays) or without it (peşin fiyatına, the store pays). The table is indicative: PayTR shows the exact amount in its form before confirmation, and this is written under the table.
Can I accept payments in euros or dollars?
Yes, if PayTR has enabled these currencies for your store: the module sends the order currency (EUR, USD, GBP, RUB) and the amount in it. In currencies PayTR does not accept, the payment method is not shown.
How do I test before going live?
Turn on "Test mode" — the module sends test_mode=1 and PayTR runs a test payment without charging. You need your details from the PayTR panel for this (Mağaza No, Mağaza Parola, Mağaza Gizli Anahtar).
What happens when the Pro trial ends?
Card payments, notifications, Status Inquiry and the checks keep working — that is Free. The installment table disappears from the product page, and the journal and refunds from the admin become unavailable until you buy a licence. An OpenCart licence is bought once and is valid forever.
No reviews yet. Be the first.
No questions yet. Ask one — we answer within 24 hours.
Not quite what you are looking for?
We build custom modules for WordPress, WooCommerce, OpenCart and Shopify. Tell us about the task and we'll prepare an estimate.
Order a custom module
Buying the module
—



