Plugins and links / Drupal Commerce

Drupal Commerce

Adds Pay with USDC or USDT as a payment gateway in Drupal Commerce. The customer pays on the Mintage Pay payment page and the payment is marked Completed by itself when it is final.

Tested on 5 October 2026 with Drupal 11.4 and Commerce 3 against the sandbox: add the gateway, checkout, payment, payment completed, and removal. Drupal 10 and Commerce 2 are supported by the module but have not been run yet, so test them with a sandbox key first.

What you need

Install

  1. Download commerce_mintage_pay.zip and unpack it. Copy the commerce_mintage_pay folder to web/modules/custom/.
  2. Enable the module: drush en commerce_mintage_pay -y, or go to Extend, tick Commerce Mintage Pay and click Install.
  3. In the Mintage Pay dashboard, open Developers > API keys and create a key. Copy it: it is shown only once.
  4. Go to Commerce > Configuration > Payment > Payment gateways and click Add payment gateway:
    • Name: Mintage Pay. The machine name becomes part of the address Mintage Pay calls, so do not change it later.
    • Plugin: Mintage Pay (USDC / USDT, off-site).
    • Display name: Pay with USDC or USDT, or your own wording.
    • API key: paste the key. It is stored encrypted and never shown again.
    • Status: Enabled.
  5. Click Save. The page says Mintage Pay: API key verified for (your business name). Webhook connected.
  6. Rebuild the cache (drush cr, or Configuration > Performance > Clear all caches) so the new payment option appears at checkout.
  7. Recommended: under Commerce > Configuration > Order types > Default, choose the Fulfillment workflow. With the plain Default workflow a placed order is at once "Completed" and unpaid orders cannot be cancelled for you.

Try it first with test money

  1. Create a free account at sandbox.mintagepay.com, set a payout address and create a key there.
  2. Add the gateway with the sandbox key, or edit it and save.
  3. In a private browser window, add a product, check out and choose Pay with USDC or USDT. You land on a payment page with a Test mode banner.
  4. Pay on the payment page with free test money. The page has a button to get some.
  5. The payment page sends you back to the store and the order is placed. Open the order's Payments tab: within a minute or two the payment is Completed.
  6. When you are happy, edit the gateway, paste your live key and save.

When to ship

Ship when the payment is Completed, not when the order is placed. The customer is sent back to your store as soon as their payment is seen, which can be a short while before it is final. During that time the order is already placed and its payment is Pending. It becomes Completed by itself, usually within a minute.

What you will see

What happened In Commerce
Customer sent to pay Payment New, order still a cart
Customer returned, payment not final yet Order placed, payment Pending
Paid in full Payment Completed
Paid, but the amount does not match the order Payment Pending, with a comment. Check before you ship
Part paid Payment Pending, with a comment saying how much is still owed
Payment window closed with part paid Payment Pending. Refund the customer or collect the rest
Payment window closed with nothing paid Payment Voided. A placed order is cancelled (Fulfillment workflow); a cart is kept
Paid after the order was cancelled Payment Pending, with a comment
Refund recorded in Mintage Pay The refunded amount on the payment

Comments go to Reports > Recent log messages, type commerce_mintage_pay. Enable the Commerce Log module to see them in the order's activity as well.

If something is wrong

Your key and webhook secret are never written to the log.

Update to a new version

  1. Replace the commerce_mintage_pay folder in web/modules/custom/ with the new one.
  2. Run drush updb -y, then drush cr.

Your gateway, your key and your past payments are kept. An order that was waiting for payment when you updated is still completed when the payment arrives.

Remove the module

  1. drush pmu commerce_mintage_pay -y, or Extend > Uninstall. This switches off your store's connection at Mintage Pay and removes the gateway and its stored key.
  2. Delete the commerce_mintage_pay folder.

Your orders and their payments are kept.

Last updated . This page as Markdown. Something missing or wrong? Write to hello@mintagepay.com.