How Gatemi Authorize.Net for WooCommerce Works

A card payment, step by step

  1. On the checkout, the card fields belong to the plugin's form, and Authorize.Net's Accept.js script is loaded from js.authorize.net (jstest.authorize.net in sandbox) with your Public Client Key.
  2. When the shopper places the order, Accept.js sends the card number, expiry and CVV straight to Authorize.Net and gets back a one-time token ("opaque data"). Only that token, the card's last four digits, type and expiry are posted to your store. This keeps the store at PCI-DSS SAQ A-EP.
  3. The store sends one createTransactionRequest with the token, the amount, the billing and shipping details and your WooCommerce order id as the reference (refId), as Authorize and capture or Authorize only.
  4. Authorize.Net's answer decides the order:
Answer Order
Approved, captured Paid — WooCommerce's normal status, usually Processing
Approved, authorize only On hold, with the authorization id stored for capture
Held for review by your fraud filters On hold — Payment is held for review by Authorize.Net fraud filters. Approve or decline transaction … in the Authorize.Net merchant interface.
Declined or error The shopper sees the reason and can try again

The transaction id, authorization code, card type and last four digits are stored on the order.

Duplicate protection

Each request asks Authorize.Net to refuse an identical transaction within 120 seconds, so a shopper who presses the button twice is not charged twice. Developers can change the window with the gatemi_authnet_duplicate_window filter.

Authorize only, then capture

With Transaction type set to Authorize only, the card is reserved, not charged. The order waits On hold, and the Order actions menu offers Capture Authorized Payment — shown only for this plugin's orders that are On hold and carry an authorization. Authorizations expire at Authorize.Net after a time set by the card networks, so capture before you ship and well within that.

Fraud review

When your Authorize.Net Fraud Detection Suite holds a payment, the order is put On hold and nothing more happens on your site. You decide in the Authorize.Net merchant interface:

  • Approve → the net.authorize.payment.fraud.approved webhook completes the order (or, for an authorize-only payment, makes it ready to capture).
  • Decline → net.authorize.payment.fraud.declined marks the order Failed.

The plugin remembers how the payment was charged, so an approval completes it the way it was taken even if you changed Transaction type in the meantime.

Refunds and voids

WooCommerce's Refund button works out what Authorize.Net allows:

  • Settled transaction (usually the next day) → a refund, full or partial.
  • Not settled yet → only a void of the whole transaction is possible. A refund of the full amount voids it. A partial refund is refused with This transaction has not settled yet, so only a full void is possible. — wait for settlement, then refund the part.

A refund or void made in the Authorize.Net merchant interface reaches the order through the webhook: a refund is recorded as a WooCommerce refund (Refund issued in Authorize.Net), a full void cancels the order. A refund the store sent itself is recognised by its transaction id and not recorded twice.

eCheck (ACH)

The shopper enters a routing and account number and the account type (Accepted bank account types). Bank details are sent with the transaction and not stored by the plugin. Because ACH takes days:

  1. The order goes to Order status after checkout (On hold by default).
  2. When Authorize.Net reports the capture by webhook, the order is marked paid and moved to Order status when payment clears (Processing).

Refunds: before settlement only a full void is possible. After settlement an eCheck cannot be refunded from WooCommerce — because the bank details are not kept — so refund it in the Authorize.Net merchant interface. The webhook then records it on the order.

Google Pay

Google Pay appears as a payment method at checkout and as an express button on the Cart page and the Top of checkout (classic and block-based). The shopper picks a card in Google's own sheet, Google hands the store an encrypted token, and the store sends it to Authorize.Net with your Gateway ID. It runs in Google's TEST environment while the plugin is in Sandbox, and in PRODUCTION — which needs your Google Pay merchant ID — when Live. Orders placed from the express button are marked as such.

Saved cards and subscriptions

With Saved cards on, a signed-in shopper can save a card at checkout or in My Account → Payment methods. The card is stored as a payment profile in Authorize.Net's Customer Information Manager (CIM), under one customer profile per shopper and environment. WooCommerce keeps a token pointing at it.

  • WooCommerce Subscriptions renewals are charged against the saved profile with nobody present.
  • WooCommerce Pre-Orders charged on release use the saved card.
  • FunnelKit one-click upsells after checkout charge the card saved on the parent order.

If a customer profile or payment profile is deleted in Authorize.Net, the net.authorize.customer.deleted / …paymentProfile.deleted webhook removes the matching saved card from your store, so a shopper is never offered a card that no longer exists.

Webhooks

Authorize.Net posts events to /wp-json/gatemi-authnet/v1/webhook:

  1. The body must carry an event type, a payload and an X-ANET-Signature header, or it is refused (400).
  2. The signature is checked: an HMAC-SHA512 of the body with the Signature Key of the current environment, compared in constant time. A mismatch is refused (401).
  3. The notification id is claimed before anything is applied — an option gatemi_authnet_wh_{md5}, added with add_option() and a constant value, so two simultaneous deliveries of one notification cannot both win. A notification already claimed is answered duplicate and not applied again. Claims are remembered for two days and swept as new ones are taken.
  4. The order is found by its reference and must belong to one of this plugin's gateways.
  5. The event is applied:
Event What happens
authcapture.created, priorAuthCapture.created Marks an unpaid order paid; for eCheck moves it to Order status when payment clears. A partial capture puts it on hold with a note. A capture for an order that is cancelled or failed locally is noted for you to reconcile
void.created A full void cancels the order; a partial one is noted
refund.created Recorded as a WooCommerce refund
fraud.approved, fraud.declined See Fraud review
customer.deleted, customer.paymentProfile.deleted Saved cards removed

If applying an event fails, the duplicate claim is released and the plugin answers 500, so Authorize.Net's retry can try again.

Currencies

The card method is shown when the store currency is one Authorize.Net processes (AUD, CAD, DKK, EUR, GBP, NOK, NZD, PLN, SEK, USD). eCheck and Google Pay are shown in USD. A method outside its currency is not offered at all.

Shopping Cart
Scroll to Top