{"id":353775,"date":"2026-10-20T11:48:21","date_gmt":"2026-10-20T11:48:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mada-bnpl-gateway-for-woocommerce\/"},"modified":"2026-10-20T11:47:51","modified_gmt":"2026-10-20T11:47:51","slug":"mada-bnpl","status":"publish","type":"plugin","link":"https:\/\/cor.wordpress.org\/plugins\/mada-bnpl\/","author":23528792,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.7","stable_tag":"1.1.7","tested":"7.1.4","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Mada BNPL Gateway for WooCommerce","header_author":"Mada","header_description":"Accept Buy Now, Pay Later payments via the Mada BNPL platform. Redirect-based checkout with signed order webhooks.","assets_banners_color":"0b8b92","last_updated":"2026-10-20 11:47:51","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/mada-bnpl.com","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":10,"downloads":127,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.1.7":{"tag":"1.1.7","author":"madabnpl","date":"2026-10-20 11:47:51","revision":3756599}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3756754,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3756754,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3756754,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3756754,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.7"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[193715,51755,276265,6593,286],"plugin_category":[45],"plugin_contributors":[287702,287701],"plugin_business_model":[],"class_list":["post-353775","plugin","type-plugin","status-publish","hentry","plugin_tags-bnpl","plugin_tags-installments","plugin_tags-mada","plugin_tags-payment-gateway","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-mada","plugin_contributors-madabnpl","plugin_committers-madabnpl"],"banners":{"banner":"https:\/\/ps.w.org\/mada-bnpl\/assets\/banner-772x250.png?rev=3756754","banner_2x":"https:\/\/ps.w.org\/mada-bnpl\/assets\/banner-1544x500.png?rev=3756754","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/mada-bnpl\/assets\/icon-128x128.png?rev=3756754","icon_2x":"https:\/\/ps.w.org\/mada-bnpl\/assets\/icon-256x256.png?rev=3756754","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This gateway integrates WooCommerce with the Mada BNPL payment platform:<\/p>\n\n<ul>\n<li>On checkout it calls <code>POST \/engine\/merchant\/online\/orders<\/code> with your <code>X-Merchant-Api-Key<\/code> and redirects the shopper to Mada's hosted checkout portal.<\/li>\n<li>The order is confirmed asynchronously by an HMAC-SHA256 signed <code>ORDER<\/code> webhook (<code>X-Signature: &lt;hex&gt;<\/code>).<\/li>\n<li>Supports both classic WooCommerce checkout and WooCommerce Checkout Blocks.<\/li>\n<li>Displays responsive promotional installment widgets on product and cart pages.<\/li>\n<\/ul>\n\n<h3>External Services<\/h3>\n\n<p>This plugin connects to external services operated by Mada BNPL to process Buy Now Pay Later payment sessions, render promotional installment breakdown widgets, and verify order statuses.<\/p>\n\n<ul>\n<li><strong>Service Name:<\/strong> Mada BNPL Merchant API &amp; CDN (<code>https:\/\/api.mada-bnpl.com<\/code>, <code>https:\/\/api.sandbox.mada-bnpl.com<\/code>, <code>https:\/\/cdn.mada-bnpl.com<\/code>)<\/li>\n<li><strong>Purpose:<\/strong> Used during checkout to initiate BNPL payment sessions, render promotional installment widgets on product and cart pages, process order webhooks, and verify transaction completion.<\/li>\n<li><strong>Data Transmitted:<\/strong> Order total amount, currency code, line item titles, quantities, unit prices, product URLs, image URLs, customer name, email address, phone number, and shipping address when an order is placed.<\/li>\n<li><strong>Terms of Service:<\/strong> https:\/\/mada-bnpl.com\/en\/legal\/terms<\/li>\n<li><strong>Privacy Policy:<\/strong> https:\/\/mada-bnpl.com\/en\/legal\/privacy-policy<\/li>\n<\/ul>\n\n<h3>Source Code &amp; Build Tools<\/h3>\n\n<p>This plugin includes complete, unminified, human-readable source files for its WooCommerce integration code:<\/p>\n\n<ul>\n<li>The storefront promotional widget is loaded from <code>https:\/\/cdn.mada-bnpl.com<\/code> for the selected environment.<\/li>\n<li>The WooCommerce Checkout Blocks integration script source is located at <code>assets\/js\/blocks.js<\/code>.<\/li>\n<li>The Mada Payment Widget bundle is loaded from the Mada BNPL CDN for the environment selected in the gateway settings.<\/li>\n<li><strong>Mada Payment Widget source code:<\/strong> https:\/\/github.com\/ahbmer3i\/mada-payment-widget<\/li>\n<li><strong>Build instructions:<\/strong> Clone the source repository, run <code>npm ci<\/code>, then run <code>npm run build:bundle<\/code>. The generated CDN bundle is <code>dist\/bundle.js<\/code>.<\/li>\n<\/ul>\n\n<h3>Webhook &amp; Status Mapping<\/h3>\n\n<p>The webhook <code>eventStatus<\/code> maps to WooCommerce as:<\/p>\n\n\n\n\n  Mada eventStatus\n  WooCommerce Result\n\n\n\n\n  SUCCESS\n  payment_complete (paid)\n\n\n  SETTLED\n  payment_complete (paid)\n\n\n  PENDING\n  on-hold\n\n\n  CANCELLED\n  cancelled\n\n\n  EXPIRED\n  failed\n\n\n  REJECTED\n  failed\n\n\n\n\n<h3>Order Correlation<\/h3>\n\n<p>Each WooCommerce order is sent to Mada with <code>reference_id = mg_{orderId}_{timestamp}<\/code>, which Mada BNPL stores and echoes back in the ORDER webhook. The plugin resolves an incoming webhook to a WooCommerce order in this order:<\/p>\n\n<ol>\n<li><code>reference_id<\/code> (<code>mg_{id}_{timestamp}<\/code>) -&gt; WC order.<\/li>\n<li>Stored Mada <code>orderId<\/code>.<\/li>\n<li>Stored Mada <code>orderReference<\/code>.<\/li>\n<li>Stored <code>checkoutId<\/code>.<\/li>\n<\/ol>\n\n<h3>Reconciliation (Safety Net)<\/h3>\n\n<p>The webhook is the source of truth, but confirmation never depends on it alone:<\/p>\n\n<ul>\n<li>On the success return URL the plugin calls <code>GET \/engine\/merchant\/orders\/{id}<\/code> and confirms the order if payment status is completed.<\/li>\n<li>A 15-minute WP-Cron sweep (<code>mada_bnpl_reconcile_cron<\/code>) reconciles any pending Mada orders from the last 24h via their stored order IDs.<\/li>\n<\/ul>\n\n<h3>Branding \/ Appearance<\/h3>\n\n<p>The payment method renders as the Mada badge (logo + title + description) on both classic and Blocks checkout, matching the Mada design system. Styling lives in <code>assets\/css\/checkout.css<\/code>; the logo is loaded from the environment CDN.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Copy this folder to <code>wp-content\/plugins\/woocommerce-mada-bnpl-gateway<\/code> (or zip it and upload via Plugins &gt; Add New &gt; Upload).<\/li>\n<li>Activate <strong>Mada BNPL Gateway for WooCommerce<\/strong>.<\/li>\n<li>Go to <strong>WooCommerce &gt; Settings &gt; Payments &gt; Mada BNPL<\/strong> and configure:\n\n<ul>\n<li><strong>Environment<\/strong>: Development, Staging, Sandbox, or Production.<\/li>\n<li><strong>Merchant API Key<\/strong>: Your <code>X-Merchant-Api-Key<\/code> from the Mada merchant portal.<\/li>\n<li><strong>Webhook signing secret<\/strong>: The secret issued with your webhook key in the Mada portal.<\/li>\n<\/ul><\/li>\n<li>In the Mada merchant portal, create an <strong>ORDER<\/strong> webhook pointing at the endpoint shown in gateway settings (<code>rest_url('mada-bnpl\/v1\/webhook')<\/code>).<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.1.7<\/h4>\n\n<ul>\n<li>Show Arabic checkout copy and RTL punctuation when the store is Arabic.<\/li>\n<\/ul>\n\n<h4>1.1.6<\/h4>\n\n<ul>\n<li>Shrink and wrap the checkout payment badge on narrow screens so the logo and copy stay inside the card.<\/li>\n<li>Sit the subtitle in the text column, flush with the start of the logo.<\/li>\n<li>Keep \"Don't have a Mada account?\" under the payment card, not inside the badge box.<\/li>\n<\/ul>\n\n<h4>1.1.5<\/h4>\n\n<ul>\n<li>Flip the checkout payment badge when the store is RTL.<\/li>\n<li>Keep \"Pay in 4 simple, interest free\" inside the payment method card and bold \"Don't have a Mada account?\"<\/li>\n<\/ul>\n\n<h4>1.1.4<\/h4>\n\n<ul>\n<li>Load the checkout and payment method badge from the environment CDN instead of the local SVG.<\/li>\n<li>Match Figma checkout copy: \"Pay in 4 simple, interest free\".<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Fix cart widget reading JOD prices when the symbol \u062f.\u0627 sits before the amount (\u062f.\u0627690.00 no longer becomes 0.69).<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Rebrand payment method: title \u2192 \"Pay with Mada\", description \u2192 \"Pay in 4 simple, interest free payments\".<\/li>\n<li>Add \"Don't have a Mada account?\" CTA below payment method on checkout.<\/li>\n<li>Update Ninja Quick Buy popup label to match new branding.<\/li>\n<li>Responsive checkout payment badge styling for mobile.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Auto-show Mada BNPL in the Ninja Quick Buy popup when both plugins are active \u2014 no merchant setup required.<\/li>\n<li>Fix promotional widget amounts that could be divided as fils on JOD stores; PHP amounts are treated as major units.<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Hide footer payment badge on checkout page to prevent duplicate Mada logo below payment options.<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Fix cart promotional widget positioning to consistently appear directly above the \"Proceed to Checkout\" button across classic themes, block carts, and custom page builder layouts.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Declare \"Tested up to\" exclusively in readme.txt and remove from main plugin file header per WordPress.org guidelines.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fix promotional widget amounts that were 100x too large when WooCommerce stored prices in cents.<\/li>\n<li>Keep the product-page widget behind the mini-cart sidebar instead of stacking on top of it.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Move webhook signature verification into permission_callback per WordPress REST API guidelines.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Send X-Cancel-Callback-Url (cart page) so checkout header X abandons without running the fail handler.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Hide the promotional widget unless currency is JOD and country is Jordan.<\/li>\n<li>Fix incorrect widget amounts caused by mini-cart qty and line-item totals.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Hide the promotional widget when the storefront currency is not JOD.<\/li>\n<li>Quantity changes update the widget immediately without a page refresh.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First 1.x release. V2 initiate, webhook confirmation, and promotional widgets.<\/li>\n<\/ul>","raw_excerpt":"Accept Buy Now, Pay Later payments through the Mada BNPL platform. Redirect-based checkout confirmed by signed order webhooks.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/353775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=353775"}],"author":[{"embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/madabnpl"}],"wp:attachment":[{"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=353775"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=353775"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=353775"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=353775"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=353775"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=353775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}