Guides / CyberSource

CyberSource Microform v2 Setup for WooCommerce

CyberSource Microform v2 Setup: From a REST shared secret key to a paid test order in about 10 minutes.

This guide walks through the CyberSource Microform v2 setup for WooCommerce with our CyberSource Microform v2 for WooCommerce plugin: creating your keys, filling in the settings, taking a test payment and going live. Allow about 10 minutes for the test payment, plus however long CyberSource takes to turn on any services you still need.

If you want the background first (what Microform is and how the one-time token keeps card data off your server), read CyberSource Microform Integration v2 for WooCommerce.

CyberSource Microform v2 setup: create a REST shared secret key, paste the keys in WooCommerce, check the connection and pay a test order

What you need before you start

  • WordPress 6.2 or later, WooCommerce 7.6 or later, and PHP 7.4 or later with the OpenSSL extension.
  • HTTPS on the live store. In Live mode the card method stays hidden on a site served over plain HTTP.
  • A CyberSource merchant account. For testing, a free sandbox account from the CyberSource developer site is enough.
  • Token Management Service (TMS) on the account if you want saved cards or WooCommerce Subscriptions, and Payer Authentication if you want 3-D Secure.

CyberSource turns services on per account, and test and live accounts are set up separately. When you contact them, say that you use their REST API with Microform Integration v2, plus Token Management, Payer Authentication and merchant-initiated recurring payments if you need them. Naming the services speeds things up.

Step 1: Install the plugin

  1. In your CodeCanyon download, find the plugin zip, cybersource-microform-v2-for-woocommerce-<version>.zip. Don’t upload the whole download package, because it also contains the documentation.
  2. In WordPress, go to Plugins > Add New Plugin > Upload Plugin, choose the zip and click Install Now, then Activate.
  3. Open WooCommerce > Settings > Payments > CyberSource Microform v2.

The plugin starts disabled and in Test mode, so nothing changes at your checkout until you finish the setup.

Step 2: Create a REST shared secret key

The plugin signs every request with a REST shared secret key. A test key works only in Test mode and a live key only in Live mode, so start with the sandbox.

  1. Sign in to the sandbox Business Center at businesscentertest.cybersource.com.
  2. Go to Payment Configuration > Key Management and click Generate key.
  3. Choose REST – Shared Secret and create the key.
  4. Copy the Key ID and the shared secret. The secret is shown only once; if you lose it, create a new key.
  5. Note your Merchant ID, the organization ID you sign in with.

Keep the shared secret private. Anyone with the Merchant ID, Key ID and secret can make requests on your account, so don’t email it or paste it into a support ticket.

Step 3: Enter the keys and check the connection

  1. Leave Mode on Test.
  2. Paste the sandbox Merchant ID, Key ID and Shared secret key, and click Save changes.
  3. Click Check connection. It should say it is connected to CyberSource test, and it tells you whether 3-D Secure (Payer Authentication), Cardinal Cruise Hybrid and Token Management are available for these keys.

If Check connection says CyberSource refused the request, the keys usually don’t match the mode, the Merchant ID isn’t the organization the key was created in, or the secret wasn’t copied in full. Creating a new key is often the quickest fix.

Step 4: Choose your payment settings

  • Enable/Disable: tick it to offer card payments at checkout.
  • Accepted cards: Visa, Mastercard, American Express, Discover, Diners Club, JCB, Maestro and UnionPay. Tick only the networks your CyberSource account can process. Other cards are refused as they are typed, and only the icons of the brands you tick are shown.
  • When to charge: Charge when the order is placed captures straight away and the order goes to Processing. Authorize only, charge later reserves the money and leaves the order On hold until you capture it.
  • Saved cards: lets logged-in shoppers save a card. Turn it on only if Check connection reports Token Management.
  • 3-D Secure: asks the card’s bank to verify payments. Turn it on only if Check connection reports Payer Authentication.
  • Name, Note and Security note: the wording shoppers see. The security note is the line under the card fields; you can reword it or leave it empty to hide it.

Save your changes.

Step 5: Take a test payment

Place an order on your store and pay with the test card 4111 1111 1111 1111, any future expiry date and any security code. The order moves to Processing. Then open the order and refund part of it, to see refunds working.

In Test mode, a Test mode: card numbers to try panel appears under the card fields at checkout, with a Copy button for each number. Some of the approved test cards:

Card Test number
Visa 4111 1111 1111 1111
Mastercard 5555 5555 5555 4444
American Express 3782 822463 10005 (4-digit security code)
Discover 6011 1111 1111 1117

Test mode is visible to every visitor, and their orders aren’t charged. On a store that is already selling, test on a staging copy, or keep Test mode on only for as long as the test takes.

Step 6: Turn on 3-D Secure (optional)

  1. Ask CyberSource to turn on Payer Authentication for your account, for test and live separately.
  2. Click Check connection. It reports whether 3-D Secure works with your keys and whether the account uses Cardinal Cruise Hybrid.
  3. If it uses Cardinal Cruise Hybrid, enter the Cardinal API Identifier, Org Unit ID and API Key that CyberSource or Cardinal gave you. Without them the bank’s verification window can’t open.
  4. Tick 3-D Secure and save.

To test it, use these Visa cards with the expiry date 01 of the year three years from now (the test panel at checkout shows the exact date):

Number What happens
4000 0000 0000 2701 Frictionless: the bank approves without asking the shopper anything.
4000 0000 0000 2503 Challenge: the bank’s verification window opens. Complete it to pay.
4000 0000 0000 2925 Verification fails and the payment is refused.

3-D Secure with CyberSource Microform v2: place the order, the bank checks it, verify only if the bank asks, then paid

Step 7: Saved cards and subscriptions (optional)

With Token Management on, tick Saved cards. Logged-in shoppers can then tick Save to account at checkout, or add a card under My Account > Payment methods. Your store keeps only CyberSource’s token IDs plus the brand, last four digits and expiry for display. Cards saved in Test mode are hidden in Live mode, and the other way round.

With WooCommerce Subscriptions active, nothing else needs setting up: the card is always stored on the first payment, free trials store it with a $0 card check, and renewals are charged automatically as merchant-initiated payments. Your processor has to support $0 authorizations and merchant-initiated recurring payments, so confirm both with CyberSource before you sell subscriptions.

Step 8: Go live

  1. Make sure the store is served over HTTPS.
  2. Create a REST shared secret key in the live Business Center at businesscenter.cybersource.com.
  3. Set Mode to Live, paste the live Merchant ID, Key ID and shared secret, and save.
  4. Click Check connection. It should say it is connected to CyberSource live. Turn on 3-D Secure and Saved cards only if it reports them as available on the live account.
  5. If you use Cardinal Cruise Hybrid, enter the live Cardinal values.
  6. Place a small real order with your own card, then refund it.
  7. Turn off Debug log if you turned it on. The log can contain shoppers’ billing details.

For a wider pre-launch checklist, see moving CyberSource from sandbox to production.

Capturing, refunding and voiding orders

If you chose Authorize only, open the order and pick Capture CyberSource authorization in Order actions. Capture before the authorization expires; banks usually hold it for about 7 days, sometimes less.

Refunds use WooCommerce’s normal Refund button. A captured payment can be refunded in full or in parts. An authorization that was never captured can only be refunded in full, which voids it and releases the money. Every capture, refund and void adds an order note with its CyberSource ID.

Troubleshooting the setup

The card method doesn’t appear at checkout

Check that Enable/Disable is ticked, all three of Merchant ID, Key ID and shared secret are filled in, the live store uses HTTPS, and the store currency is one your CyberSource account accepts.

The card fields don’t load or show “Try again”

Click Try again for a fresh card form. Caching and optimization plugins must not cache the checkout page or delay its scripts. A Content Security Policy must allow flex.cybersource.com and testflex.cybersource.com (plus the Cardinal Commerce hosts when 3-D Secure is on). Antivirus programs with HTTPS scanning can also block the fields on the computer they run on.

A payment is declined

Open the order: the note shows CyberSource’s status and reason. Our guide to CyberSource reason codes explains the common ones. Decision Manager rules in your CyberSource account can also reject or hold payments; held orders wait On hold until you accept or reject them in the Business Center.

Frequently asked questions

How long does the CyberSource Microform v2 setup take?

About 10 minutes from a new sandbox key to a paid test order. Going live takes as long as CyberSource needs to set up your live account and any services such as Payer Authentication or Token Management.

Can I use my sandbox keys on the live store?

No. Test keys work only in Test mode and live keys only in Live mode. Create a separate key in the live Business Center.

Does it work with the block checkout?

Yes. It works with the Cart and Checkout blocks, the classic checkout and the pay-for-order page, and it is compatible with HPOS.

Where do I get the plugin?

CyberSource Microform v2 for WooCommerce is sold on CodeCanyon, with 6 months of support included. The full user guide comes in the download.

Leave a Reply

Your email address will not be published. Required fields are marked *