=== Mintage Pay for WooCommerce ===
Contributors: mintagepay
Tags: payments, stablecoin, usdc, usdt, crypto
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.2
Stable tag: 1.21.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Take USDC and USDT, plus card and app payments where Mintage Pay offers them, paid to your own wallet.

== Description ==

Mintage Pay adds up to three payment methods to your WooCommerce checkout. You switch each one on or off and drag them into the order you want:

* **Pay with crypto**: the customer pays in USDC or USDT from any wallet or exchange.
* **Pay by card**: Visa or Mastercard. The customer pays by card and you receive USDC. Shown only where Mintage Pay takes cards for your store and the customer's billing state.
* **Pay by app**: Cash App in one tap, plus Apple Pay and Google Pay where Mintage Pay offers them for the total.

**Get started in minutes:** install, click "Connect to Mintage Pay" and approve your store. No key to copy. Try it with test money in the sandbox first if you like, then apply for a live account. See Installation below, or the full guide at https://mintagepay.com/docs/integrations/#woocommerce

Mintage Pay sends your customer to a secure hosted checkout where they pay in stablecoins (USDC or USDT) from a wallet or an exchange, on the networks you turn on in your Mintage Pay dashboard (for example Base, Polygon, Solana or TRON). A network appears at checkout only when you have set a payout address for it.

Mintage Pay never holds your money: payments go straight to your own payout addresses.

When the payment is confirmed on chain, Mintage Pay notifies your store and the order moves to Processing automatically.

Features:

* Works with the classic checkout and the Cart/Checkout blocks.
* Compatible with High-Performance Order Storage (HPOS).
* Signed webhooks (HMAC-SHA256 with a 5 minute timestamp window). The plugin never trusts a webhook body on its own: it always re-reads the invoice from the Mintage Pay API before changing an order.
* Partial payments put the order on hold with a note showing what is still owed. If the payment window closes part paid, the order stays on hold (never cancelled or restocked) so you can refund the customer or collect the rest.
* Full payments that arrive after an order was cancelled are recorded and the order is put on hold for you to review, never shipped automatically. A late partial payment on a cancelled order keeps it cancelled and adds a note asking you to refund it.
* A paid invoice whose amount or currency does not match the order total puts the order on hold instead of completing it.
* Expired invoices cancel the unpaid order, which returns the stock. Before WooCommerce's "Hold stock" timer cancels an order, the plugin checks the invoice with Mintage Pay and never cancels one that has money on it.
* Cancelling an order also cancels its Mintage Pay invoice, so the customer cannot pay a cancelled order.
* Order screen box with the live invoice status, payments with block explorer links, a Refresh link and a link to the payment in your Mintage Pay dashboard.
* Refunds: you send a refund from your own wallet in the Mintage Pay dashboard. When it is confirmed on chain, it is added to the order as a refund record and WooCommerce emails the customer. A refund entered by hand in WooCommerce moves no money, so the customer is not emailed until the real refund is confirmed, and the two are never counted twice.
* Optional discount for paying with Mintage Pay (for example 3%, since card payments cost you about that): the checkout says "Save 3% when you pay with USDC or USDT." and the discount comes off the products while Mintage Pay is selected.
* Test mode: a sandbox key (mp_test_...) connects to the Mintage Pay sandbox automatically, and an admin notice reminds you while it is saved.
* WooCommerce Subscriptions: each renewal becomes a Mintage Pay invoice that the customer pays from their wallet. Mintage Pay emails them the payment link. Nothing is charged automatically.

Store currencies: USD, EUR, GBP, CAD, AUD, CHF, JPY, MXN, BRL, INR, SGD, AED, PLN, SEK, NOK, DKK, NZD, ZAR, TRY, KRW, HKD, NGN, ARS, PHP, IDR, VND, PKR, EGP, BDT, KES, GHS, TZS, COP, CLP, PEN, UYU, PYG, BOB, DOP, GTQ, CRC, THB, MYR, TWD, LKR, NPR, KZT, UAH, ILS, SAR, QAR, CZK, HUF, RON, ISK, XAF and XOF. A price in another currency than USD is converted by Mintage Pay to the USD amount the customer pays in USDC or USDT, at a checked exchange rate, rounded up to the cent. The order notes show the price, the USD amount and the rate. In any other store currency the method stays hidden at checkout and an admin notice explains why.

== External services ==

This plugin connects to the Mintage Pay API (https://app.mintagepay.com, or https://sandbox.mintagepay.com for test keys) to take payments. It is the payment service the plugin is for, so it does not work without it.

What is sent, and when:

* When you click "Connect to Mintage Pay" (or "Connect a test (sandbox) account"): your browser opens app.mintagepay.com (or sandbox.mintagepay.com) with this site's address, its name, the plugin version, a random value and a code challenge (PKCE). You sign in there and approve this store. Your browser then comes back to this site with a one-time code, and the plugin sends that code and its secret to Mintage Pay to receive this store's API key. Nothing is sent before you click.
* When you save the settings, reconnect the webhook, or activate, deactivate or delete the plugin: your API key (in the Authorization header), this store's webhook URL and the store name, to check the key and to add or remove the webhook endpoint.
* When a customer chooses Mintage Pay at checkout: the order total and currency, the order number, a description ("Order #1042 from Your Store"), the thank-you and cancel page addresses, the WooCommerce order id and order key, the invoice expiry, and the customer's billing email address. Mintage Pay emails the customer a receipt only if you turn off "Let WooCommerce send the order emails"; otherwise it writes to them only when they ask for a refund on Mintage Pay's refund page. For an order paid by card, the email is also kept as part of the record of that card payment, in case the customer disputes the charge.
* With WooCommerce Subscriptions: the subscription's recurring total, billing period and the renewal order numbers, the customer's email address and name so Mintage Pay can send them each renewal's payment link, and the store language.
* When an order is updated (a webhook from Mintage Pay, the thank-you page, the order screen, the "Hold stock" timer, or cancelling an order): the Mintage Pay invoice id, to read or cancel that invoice.
* With each request the active plugin makes to the Mintage Pay API: the plugin's name and version in the user agent (for example MintagePay-WooCommerce/1.17.0), so Mintage Pay can see which version of the plugin this store runs.
* On the checkout page, at most every 12 hours: a request for the list of networks you have turned on, to describe them under the payment method.
* On the checkout page, for the order total (remembered for 10 minutes per total, 30 minutes for the card form's address): the total, the currency and this store's address, to ask Mintage Pay which ways to pay (card, apps, crypto) it offers for that total and in which US states card payments are not available.
* In the customer's browser, when the pop-up payment page is closed before paying: the Mintage Pay invoice id and the step the customer was on (for example "choose"), with no cookies, so Mintage Pay can count where buyers stop.
* Card payments: when the card form is shown inside the checkout (with the pop-up on, where Mintage Pay offers it), that form is Mintage Pay's own page from app.mintagepay.com. What the customer types there goes to Mintage Pay and the providers it uses for card payments (Stripe and Privy), as described in Mintage Pay's privacy policy, not to this store.

Mintage Pay terms of service: https://mintagepay.com/terms.html
Mintage Pay privacy policy: https://mintagepay.com/privacy.html

== Installation ==

**1. Install.** In WordPress go to Plugins > Add New Plugin, search for "Mintage Pay", click Install Now, then Activate. WooCommerce must be active.

**2. Try it with test money (free, no review).** Create a test account at https://sandbox.mintagepay.com and make a test key (mp_test_...) under Developers > API keys. Test networks and test money only. Guide: https://mintagepay.com/docs/sandbox/

**3. Go live.** Apply at https://mintagepay.com/#apply. Once your account is approved, sign in at https://app.mintagepay.com, set a payout address for each network you want to be paid on, and create a live key (mp_live_...).

**4. Connect your store.** Go to WooCommerce > Settings > Payments > Mintage Pay and click "Connect to Mintage Pay" (or "Connect a test (sandbox) account"). Sign in to Mintage Pay, check that the store address shown is yours, and click Approve. You come back to WordPress with the key saved, the webhook registered and the payment method switched on. You can also paste a key from Developers > API keys instead: tick Enable and save. Saving checks the key and registers this store's webhook automatically. The settings page shows "Connected to (your business name) (live)" when it is done, or "(TEST MODE: sandbox, test money only)" for a sandbox key.

To try it first, connect a sandbox account, or paste a sandbox key (mp_test_...) from https://sandbox.mintagepay.com. Click "Connect to Mintage Pay" again later to switch to your live account: the plugin asks before it replaces a working key. Leave "API base URL" empty: the key decides whether the plugin talks to the sandbox or the live service. Replace it with a live key (mp_live_...) before you take real orders.

If you move the store to a new address or the webhook shows "Not connected", click "Reconnect webhook" on the settings page.

**5. Choose your methods.** Under WooCommerce > Settings > Payments, switch on "Mintage Pay: Pay by card" and "Mintage Pay: Pay with crypto" if you want them as their own methods, and drag the methods into the order you want.

**6. Stay up to date automatically.** Tick "Update Mintage Pay automatically" on the settings page, or click "Enable auto-updates" next to Mintage Pay on the Plugins screen (it is the same setting). Fixes and new payment options then install on their own.

= Documentation =

* WooCommerce guide: https://mintagepay.com/docs/integrations/#woocommerce
* Developer docs: https://mintagepay.com/docs/
* API reference: https://mintagepay.com/docs/api/ (OpenAPI: https://app.mintagepay.com/v1/openapi.json)
* Webhooks: https://mintagepay.com/docs/webhooks/
* Sandbox: https://mintagepay.com/docs/sandbox/
* Cash out to your bank: https://mintagepay.com/docs/cash-out/
* Help: hello@mintagepay.com

== Frequently Asked Questions ==

= Do I need a Mintage Pay account? =

Yes. A sandbox account for testing is free and instant at https://sandbox.mintagepay.com. A live account is by application at https://mintagepay.com/#apply.

= What does "Connect to Mintage Pay" do? =

It makes an API key for this store in your Mintage Pay account and saves it here, so you never copy a key by hand. You approve it on Mintage Pay's own site, signed in to your account, and the page shows the store address that asked. Only approve if you just clicked Connect in your own WordPress. The key appears under Developers > API keys as "WooCommerce (your store address)" and the account owner gets an email. If you connect the same store again, the key from the earlier Connect is revoked as soon as the new one is used. Keys you made by hand are never touched.

= Why don't I see Pay by card or Pay by app? =

Mintage Pay turns card and app payments on for each store. If your live account does not show them yet, email hello@mintagepay.com. Pay by card is also hidden when Mintage Pay does not take a card for that total (Stripe takes nothing under $1.00, fees included) and for billing addresses in US states where card payments are not available.

= Which URL receives webhooks? =

The WooCommerce API URL for `mintage_pay`, shown on the settings page (for example `https://example.com/?wc-api=mintage_pay` or `https://example.com/wc-api/mintage_pay/` with pretty permalinks).

= What happens if the customer closes the payment page? =

The order stays Pending payment until the invoice expires (60 minutes by default, configurable), then it is cancelled and the stock is returned.

= What if the customer comes back to the thank-you page before the webhook arrives? =

The plugin checks the invoice status itself and updates the order. While the payment is still being confirmed, the page shows a short message and refreshes every 15 seconds.

= Is anything logged? =

Errors are always written to WooCommerce > Status > Logs under the source `mintage-pay`. Turn on "Debug log" for more detail. The API key and webhook secret are never logged.

= What does uninstalling remove? =

Deactivating the plugin disables this store's webhook endpoint at Mintage Pay (reactivating reconnects it). Deleting the plugin removes its settings and the stored webhook secret. Order notes and order data stay.

= How do subscriptions work? =

With WooCommerce Subscriptions active, the first order of a subscription creates a matching Mintage Pay subscription (its recurring total and billing period). WooCommerce Subscriptions keeps the schedule. On each renewal date the plugin creates an invoice for the renewal order and Mintage Pay emails the customer a link to pay it. The renewal order stays Pending payment until it is paid, then moves to Processing. If the invoice closes unpaid, the renewal order is marked Failed and WooCommerce Subscriptions handles it as a missed payment. Cancelling the subscription in WooCommerce cancels it at Mintage Pay too.

A first order with one subscription is paid as that subscription's first invoice. A first order with several subscriptions, a sign-up fee or other products is paid with a normal invoice, and each Mintage Pay subscription starts with its first renewal. A free trial order needs no payment. A renewal cannot be higher than the first recurring total: to raise the price, start a new subscription.

= How do I refund an order? =

Mintage Pay never holds your money, so it cannot send a refund for you: you send it from your own wallet. Click "Refund via Mintage Pay" on the order screen: the refund is created in Mintage Pay and the order notes get a "Send now" link (reload the page to see it). Sign in to Mintage Pay and send it from there; no login? Ask whoever connected this store. When it is confirmed on chain, the plugin adds a refund record to the order, restocks the items if you ticked "Restock", and WooCommerce emails the customer. You can also start a refund in your Mintage Pay dashboard (the order screen box has a link). If Mintage Pay needs the customer's refund address first, the order note says so and links to the payment, where you ask the customer for it. If you use "Refund manually" in WooCommerce, no money moves and the customer is not emailed; the plugin matches it to the real refund later so it is not counted twice.

= Will my customer get two emails? =

No, by default. "Let WooCommerce send the order emails" is on, so Mintage Pay sends no separate receipt and your customer gets only the usual WooCommerce emails. Turn it off if you also want Mintage Pay's payment receipt sent.

= Why is the method hidden at checkout? =

It is only offered when the store currency is supported (see above) and the saved API key has been verified with Mintage Pay. If the key could not be verified, an admin notice says so: check the key and save the settings again.

== Screenshots ==

1. At checkout, the customer picks the Mintage Pay method (shown with the title "Cash App / Crypto").
2. The secure payment page opens over the store's own checkout, and the customer chooses how to pay.
3. The customer scans the code with their app or wallet and sends the exact amount.
4. Payment received: a receipt with the network, transaction and a PDF download.
5. Back in the store, the order is confirmed and moves to Processing by itself.

== Changelog ==

= 1.21.0 =
* New: "Refund via Mintage Pay" on the order screen creates the refund in Mintage Pay for you to send from your wallet. The order notes get a "Send now" link, and the Mintage Pay box on the order lists refunds waiting to be sent. Nothing moves until you send it: then the refund is added to the order, the items are restocked if you ticked "Restock", and the customer gets the refund email. Clicking twice makes one refund.
* New: when Mintage Pay needs the customer's refund address first, the order note links to the payment, where you ask the customer for it.
* New: a "Return my funds" page on your store for customers who paid by card in the payment pop-up. Mintage Pay's emails link to it. It is never cached or indexed.
* Note: a refund asked for through the WooCommerce REST API on a Mintage Pay order also creates the refund in Mintage Pay, and the API answers with an error because nothing has been sent yet.
* Where your Mintage Pay account cannot create refunds from the store yet, the button works as before.

= 1.20.0 =
* Change: where "Pay by card" is its own method, the "Pay by app" text now says what buyers pay with: "Cash App in one tap", plus crypto, Apple Pay and Google Pay where Mintage Pay offers them for the cart. Before, it listed stablecoin networks. A description you wrote yourself is kept.

= 1.19.0 =
* Better: the card form in the payment pop-up is filled in from the order's billing details whatever the buyer picked at checkout, also when they move from "Pay by app" to a card.
* Change: "Pay by app" shows the Apple Pay and Google Pay icons, and names them, only where Mintage Pay offers them for the store. Where it does not, the method shows Cash App (and crypto, unless "Pay with crypto" is its own method).

= 1.18.0 =
* New: "Connect to Mintage Pay". Click it on the settings page, sign in to Mintage Pay and approve your store: the API key is saved, the webhook is registered and the payment method is switched on. No key to copy. "Connect a test (sandbox) account" does the same with test money. If a working key is already saved, the plugin asks before replacing it.
* New: a "Get started" box on the settings page while no key is saved, with Connect, the sandbox, the application form and the setup guide.
* New: "Update Mintage Pay automatically" on the settings page (WordPress's own auto-update setting for this plugin).
* WooCommerce's Payments page now shows the Mintage Pay icon, says the method needs setup until a key is verified and shows test mode for a sandbox key, and links to the guide, pricing and terms. Each Mintage Pay method opens its own settings.
* Fix: with only the main method on, its row showed the Cash App, Apple Pay and Google Pay icons even where Mintage Pay does not offer those apps for the store. The icons now follow what Mintage Pay offers, on the classic and the block checkout.
* Tested with WooCommerce 11.2.

= 1.17.0 =
* New payment method "Mintage Pay: Pay with crypto": crypto as its own method at checkout, with USDC, USDT and wallet icons. It opens the payment page straight on the list of networks. Switch it on under WooCommerce > Settings > Payments and drag the methods into the order you want (for example: Pay by card, Pay by app, Pay with crypto). It uses the main Mintage Pay method's settings (API key, pop-up, expiry, emails), and the USDC / USDT discount applies to it too. Off by default.
* While "Pay with crypto" is on, the main method is the apps: Cash App in one tap, plus Apple Pay and Google Pay where Mintage Pay offers them for the total. Its row shows those icons, and its payment page no longer offers crypto inside it.
* Pay by app now shows Cash App, Apple Pay and Google Pay icons. Venmo, PayPal and Coinbase are no longer offered on it.
* New: when the store paid an app's fee (for example Cash App one-tap's), the order note says how much came out of your payout. The amount received is that much less than the order total; it is not an underpayment.

= 1.16.0 =
* Pay by card is hidden for a billing address in a US state where Stripe's card payments are not available (today New York). Mintage Pay sends the list, so it can change without a plugin update. The classic checkout and the blocks checkout both check it as the customer fills in the address.
* The apartment or suite line of the billing address is now sent to the card form on its own, not joined onto the street line. Stripe refused some addresses with the two joined.
* Card on checkout fills the apartment line too.

= 1.15.0 =
* Refund requests as order notes: when a customer asks you for a refund on the Mintage Pay refund page, the order gets a note with the amount, the reason and their message, and another when you approve or decline it, when the customer withdraws it, or when it is waiting for you again because its refund was cancelled. You answer in your Mintage Pay dashboard (Refunds); the customer is emailed your answer. The order's status is never changed: an approved refund is added to the order once Mintage Pay records it (sent from your wallet or your exchange).
* Orders paid in crypto: the processing, completed and invoice emails now say where the customer can ask you for a refund (card orders already did).
* The webhook now also receives refund request events. A store connected with an earlier version is updated once, from an admin page, keeping every event it already receives. An older Mintage Pay server that does not know these events is asked again the next day; invoice and dispute events keep working meanwhile.

= 1.14.1 =
* Stores that pay every card fee themselves (set by Mintage Pay support): the card buyer now pays the order total only. Both the Mintage Pay service fee and Stripe's card fee come out of the store's payout. The checkout text, the "Pay by card or Pay by app" choice, the statement note, the thank-you page and the order emails say so and mention no fees.
* New: on such a card order, the order note says how much of Stripe's card fee was paid from your payout (the amount received is that much less than the order total; it is not an underpayment).

= 1.14.0 =
* Card on checkout: with "Mintage Pay: Pay by card" on, the classic checkout shows the card form itself. It fills from the billing fields, asks for Stripe Link's code when needed, and saves the card when the customer clicks Place order (nothing is charged yet). The pop-up on the new order then charges that card straight away when the total is within the "at most" shown. A wallet that already holds enough pays the order without a new card charge, and a declined card is never picked again on its own.
* Card orders in customer emails: the processing, completed, invoice and refunded emails of an order paid by card now show the card charge, the name on the card statement (once Mintage Pay sets it), that a bank may hold up to about 3% more for a short time, and a link where the customer can ask you for a refund. The refunded email also tells the customer the refund settles any dispute they opened with their bank. Printed once per email, and only for orders that were paid by card.
* Card disputes as order notes: when a customer disputes a card charge (reported by you in the Mintage Pay dashboard or API, by the customer, or by Mintage Pay), the order gets a note, and another each time the dispute changes. The order's status is never changed.
* The webhook now also receives card dispute events. A store connected with an earlier version is updated once, from an admin page, keeping every event it already receives. An older Mintage Pay server that does not know these events is asked again the next day, and invoice events keep working meanwhile.
* The customer's billing email is now always passed to Mintage Pay with the order. With "Customer emails" on (the default) Mintage Pay still sends no receipt and no refund email; it writes to the customer only when they ask for a refund themselves. The email lets a card customer find their order on the refund page, and is part of the record a card dispute needs.

= 1.13.2 =
* New: "Card statement note" on the Pay by card method, on by default. It tells card buyers what their bank or card statement will show (STRIPE*PRIVY, INC., not your store name), so the charge does not alarm them: under "Pay by card" at checkout, on the thank-you page and in the customer's order emails, for card orders only. Switch it off or write your own text under WooCommerce > Settings > Payments > Mintage Pay: Pay by card.
* Stores that pay the Mintage Pay service fee on card payments themselves (set by Mintage Pay support): the checkout text, the card form and the statement note no longer mention a service fee; the buyer pays the order total plus the card fee only.

= 1.13.1 =
* Fixed: on themes that make every label inline-block (Bootstrap does), the payment method row with the most icons dropped below its own radio button on a phone. The two Mintage Pay rows now keep the radio and the title on one line and wrap their icons under the title.

= 1.13.0 =
* "Pay by card" can now be its own payment method at checkout, next to the main Mintage Pay method, instead of two choices inside it. Switch on "Mintage Pay: Pay by card" under WooCommerce > Settings > Payments; while it is on, the main method opens the apps (Apple Pay, Google Pay, Cash App, Venmo, PayPal, Coinbase, crypto wallets) and stops showing the two choices. Drag the two methods into the order you want.
* The card method keeps only its own name, description and on/off switch: the API key, the pop-up, the invoice expiry, reminders and emails all stay on the main method, and there is still one webhook.
* Subscriptions and the "save when you pay with USDC or USDT" discount stay with the main method: a renewal cannot ask a buyer for a card, and the discount is for paying in stablecoins. The card method is hidden for a cart with a subscription in it.
* The card method is only shown when Mintage Pay really takes a card for the order's total (Stripe will not take less than $1.00, fees included).
* Each of the two methods carries its own brand icons on its row at checkout (Visa and Mastercard; Apple Pay, Google Pay, Cash App, Venmo, PayPal, Coinbase and wallets), where the choice inside the method used to carry them.

= 1.12.1 =
* Fixed: on themes that restyle every radio button in the payment box, "Pay by card" and "Pay by app" could be unreadable (the radio filled the row and the text wrapped one letter per line). The two rows now keep the browser's own 16px radio, their layout and their icons whatever the theme does.

= 1.12.0 =
* "Pay by card" and "Pay by app": when your Mintage Pay account takes card payments, the checkout shows two choices under Mintage Pay, card first, each with its brand icons (Visa and Mastercard; Apple Pay, Google Pay, Cash App, Venmo, PayPal, Coinbase and wallets). "Pay by card" opens the card form directly, with the customer's billing details already filled in; "Pay by app" opens the list of apps. Without card payments, or for an order below the card minimum, the checkout looks as before. New setting to turn the two choices off (on by default).
* Payment pop-up on the block checkout too: "Place order" opens the payment over the checkout instead of leaving the store. Closing it keeps the order and shows a notice; "Place order" again reopens the same payment.
* Payment pop-up: the frame may use the camera (the card form's ID check) and the payment sheet.
* Fixed: on the block checkout the pop-up details reached the browser as the word "Array" (with a PHP warning in the log).
* Log: when Mintage Pay refuses a request, the log line names the fields it objected to (field names only, never values).

= 1.11.2 =
* Block checkout: the "pay with USDC / USDT" discount now reaches the cart through its own Store API update (it was registered too late, so the browser console showed an error on each payment method change).

= 1.11.1 =
* Checkout and thank-you scripts are enqueued (no inline script tags).
* Configuration warnings show on the Plugins and WooCommerce screens only.

= 1.11.0 =
* New optional setting "Payment reminder (minutes)": if a customer chose Mintage Pay and the order is still unpaid after that many minutes, they get one email with a link back to their payment. Not sent when the order was paid, changed to another payment method, or the same customer has a newer paid order. The email is a normal WooCommerce email ("Mintage Pay: finish your payment") you can edit or switch off under WooCommerce > Settings > Emails. Off (0) by default.
* Payment pop-up: closing it tells Mintage Pay at which step it was closed (an anonymous count in the checkout funnel, nothing about the customer).

= 1.10.0 =
* New optional setting "Payment pop-up": on the classic checkout, "Place order" opens the Mintage Pay payment page in a pop-up over your checkout, so the customer never leaves your store. When the payment is in, the customer goes straight to your order-received page. Closing the pop-up keeps the order; "Place order" again reopens the same payment. Your Mintage Pay account must be switched on for it; until then, or if the pop-up cannot load, customers are sent to the payment page as before. The block checkout keeps the usual redirect. Off by default.

= 1.9.0 =
* 36 more store currencies: NGN, ARS, PHP, IDR, VND, PKR, EGP, BDT, KES, GHS, TZS, COP, CLP, PEN, UYU, PYG, BOB, DOP, GTQ, CRC, THB, MYR, TWD, LKR, NPR, KZT, UAH, ILS, SAR, QAR, CZK, HUF, RON, ISK, XAF and XOF (57 in all). VND, CLP, PYG, ISK, XAF and XOF have no decimals.

= 1.8.0 =
* New optional setting "Discount for paying with Mintage Pay (%)": card payments cost you about 3% and Mintage Pay costs less, so you can pass part of the saving on. The checkout says "Save 3% when you pay with USDC or USDT." and, while the customer has Mintage Pay selected, a "Discount for paying with USDC / USDT" line comes off the products (after coupons, before shipping). Works with the classic and the block checkout. Off (0) by default.

= 1.7.0 =
* Renamed to Mintage Pay. API keys now start with mp_live_ / mp_test_ and webhooks are signed in the MintagePay-Signature header. The plugin's name changed with it, so this is a fresh install: remove the earlier plugin and connect this one with a new API key.

= 1.6.0 =
* Test keys (mp_test_...) now connect to the Mintage Pay sandbox automatically. "API base URL" is empty by default and only needed for a development server. A key used with the wrong host says so ("This looks like a test key; ...").
* The settings page shows which Mintage Pay account the store is connected to and whether it is live or in test mode, and an admin notice shows while a test key is saved.
* Refunds: "Refund via Mintage Pay" no longer leaves you with only "Refund manually". It explains that refunds are sent from your Mintage Pay dashboard and links there, and refunds nothing. A refund entered by hand in WooCommerce no longer emails the customer "Refunded" before money has moved; the real Mintage Pay refund is matched to it when it is confirmed, so the two are never counted twice.
* The checkout description lists only the networks you have turned on (or says "Pay with USDC or USDT from your crypto wallet or exchange." until Mintage Pay reports them). A description you wrote yourself is kept.
* The thank-you page for an order that is not paid yet says "Waiting for your payment" with a "Complete payment" button, instead of "Your order has been received".
* Order notes show amounts to the cent (the exact amounts stay in the order data), one payment per line, with the full transaction hash linked to the block explorer.
* New setting "Customer emails" (on by default): WooCommerce sends the order emails and Mintage Pay sends no separate receipt.
* Tested with WordPress 7.1.

= 1.5.0 =
* WooCommerce Subscriptions support. Each renewal becomes a Mintage Pay invoice and the customer gets the payment link by email. An unpaid renewal is marked Failed. Cancelling a subscription cancels it at Mintage Pay.
* Webhook events other than invoice events (for example subscription events) are accepted and ignored.

= 1.4.0 =
* Orders paid a little short (within your Mintage Pay underpayment tolerance) complete with a note showing the shortfall.
* Payments held for a sanctions review stay pending until cleared.

= 1.3.0 =
* Prices in EUR, GBP, CAD, AUD, JPY and more. Stores in a supported currency send the price in that currency; Mintage Pay converts it to the USD amount the customer pays, and the order notes show the rate. A paid invoice completes the order only when its price matches the order total in the store currency.
* Refunds on orders in a currency other than USD are noted on the order for you to record by hand, since the refund is sent in USD.

= 1.2.0 =
* Bank transfer (ACH or wire) for stores approved for it: when the customer chooses it on the payment page, the order goes On hold with the bank reference (so it is not cancelled as an abandoned checkout), and the customer's email and thank-you page explain how to finish paying. When you record the money in your Mintage Pay dashboard, the order moves to Processing. If the payment window passes with nothing paid, the order is cancelled.

= 1.1.0 =
* Refunds recorded in the Mintage Pay dashboard (verified on the blockchain) now appear on the WooCommerce order as refund records, once each, never more than what is still refundable. Stock and the gateway are not touched.

= 1.0.1 =
* The "Hold stock" timer no longer cancels an order whose invoice has money on it: the invoice is checked with Mintage Pay first, and if Mintage Pay cannot be reached the order is checked again on the next run.
* Cancelling an order now cancels its open or partially paid Mintage Pay invoice.
* A paid invoice is only completed when its amount and currency match the order total; otherwise the order goes on hold with a note.
* An invoice that closes part paid puts the order on hold with a note to refund or collect the rest, instead of cancelling it.
* A late partial payment on a cancelled order keeps the order cancelled and adds a note to refund the customer.
* A retry no longer sends the customer to an invoice that is about to expire.
* The payment method is only offered once the API key has been verified. An admin notice shows when it is not.
* Changing the API key now also removes the old webhook endpoint for this store, even when the old key was already revoked.
* Deactivating the plugin disables the store's webhook endpoint.
* No more "Overpaid" note for amounts under one cent (the TRON unique-amount offset).
* The thank-you page only asks for the rest of a partial payment while the invoice can still be paid.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.21.0 =
"Refund via Mintage Pay" now creates the refund in Mintage Pay, with a Send now link in the order notes. The order, stock and customer email follow once you send it. Adds a Return my funds page for card buyers.

= 1.20.0 =
"Pay by app" says Cash App in one tap at checkout instead of listing stablecoin networks. Your own description is kept.

= 1.19.0 =
The card form in the payment pop-up is filled in from the billing details for every payment choice, so buyers type less. Apple Pay and Google Pay are shown only where Mintage Pay offers them.

= 1.18.0 =
One-click "Connect to Mintage Pay" (no key to copy), a Get started box, an "Update Mintage Pay automatically" setting, and a fix for app icons shown where the apps are not offered.
