In short
To add iyzico or PayTR to WooCommerce, install the official plugin, enter the API keys from your merchant panel and run a test payment in sandbox mode first. Your site must run on HTTPS with a valid SSL certificate, and the payment provider's callback request must not be blocked by a firewall, cache or maintenance mode. A blocked callback is the most common reason orders get stuck in 'Pending payment'.
In this guide
Adding iyzico or PayTR (two of Türkiye's most widely used online card payment providers, known locally as "sanal POS" or virtual POS) to WooCommerce takes three steps: install the provider's official plugin, enter the keys from your merchant panel, and run an end-to-end test payment in test mode before going live. Setup usually takes about 15 minutes. Most of the time is lost on callback and SSL issues, such as an order that never updates even though the payment went through. This guide covers both gateways and how to diagnose those problems.
Before you start: prerequisites
Payment gateway integration is technically simple, but if a few prerequisites are missing, the checkout flow will not complete no matter how well the plugin is configured.
- An approved merchant account: iyzico and PayTR issue live keys only after reviewing your application and your website. They expect a distance sales agreement, a return policy, a KVKK privacy notice (KVKK is Türkiye's personal data protection law) and your contact details to be visible on the site.
- A valid SSL certificate: The checkout page and the callback URL must run over HTTPS. A free AutoSSL / Let's Encrypt certificate is enough; see the free SSL certificate installation guide for setup.
- Up-to-date WordPress, WooCommerce and PHP: Payment plugins can throw errors on old PHP versions. Use a current, supported version in the cPanel PHP selector.
- Correct currency and permalinks: The WooCommerce currency must be TRY (Turkish lira), and permalinks must use any structure other than "Plain".
If you haven't configured WooCommerce yet, complete WooCommerce installation and initial settings for Türkiye first. On the infrastructure side, an e-commerce hosting plan with WordPress and WooCommerce preinstalled via WP Toolkit covers most of these prerequisites from day one.
iyzico WooCommerce integration
iyzico offers an official WooCommerce plugin published in the WordPress plugin directory. Always use the official plugin instead of third-party copies; code that touches your checkout flow should come from a known source.
Setup steps
- In the WordPress admin, go to Plugins > Add New, search for "iyzico", then install and activate the official iyzico WooCommerce plugin.
- Open the iyzico row under the WooCommerce > Settings > Payments tab.
- Select the test (sandbox) environment first. Sign up for iyzico's sandbox panel with a separate account and get your API Key and Security Key (secret key) there.
- Paste the keys into the matching fields without any spaces and save.
- Choose how the payment form is displayed (on-page form or redirect) and which status to assign when an order is completed. If you sell physical products, the default "Processing" status is usually right.
Test payment
In sandbox mode, you pay with the test cards published in iyzico's developer documentation. A commonly used test card is the MasterCard 5528790000000008; enter any future expiration date and any three digits for the CVC. Check the current list of test cards, including cards that simulate failed transactions, in the iyzico developer documentation.
During testing, confirm that the 3D Secure screen opens, the customer returns to the thank-you page after payment, the order status changes automatically and the order emails are sent. If all four work, repeat the same test with live keys and a small charge on a real card, then refund it from the panel.
PayTR WooCommerce integration
PayTR provides a WooCommerce plugin based on its iFrame API. Customers enter their card details not on your site but in PayTR's payment frame embedded in your page. Card data never touches your server, which reduces your payment security burden.
Setup steps
- Get your Merchant ID (merchant_id), Merchant Key (merchant_key) and Merchant Salt (merchant_salt) from the PayTR merchant panel.
- Install and activate PayTR's WooCommerce plugin, then enter these three values under WooCommerce > Settings > Payments.
- Copy the notification (callback) URL shown on the plugin's settings screen.
- Save this address in the notification URL setting of the PayTR merchant panel, making sure it starts with
https://. - Keep test mode on in the merchant panel and run a test payment with the test cards in PayTR's documentation.
Why does the callback (notification URL) matter so much?
The callback is the server-to-server HTTP POST request the payment provider uses to report the transaction result. It updates the order even if the customer's browser never returns to the thank-you page (they close the tab or lose their connection). PayTR expects a plain-text OK in response to the notification; if it doesn't get it, it retries the notification and your order stays in "Pending payment".
You can quickly check from outside that the callback URL works. The command below should return a short response from the plugin, not an error page, a redirect loop or a 403:
curl -i -X POST https://alanadiniz.com/BILDIRIM-URL-YOLU
If the response is 301/302, an HTTP-to-HTTPS or www redirect is in play; enter the final address, without redirects, in the panel. If it returns 403, a security rule is blocking the request.
iyzico vs. PayTR comparison
| Topic | iyzico | PayTR |
|---|---|---|
| Credentials | API key + security key | Merchant ID + merchant key + merchant salt |
| Test environment | Separate sandbox account and keys | Test mode in the merchant panel |
| Where card data is entered | iyzico payment form | PayTR iFrame |
| Result notification | The plugin manages the return URL itself | A notification URL must be entered in the panel |
| Critical check | Cart session after the return | The callback's OK response |
Commission rates, installment options and payout times are set by contract for each merchant, so they are not included in this table; get quotes directly from the payment providers.
Common payment errors and how to fix them
Payment received but the order is stuck in "Pending payment"
Almost always, the callback request never reached your site. Check the following in order:
- Is maintenance mode or a "coming soon" plugin active? These plugins block the callback too.
- Is a security plugin, a ModSecurity rule or country-based blocking blocking the payment provider's servers? Look for 403 entries in the cPanel error logs that match the callback time; the cPanel access and error logs article helps with reading logs.
- Does the site use HTTP authentication (directory password protection)? This is often forgotten on staging sites.
- Does the notification URL point to an old domain or an HTTP address?
The cart empties or the customer gets logged out after returning from the bank
After 3D Secure, the bank page returns to your site with a POST request. Because of browser cookie policies, the session cookie may not be sent on this return. Use the latest version of the plugin, review any security settings that modify session cookies and make sure the return URL isn't cached.
Hash or token error
In PayTR, "paytr_token" or hash validation errors are usually caused by an incorrectly copied key, mixed-up test and live credentials, or the cart total being passed to the plugin differently. Copy the keys again and make sure test mode matches in both the panel and the plugin.
The checkout page shows a "Not secure" warning
If the page loads images or scripts over HTTP (mixed content), the browser may block the payment frame. Switch all site URLs to HTTPS and force the HTTPS redirect.
Odd errors caused by caching
LiteSpeed Cache excludes the WooCommerce cart, checkout and my-account pages from caching by default; still, if you use another cache or CDN layer, exclude these pages and the callback URL from caching.
The customer IP is passed incorrectly
PayTR requires the customer's IP address when generating the token. If a CDN or proxy sits in front of your site, the server sees the proxy address instead of the real customer IP, which can lead to transactions being rejected by security checks. If you use a proxy, verify that the real visitor IP is passed to the server in the correct header.
Use logs for diagnosis
WooCommerce keeps payment plugin error records on the WooCommerce > Status > Logs screen. If you've enabled debug logging in the plugin settings, you'll see the error message returned by the payment provider here. Comparing this entry with the callback request in the cPanel access log at the same timestamp usually shows at a glance which side the problem is on. Remember to turn off debug logging once the issue is fixed; unnecessary customer data shouldn't pile up in the logs.
Go-live checklist
- Test mode is off and live keys are entered.
- A small payment was made with a real card and the order updated automatically.
- The order email reached both the customer and the admin.
- A refund was tested from the panel and the order notes in WooCommerce were checked.
- The checkout and return pages are excluded from caching.
Next step: hosting built for payment processing
Whether your payment gateway integration runs smoothly depends heavily on the infrastructure: a valid SSL certificate, a reachable callback URL and a server that responds at the moment of the order. Sunucu Atlas E-Commerce Hosting plans install WordPress + WooCommerce with WP Toolkit, and a free SSL certificate and the LiteSpeed web server are included. For a new store, the SA-ET-1 e-commerce hosting plan with 3 GB RAM and a 3-core CPU is a good starting point; as your products and orders grow, you can move up to the SA-ET-2 plan in the same group. If you get stuck during setup, open a support ticket and our support team will help.
Frequently asked questions
Is the iyzico plugin for WooCommerce free?
iyzico's official WooCommerce plugin is a free download from the WordPress plugin directory. The commission charged per payment is set by your contract with iyzico.
Can I use iyzico and PayTR on the same site?
Yes, WooCommerce supports multiple payment methods at the same time. Activate both plugins and set their order on the checkout page in the WooCommerce payment settings.
Do I need a paid SSL certificate for a payment gateway?
No. Payment providers require HTTPS with a valid SSL certificate; a free AutoSSL or Let's Encrypt certificate provides the same encryption as a paid DV certificate.
The payment succeeded but the order status doesn't change. Why?
The most common cause is that the payment provider's callback request can't reach your site. Maintenance mode, security plugins, ModSecurity rules or a wrong notification URL can block this request.
Is real money charged in test mode?
No. Test mode uses only the test cards published by the payment provider, and no real charge is made. After going live, verify the flow again with a small real payment.