{"id":356754,"date":"2026-08-27T08:48:13","date_gmt":"2026-08-27T08:48:13","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/melalweb-bale-pay-for-woocommerce\/"},"modified":"2026-09-07T10:43:38","modified_gmt":"2026-09-07T10:43:38","slug":"melalweb-pay-with-bale-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/it.wordpress.org\/plugins\/melalweb-pay-with-bale-for-woocommerce\/","author":8904864,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.0.7","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"Melalweb Pay with Bale for WooCommerce","header_author":"Melalweb","header_description":"Unofficial WooCommerce gateway for Bale wallet invoices and card-to-card payments with receipt review.","assets_banners_color":"022d3a","last_updated":"2026-09-07 10:43:38","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/melalweb.com","header_plugin_uri":"","header_author_uri":"https:\/\/melalweb.com","rating":0,"author_block_rating":0,"active_installs":40,"downloads":360,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"rezaei1374","date":"2026-09-07 10:43:38","revision":3684678}},"upgrade_notice":{"1.1.0":"<p>Wallet API updates, transaction inquiry, and bundled Persian translations. Create a wallet payment token in @botfather if you still use an older merchant token.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3668490,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3668490,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3668490,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3668490,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[273281,3148,4870,1887,286],"plugin_category":[45],"plugin_contributors":[277777],"plugin_business_model":[],"class_list":["post-356754","plugin","type-plugin","status-publish","hentry","plugin_tags-bale","plugin_tags-checkout","plugin_tags-iran","plugin_tags-payments","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-rezaei1374","plugin_committers-rezaei1374"],"banners":{"banner":"https:\/\/ps.w.org\/melalweb-pay-with-bale-for-woocommerce\/assets\/banner-772x250.png?rev=3668490","banner_2x":"https:\/\/ps.w.org\/melalweb-pay-with-bale-for-woocommerce\/assets\/banner-1544x500.png?rev=3668490","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/melalweb-pay-with-bale-for-woocommerce\/assets\/icon-128x128.png?rev=3668490","icon_2x":"https:\/\/ps.w.org\/melalweb-pay-with-bale-for-woocommerce\/assets\/icon-256x256.png?rev=3668490","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Melalweb Pay with Bale adds Bale wallet checkout to WooCommerce using the official Bale Bot payment methods (<code>sendInvoice<\/code>, <code>answerPreCheckoutQuery<\/code>, and <code>inquireTransaction<\/code>).<\/p>\n\n<p>Bale no longer supports bot card-to-card money requests. Wallet payment is the supported way for bots to receive money. This plugin can still offer an optional <strong>store-managed<\/strong> card-to-card method (destination card + receipt upload) that does not use Bale\u2019s removed bot card-to-card API.<\/p>\n\n<p>This plugin is an independent Melalweb integration. It is not affiliated with, endorsed by, or officially connected to Bale, WooCommerce, or Automattic. Bale and WooCommerce are trademarks of their respective owners.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Bale wallet invoices via <code>sendInvoice<\/code> with automatic webhook confirmation<\/li>\n<li>Pre-checkout validation within Bale\u2019s 10-second window (<code>answerPreCheckoutQuery<\/code>)<\/li>\n<li>Transaction inquiry via <code>inquireTransaction<\/code> when a shopper checks payment status<\/li>\n<li>Optional <code>createInvoiceLink<\/code> API helper for mini-app style flows<\/li>\n<li>Test wallet token support: <code>WALLET-TEST-1111111111111111<\/code> (same flow, no real transfer)<\/li>\n<li>Optional store card-to-card with secure receipt upload and manager review<\/li>\n<li>Admin dashboard for transactions, linked users, events, and CSV export<\/li>\n<li>Optional percentage discounts per payment method<\/li>\n<li>Automatic expiry of unpaid payment requests<\/li>\n<li>Bundled Persian (<code>fa_IR<\/code>) translations for WordPress sites set to \u0641\u0627\u0631\u0633\u06cc<\/li>\n<\/ul>\n\n<h4>How Bale wallet pay works<\/h4>\n\n<ol>\n<li>The customer signs in and links their account to the Bale bot with a 15-minute one-time code.<\/li>\n<li>At checkout the plugin creates a payment payload and calls Bale <code>sendInvoice<\/code> with the wallet <code>provider_token<\/code> from @botfather.<\/li>\n<li>Bale sends <code>pre_checkout_query<\/code>. The plugin re-checks the linked account, amount (IRR), order status, and expiry, then answers with <code>answerPreCheckoutQuery<\/code>.<\/li>\n<li>After payment, <code>successful_payment<\/code> is received. The charge ID is stored uniquely and the order is completed. Status checks can also call <code>inquireTransaction<\/code>.<\/li>\n<\/ol>\n\n<h4>Requirements<\/h4>\n\n<ul>\n<li>WordPress 6.5 or later<\/li>\n<li>WooCommerce 7.0 or later<\/li>\n<li>Store currency set to Iranian Rial (IRR) or Toman (IRT \/ TOMAN)<\/li>\n<li>A Bale bot token and wallet payment token (<code>provider_token<\/code>) from @botfather<\/li>\n<\/ul>\n\n<h4>Localization<\/h4>\n\n<p>Source strings are English (WordPress.org standard). When the site language is Persian (<code>fa_IR<\/code>), the bundled translation in <code>\/languages<\/code> is loaded automatically via <code>load_plugin_textdomain<\/code> and <code>Domain Path: \/languages<\/code>.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to Bale (an Iranian messenger and payments platform) so a store can send wallet invoices, confirm payments, inquire transactions, register a webhook, and optionally send status messages in Bale.<\/p>\n\n<h4>Bale Bot API<\/h4>\n\n<ul>\n<li>What it is used for: creating wallet invoices (<code>sendInvoice<\/code>), answering checkout queries (<code>answerPreCheckoutQuery<\/code>), inquiring transactions (<code>inquireTransaction<\/code>), optionally creating invoice links (<code>createInvoiceLink<\/code>), registering the store webhook, testing the bot connection, sending optional order-status messages, and receiving payment updates.<\/li>\n<li>When data is sent: only after a store manager saves a bot token and wallet payment token, and only when a shopper pays with Bale, links their account, checks payment status, or a manager tests\/registers the connection. Store card-to-card checkout does not call this API unless a Bale notification template is used.<\/li>\n<li>Data sent to Bale: bot token and provider token in API request URLs (stored on this WordPress site, not sent to Melalweb); invoice title, description, amount in IRR, a random payment identifier, and the customer\u2019s Bale chat ID; transaction ID for inquiry; webhook URL of this site; optional notification text about an order.<\/li>\n<li>Service: Bale, API host <code>https:\/\/tapi.bale.ai<\/code><\/li>\n<li>Terms of service: https:\/\/bale.ai\/terms<\/li>\n<li>Privacy policy: Bale publishes its privacy terms in the same document (sections on user privacy \/ \u062d\u0631\u06cc\u0645 \u062e\u0635\u0648\u0635\u06cc): https:\/\/bale.ai\/terms<\/li>\n<li>Bot API documentation: https:\/\/docs.bale.ai\/<\/li>\n<\/ul>\n\n<h4>Bale deep links<\/h4>\n\n<ul>\n<li>What it is used for: opening the merchant\u2019s Bale bot so a signed-in customer can link their store account with a one-time code.<\/li>\n<li>When data is sent: when a signed-in customer views checkout or the account linking page and a bot username is configured.<\/li>\n<li>Data sent: the bot username and a short-lived one-time linking code in a <code>https:\/\/ble.ir\/{bot}?start={code}<\/code> URL opened by the customer.<\/li>\n<li>Service: Bale deep links on <code>https:\/\/ble.ir<\/code><\/li>\n<li>Terms of service: https:\/\/bale.ai\/terms<\/li>\n<li>Privacy policy: https:\/\/bale.ai\/terms<\/li>\n<\/ul>\n\n<p>This plugin does not send store, customer, or payment data to Melalweb.<\/p>\n\n<h3>\u0641\u0627\u0631\u0633\u06cc<\/h3>\n\n<p>\u062f\u0631\u06af\u0627\u0647 Melalweb Pay with Bale \u067e\u0631\u062f\u0627\u062e\u062a \u06a9\u06cc\u0641\u200c\u067e\u0648\u0644 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9\u06cc \u0628\u0644\u0647 \u0631\u0627 \u0628\u0627 \u0645\u062a\u062f\u0647\u0627\u06cc \u0631\u0633\u0645\u06cc \u0628\u0627\u0632\u0648 (<code>sendInvoice<\/code>\u060c <code>answerPreCheckoutQuery<\/code> \u0648 <code>inquireTransaction<\/code>) \u0628\u0647 \u0648\u0648\u06a9\u0627\u0645\u0631\u0633 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n\n<p>\u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0648\u0644 \u06a9\u0627\u0631\u062a\u200c\u0628\u0647\u200c\u06a9\u0627\u0631\u062a \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0628\u0627\u0632\u0648\u0647\u0627 \u062f\u06cc\u06af\u0631 \u062a\u0648\u0633\u0637 \u0628\u0644\u0647 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0646\u0645\u06cc\u200c\u0634\u0648\u062f\u061b \u0631\u0648\u0634 \u067e\u0627\u06cc\u062f\u0627\u0631 \u062f\u0631\u06cc\u0627\u0641\u062a \u067e\u0648\u0644 \u062f\u0631 \u0628\u0627\u0632\u0648\u060c \u06a9\u06cc\u0641\u200c\u067e\u0648\u0644 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0627\u0641\u0632\u0648\u0646\u0647 \u0647\u0645\u0686\u0646\u0627\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u06cc\u06a9 \u0631\u0648\u0634 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc <strong>\u06a9\u0627\u0631\u062a \u0628\u0647 \u06a9\u0627\u0631\u062a \u0641\u0631\u0648\u0634\u06af\u0627\u0647\u06cc<\/strong> (\u0646\u0645\u0627\u06cc\u0634 \u06a9\u0627\u0631\u062a \u0645\u0642\u0635\u062f + \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0631\u0633\u06cc\u062f) \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u062f \u06a9\u0647 \u0627\u0632 API \u062d\u0630\u0641\u200c\u0634\u062f\u0647 \u06a9\u0627\u0631\u062a\u200c\u0628\u0647\u200c\u06a9\u0627\u0631\u062a \u0628\u0627\u0632\u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n\n<p>\u0627\u06af\u0631 \u0632\u0628\u0627\u0646 \u0633\u0627\u06cc\u062a \u0648\u0631\u062f\u067e\u0631\u0633 \u0631\u0648\u06cc \u00ab\u0641\u0627\u0631\u0633\u06cc\u00bb \u0628\u0627\u0634\u062f\u060c \u062a\u0631\u062c\u0645\u0647\u200c\u0647\u0627\u06cc \u0647\u0645\u0631\u0627\u0647 \u0627\u0641\u0632\u0648\u0646\u0647 \u062f\u0631 \u067e\u0648\u0634\u0647 <code>languages<\/code> \u0628\u0647\u200c\u0635\u0648\u0631\u062a \u062e\u0648\u062f\u06a9\u0627\u0631 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u06cc\u200c\u0634\u0648\u0646\u062f.<\/p>\n\n<h4>\u0633\u0627\u0632\u0648\u06a9\u0627\u0631 \u067e\u0631\u062f\u0627\u062e\u062a \u06a9\u06cc\u0641\u200c\u067e\u0648\u0644 \u0628\u0644\u0647<\/h4>\n\n<ol>\n<li>\u0645\u0634\u062a\u0631\u06cc \u0648\u0627\u0631\u062f \u062d\u0633\u0627\u0628 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u0628\u0627 \u06a9\u062f \u06cc\u06a9\u200c\u0628\u0627\u0631\u0645\u0635\u0631\u0641 \u06f1\u06f5 \u062f\u0642\u06cc\u0642\u0647\u200c\u0627\u06cc \u0628\u0647 \u0631\u0628\u0627\u062a \u0628\u0644\u0647 \u0645\u062a\u0635\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/li>\n<li>\u0647\u0646\u06af\u0627\u0645 \u062a\u0633\u0648\u06cc\u0647\u060c \u0627\u0641\u0632\u0648\u0646\u0647 \u0645\u062a\u062f <code>sendInvoice<\/code> \u0631\u0627 \u0628\u0627 <code>provider_token<\/code> \u06a9\u06cc\u0641\u200c\u067e\u0648\u0644 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/li>\n<li>\u0628\u0644\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f <code>pre_checkout_query<\/code> \u0631\u0627 \u0645\u06cc\u200c\u0641\u0631\u0633\u062a\u062f\u061b \u0627\u0641\u0632\u0648\u0646\u0647 \u0638\u0631\u0641 \u062d\u062f\u0627\u06a9\u062b\u0631 \u06f1\u06f0 \u062b\u0627\u0646\u06cc\u0647 \u0628\u0627 <code>answerPreCheckoutQuery<\/code> \u067e\u0627\u0633\u062e \u0645\u06cc\u200c\u062f\u0647\u062f.<\/li>\n<li>\u067e\u0633 \u0627\u0632 \u067e\u0631\u062f\u0627\u062e\u062a \u0645\u0648\u0641\u0642\u060c <code>successful_payment<\/code> \u0645\u06cc\u200c\u0631\u0633\u062f \u0648 \u0633\u0641\u0627\u0631\u0634 \u062a\u06a9\u0645\u06cc\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f. \u062f\u06a9\u0645\u0647 \u00ab\u0628\u0631\u0631\u0633\u06cc \u0648\u0636\u0639\u06cc\u062a\u00bb \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0627\u0632 <code>inquireTransaction<\/code> \u0647\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f.<\/li>\n<\/ol>\n\n<h4>\u062a\u0633\u062a \u0628\u062f\u0648\u0646 \u0627\u0646\u062a\u0642\u0627\u0644 \u067e\u0648\u0644 \u0648\u0627\u0642\u0639\u06cc<\/h4>\n\n<p>\u062a\u0648\u06a9\u0646 \u0622\u0632\u0645\u0627\u06cc\u0634\u06cc <code>WALLET-TEST-1111111111111111<\/code> \u0631\u0627 \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 <code>provider_token<\/code> \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\">WooCommerce<\/a>.<\/li>\n<li>Upload the plugin ZIP via Plugins \u2192 Add New, or copy the <code>melalweb-pay-with-bale-for-woocommerce<\/code> folder into <code>wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate Melalweb Pay with Bale.<\/li>\n<li>Set the site language to \u0641\u0627\u0631\u0633\u06cc if you want the Persian admin and checkout UI.<\/li>\n<li>Open Melalweb Pay with Bale in the WordPress admin menu.<\/li>\n<li>Enter the bot username, bot token, and wallet payment token (<code>provider_token<\/code>), then save.<\/li>\n<li>Click Register webhook with Bale.<\/li>\n<li>Optionally enable store card-to-card and add destination cards.<\/li>\n<li>Set WooCommerce currency to IRR or Toman.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"is%20this%20an%20official%20bale%20or%20woocommerce%20plugin%3F\"><h3>Is this an official Bale or WooCommerce plugin?<\/h3><\/dt>\n<dd><p>No. It is an independent Melalweb plugin that talks to the public Bale Bot API. Melalweb is not affiliated with Bale or WooCommerce.<\/p><\/dd>\n<dt id=\"does%20wallet%20pay%20support%20guest%20checkout%3F\"><h3>Does wallet pay support guest checkout?<\/h3><\/dt>\n<dd><p>No. Bale wallet pay needs a logged-in WordPress user linked to a Bale chat. The optional store card-to-card method does support guests.<\/p><\/dd>\n<dt id=\"how%20do%20i%20test%20payments%20without%20transferring%20money%3F\"><h3>How do I test payments without transferring money?<\/h3><\/dt>\n<dd><p>Use the Bale test wallet token <code>WALLET-TEST-1111111111111111<\/code> as <code>provider_token<\/code>. It follows the same flow without a real transfer.<\/p><\/dd>\n<dt id=\"where%20are%20receipt%20files%20stored%3F\"><h3>Where are receipt files stored?<\/h3><\/dt>\n<dd><p>Receipts are stored privately under <code>uploads\/melalweb-balepay-receipts\/<\/code> and are served only through a capability or order-key check.<\/p><\/dd>\n<dt id=\"can%20i%20keep%20payment%20data%20after%20uninstalling%3F\"><h3>Can I keep payment data after uninstalling?<\/h3><\/dt>\n<dd><p>Yes. Tables and settings are kept unless you enable the uninstall option on the Appearance tab.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Align with current Bale wallet payment docs: <code>sendInvoice<\/code>, <code>answerPreCheckoutQuery<\/code>, <code>inquireTransaction<\/code>, and <code>createInvoiceLink<\/code>.<\/li>\n<li>Store PreCheckoutQuery ID and use <code>inquireTransaction<\/code> when shoppers check payment status.<\/li>\n<li>Document wallet payment token from @botfather and the official test token.<\/li>\n<li>Clarify that Bale bot card-to-card money requests are discontinued; keep optional store card-to-card as a separate feature (disabled by default for new installs).<\/li>\n<li>Add WordPress.org-standard i18n: <code>Domain Path<\/code>, <code>load_plugin_textdomain<\/code>, and bundled <code>fa_IR<\/code> translations.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>WordPress.org review updates: display name and slug, prefixes, nonce on receipt viewing, and Bale service disclosure.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Unofficial WooCommerce gateway for Bale electronic wallet invoices, with an optional store card-to-card receipt review flow.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/356754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=356754"}],"author":[{"embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/rezaei1374"}],"wp:attachment":[{"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=356754"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=356754"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=356754"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=356754"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=356754"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/it.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=356754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}