{"id":290575,"date":"2026-05-15T15:05:51","date_gmt":"2026-05-15T15:05:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/nyva-pay-for-woocommerce\/"},"modified":"2026-05-15T15:05:17","modified_gmt":"2026-05-15T15:05:17","slug":"nyva-pay-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/nyva-pay-for-woocommerce\/","author":23466753,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.10","stable_tag":"1.0.10","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"NYVA Pay for WooCommerce","header_author":"NyvaPay","header_description":"Accept payments with NYVA Pay. Redirects customers to the NYVA hosted checkout and completes orders via webhook.","assets_banners_color":"","last_updated":"2026-05-15 15:05:17","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/nyvapay.com\/merchant","header_author_uri":"https:\/\/nyvapay.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":48,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.10":{"tag":"1.0.10","author":"nyvapay","date":"2026-05-15 15:05:17"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.10"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[263083,6593,286],"plugin_category":[45],"plugin_contributors":[263084],"plugin_business_model":[],"class_list":["post-290575","plugin","type-plugin","status-publish","hentry","plugin_tags-nyva-pay","plugin_tags-payment-gateway","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-nyvapay","plugin_committers-nyvapay"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/nyva-pay-for-woocommerce.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin adds \"Pay with NYVA\" as a WooCommerce payment method. When the customer chooses NYVA Pay and places the order:<\/p>\n\n<ol>\n<li>The plugin creates a payment session via the NyvaPay API (POST \/api\/merchant\/payment-links).<\/li>\n<li>The customer is redirected to the NyvaPay hosted checkout page.<\/li>\n<li>After payment, NyvaPay sends a webhook to your site; the plugin marks the order as paid and WooCommerce sends the order confirmation email.<\/li>\n<\/ol>\n\n<p><strong>Requirements<\/strong><\/p>\n\n<ul>\n<li>WordPress 5.0 or later<\/li>\n<li>WooCommerce 4.0 or later (tested with WooCommerce 8.x)<\/li>\n<li>PHP 7.4 or later<\/li>\n<li>A NyvaPay merchant account with <strong>Pro subscription<\/strong> and an API key from the NyvaPay dashboard<\/li>\n<\/ul>\n\n<p><strong>API used<\/strong><\/p>\n\n<ul>\n<li><strong>Create payment session:<\/strong> <code>POST {base_url}\/api\/merchant\/payment-links<\/code><\/li>\n<li><strong>Headers:<\/strong> <code>X-Merchant-Email<\/code>, <code>X-API-Key<\/code>, <code>Content-Type: application\/json<\/code><\/li>\n<li><strong>Body:<\/strong> amount, currency, product_name, order (WooCommerce order ID), webhook_url, success_redirect_url, customer_email, customer_name, optional metadata<\/li>\n<li><strong>Response:<\/strong> pay_url (redirect URL), payment_request_id<\/li>\n<\/ul>\n\n<p><strong>Webhook<\/strong><\/p>\n\n<p>When payment completes, NyvaPay POSTs to your webhook URL with a JSON body:<\/p>\n\n<ul>\n<li><strong>Event:<\/strong> <code>payment.succeeded<\/code><\/li>\n<li><strong>Fields:<\/strong> order (your WooCommerce order ID), amount, currency, payment_request_id, transaction_id, status (\"paid\"), product_name, customer_email, customer_name, metadata<\/li>\n<\/ul>\n\n<p>The plugin registers the webhook at: <code>https:\/\/yoursite.com\/wc-api\/nyva_callback\/<\/code> (WooCommerce builds this from your site URL). You do not need to configure this URL in NyvaPay; the plugin sends it automatically when creating each payment.<\/p>\n\n<!--section=installation-->\n<p><strong>Option A: Install like a normal plugin (recommended)<\/strong><\/p>\n\n<ol>\n<li>Build a zip file: from the repo root run <code>.\/woocommerce\/build-plugin-zip.sh<\/code> (or zip the <code>nyva-pay-gateway<\/code> folder yourself).<\/li>\n<li>In WordPress Admin: Plugins \u2192 Add New \u2192 Upload Plugin \u2192 Choose File (select the zip).<\/li>\n<li>Click Install Now, then Activate.<\/li>\n<\/ol>\n\n<p><strong>Option B: Manual folder upload<\/strong><\/p>\n\n<ol>\n<li>Copy the <code>nyva-pay-gateway<\/code> folder to your site's <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>In WordPress Admin: Plugins \u2192 Installed Plugins \u2192 Activate \"NYVA Pay for WooCommerce\".<\/li>\n<\/ol>\n\n<p><strong>Configure the gateway<\/strong><\/p>\n\n<ol>\n<li>Go to WooCommerce \u2192 Settings \u2192 Payments and enable \"NYVA Pay\".<\/li>\n<li>Enter your <strong>Merchant email<\/strong> and <strong>API key<\/strong> from the NyvaPay merchant dashboard. You must have a Pro subscription to use the API.<\/li>\n<li>Save changes. The webhook URL is sent automatically with each payment request; no manual webhook configuration is required.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20does%20the%20plugin%20avoid%20name%20collisions%20%28wordpress.org%20guidelines%29%3F\"><h3>How does the plugin avoid name collisions (WordPress.org guidelines)?<\/h3><\/dt>\n<dd><ul>\n<li><strong>PHP classes:<\/strong> <code>NYVAPAFO_Gateway<\/code> and <code>NYVAPAFO_Blocks_Support<\/code> \u2014 never <code>WC_<\/code> + a short brand prefix.<\/li>\n<li><strong>Functions \/ hooks:<\/strong> <code>nyvapafo_*<\/code> in the main bootstrap file (named functions, not anonymous closures).<\/li>\n<li><strong>Script handles:<\/strong> <code>nyvapafo-checkout-blocks<\/code> for the Blocks checkout script.<\/li>\n<li><strong>Order meta keys:<\/strong> <code>_nyvapafo_payment_request_id<\/code>, <code>_nyvapafo_pay_url<\/code>.<\/li>\n<li><strong>Payment method id:<\/strong> The WooCommerce gateway id stays <code>nyva<\/code> so existing orders, settings (<code>woocommerce_nyva_settings<\/code>), and the REST callback <code>wc-api\/nyva_callback<\/code> remain stable.<\/li>\n<\/ul><\/dd>\n<dt id=\"do%20i%20need%20to%20set%20a%20webhook%20url%20in%20nyvapay%3F\"><h3>Do I need to set a webhook URL in NyvaPay?<\/h3><\/dt>\n<dd><p>No. The plugin sends the WooCommerce webhook URL (wc-api\/nyva_callback) when creating each payment, so NyvaPay knows where to send the payment.succeeded callback.<\/p><\/dd>\n<dt id=\"orders%20stay%20%22on%20hold%22%20after%20payment\"><h3>Orders stay \"On hold\" after payment<\/h3><\/dt>\n<dd><p>Check that your site is reachable from the internet at the URL WooCommerce uses for the webhook. Logs are in WooCommerce \u2192 Status \u2192 Logs (source: nyva-pay-for-woocommerce).<\/p><\/dd>\n<dt id=\"500%20error%20when%20clicking%20place%20order\"><h3>500 error when clicking Place Order<\/h3><\/dt>\n<dd><ol>\n<li>Enable WordPress debug logging: add to wp-config.php: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);<\/li>\n<li>Check wp-content\/debug.log for the PHP error.<\/li>\n<li>Check WooCommerce \u2192 Status \u2192 Logs for \"nyva-pay-for-woocommerce\" entries.<\/li>\n<li>Ensure the site URL is correct in WordPress Settings \u2192 General (the webhook URL is built from it).<\/li>\n<li>If using a staging URL (e.g. tbb.317.mytemp.website), ensure it is reachable from the internet so NyvaPay can send the webhook.<\/li>\n<\/ol><\/dd>\n<dt id=\"%22unable%20to%20fix%20malformed%20json%22%20in%20the%20browser%20console%20%28e.g.%20with%20funnelkit%29\"><h3>\"Unable to fix malformed JSON\" in the browser console (e.g. with FunnelKit)<\/h3><\/dt>\n<dd><p>WooCommerce <strong>block<\/strong> and <strong>classic<\/strong> checkouts both expect <strong>only JSON<\/strong> in checkout AJAX responses. <strong>Extra PHP output<\/strong> (notices, HTML, or BOM) before that JSON breaks parsing. <strong>Use plugin 1.0.9+<\/strong> (output buffering around NYVA Pay processing on classic checkout, plus safer block payment data in 1.0.7+). On production set <code>WP_DEBUG_DISPLAY<\/code> to <strong>false<\/strong> so notices are not printed into the response. If it persists, temporarily switch theme \/ disable other plugins and inspect <code>wp-content\/debug.log<\/code>.<\/p><\/dd>\n<dt id=\"customer%20%E2%80%9Cprocessing%20order%E2%80%9D%20email%20not%20sent%20after%20nyva%20pay%20%28funnelkit%2C%20smtp%2C%20etc.%29\"><h3>Customer \u201cprocessing order\u201d email not sent after NYVA Pay (FunnelKit, SMTP, etc.)<\/h3><\/dt>\n<dd><p>WooCommerce should send emails when the order moves to <strong>processing<\/strong> after <code>payment_complete()<\/code>. If another plugin suppresses that, add to a small custom plugin or <code>functions.php<\/code>:<\/p>\n\n<pre><code>add_filter( 'nyvapafo_trigger_processing_order_email', '__return_true' );\n<\/code><\/pre>\n\n<p>This asks NYVA Pay to <strong>also<\/strong> trigger WooCommerce\u2019s <strong>Customer processing order<\/strong> email right after the Nyva webhook marks the order paid. Remove the filter once you have fixed the conflicting plugin.<\/p><\/dd>\n<dt id=\"nyvapay%20merchant%20%E2%80%9Csale%20received%E2%80%9D%20email%20%28dashboard%29\"><h3>NyvaPay merchant \u201csale received\u201d email (dashboard)<\/h3><\/dt>\n<dd><p>That email is sent by <strong>Nyva\u2019s servers<\/strong> (not WordPress) when a payment link is paid. The store owner must have <strong>email notifications<\/strong> enabled in NyvaPay \u2192 <strong>Settings<\/strong> (\u201cPayment received\u201d), a valid account email, and the Nyva deployment must have <strong>Resend<\/strong> configured (<code>RESEND_API_KEY<\/code> and a verified sending domain). If sales complete in WooCommerce but you never get the Nyva sale email, check NyvaPay logs\/support \u2014 WordPress SMTP plugins do not affect that path.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.10<\/h4>\n\n<ul>\n<li><strong>Branding:<\/strong> Checkout and Blocks UI now use the same Nyva app icon as nyvapay.com (<code>nyva-brand-icon.png<\/code>, copied from the main product icon). Removed the old standalone SVG mark to avoid drift.<\/li>\n<li><strong>WooCommerce emails:<\/strong> Optional <code>nyvapafo_trigger_processing_order_email<\/code> filter (return true) to force-send the customer \u201cprocessing order\u201d email after <code>payment_complete<\/code> when another plugin suppresses core mail (e.g. some funnel\/SMTP stacks). See FAQ.<\/li>\n<li><strong>Nyva merchant notifications:<\/strong> When a logged-in customer pays a payment link (<code>payment_request<\/code> Whop path), the platform now sends the merchant \u201csale received\u201d email\/push even though the ledger path marks the request paid before the legacy transfer helper runs (that helper skipped notifications when status was no longer <code>open<\/code>).<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li><strong>Classic checkout \/ FunnelKit:<\/strong> Wraps payment processing in output buffering so stray PHP notices or whitespace from this gateway\u2019s code path cannot corrupt the AJAX JSON response (fixes browser console \"Unable to fix malformed JSON #1\" when placing an order). Check WooCommerce \u2192 Status \u2192 Logs (<code>nyva-pay-for-woocommerce<\/code>) if warnings are logged about suppressed output \u2014 often indicates another plugin or <code>WP_DEBUG_DISPLAY<\/code> on production.<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li><strong>Critical:<\/strong> <code>nyva-pay-gateway.php<\/code> now includes a full WordPress plugin header (<code>Plugin Name<\/code>, <code>Version<\/code>, etc.). WordPress disables plugins without a valid header; older releases only had a comment stub on this legacy filename.<\/li>\n<li><strong>UX:<\/strong> The legacy bootstrap file is hidden from the Plugins list (via <code>all_plugins<\/code>) so you still see a single \u201cNYVA Pay for WooCommerce\u201d row when both PHP entry files exist in the folder.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li><strong>Blocks \/ FunnelKit:<\/strong> Payment method data for the block checkout no longer calls <code>get_available_payment_gateways()<\/code> (which runs <code>is_available()<\/code> on every gateway and can break JSON responses when other gateways or funnel plugins log notices). Single-method detection now uses enabled toggles only.<\/li>\n<li><strong>Blocks:<\/strong> Title and description sent to the checkout block script are normalized to plain UTF-8 text (tags stripped) so payloads stay valid JSON.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Compliance: Replaced remote icon URL references with bundled local icon assets for gateway + blocks.<\/li>\n<li>Compliance: Added standard main plugin entrypoint file <code>nyva-pay-for-woocommerce.php<\/code>.<\/li>\n<li>Build: Standardized zip output name to <code>nyva-pay-for-woocommerce.zip<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li><strong>Naming \/ collisions:<\/strong> All PHP classes use the <code>NYVAPAFO_<\/code> prefix (never <code>WC_<\/code> + brand). Bootstrap hooks use named functions <code>nyvapafo_*<\/code> (no anonymous callbacks in the main plugin file).<\/li>\n<li><strong>Assets:<\/strong> Blocks script handle is now <code>nyvapafo-checkout-blocks<\/code> (not a generic <code>nyva-pay-*<\/code> handle).<\/li>\n<li><strong>Order meta:<\/strong> Stores <code>_nyvapafo_payment_request_id<\/code> and <code>_nyvapafo_pay_url<\/code> (prefixed, private-style keys). Optional override constant <code>NYVAPAFO_PAY_API_BASE_URL<\/code> (legacy <code>NYVA_PAY_API_BASE_URL<\/code> still supported).<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li><strong>WordPress.org guidelines:<\/strong> Renamed gateway classes to use a distinct plugin prefix (<code>NYVAPAFO_*<\/code> instead of <code>WC_NYVA_*<\/code>) and prefixed bootstrap functions with <code>nyvapafo_<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li><strong>Subscription support:<\/strong> With WooCommerce Subscriptions, NYVA Pay now supports recurring payments. Balance subscriptions charge the customer's NYVA wallet each billing period; webhooks (subscription.payment_succeeded, subscription.payment_failed, subscription.cancelled) update renewal orders and subscription status automatically.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li><strong>Order summary:<\/strong> Sends line items (name, qty, total, product image URL) in metadata so the NYVA Pay checkout page can show multiple products with thumbnails when the cart has more than one item.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li><strong>WooCommerce checkout UX:<\/strong> Redirect URL now includes <code>source=woo<\/code> so the NYVA Pay page loads the payment form directly (no \"Pay as Guest\" step) and shows \"Pay with NYVA balance if you have an account\" at the top. Merchants should update to this version for the improved store checkout experience.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release. Register NYVA Pay gateway, create payment via merchant API, redirect to pay_url, handle payment.succeeded webhook and complete order.<\/li>\n<\/ul>","raw_excerpt":"Accept payments with NYVA Pay. Customers are redirected to the NYVA hosted checkout and orders are completed via webhook.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/290575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=290575"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/nyvapay"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=290575"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=290575"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=290575"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=290575"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=290575"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=290575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}