Accepting Payments with Authorize.net
The Authorize.net add-on lets your customers pay by credit or debit card in a card form right on your checkout page, so they never leave your site.
Authorize.net works for businesses in the United States, Canada, the United Kingdom, Europe and Australia. Each Authorize.net account charges in one currency, so set your store currency in Sunshine > Settings to match the currency of your Authorize.net account.
Installing the Add-on
If you have a Pro, Plus or Basic license, go to Sunshine > Add-ons and turn on Authorize.net. Sunshine downloads it, adds its license key and activates it for you. The steps are in Install add-ons for Pro/Plus/Basic licenses.
If you bought the add-on on its own, follow Install individually purchased add-on, then enter its key in Sunshine > Settings > Licenses. See License Keys if the key won't activate.
Getting Your API Login ID and Transaction Key
Sunshine connects to Authorize.net with two codes: an API Login ID and a Transaction Key. These are not the username and password you use to log in to Authorize.net.
- Log in to your Authorize.net account
- Go to Account > Settings > Security Settings > API Credentials & Keys
- Copy the API Login ID shown on that page
- Under Create New Key(s), choose New Transaction Key and click Submit
- Authorize.net asks you to confirm who you are, usually with a PIN sent to your email
- Copy the Transaction Key from the pop-up right away. Authorize.net only shows it once
If another website or app already uses your Transaction Key, making a new one stops the old one from working, either right away or after 24 hours depending on the box you tick. Update every place that uses it.
Setting Up Authorize.net in Sunshine
- Go to Sunshine > Settings > Payments
- Turn on Authorize.net with the toggle, then click Configure
- Set Mode to Live
- Choose a Transaction Type (explained below)
- Paste your API Login ID into Live Login ID and your Transaction Key into Live Transaction Key
- Click Save Changes
Here is every setting on the Authorize.net screen:
- Name: What customers see as the payment option at checkout. Leave it blank to show "Authorize.net".
- Description: The short line under the name at checkout. Leave it blank to show "Pay with credit card".
- Fees: Add an extra charge when customers pay this way, as a percentage or a fixed amount, with a Fee Name and Fee Amount. See Payment Gateway Fees.
- Mode: Live takes real payments. Test uses the Authorize.net sandbox, where no real money moves.
- Transaction Type: Whether cards are charged right away or only held. See the next section.
- Live Login ID and Live Transaction Key: Your codes from your real Authorize.net account. Shown when Mode is Live.
- Test Login ID and Test Transaction Key: Your codes from your Authorize.net sandbox account. Shown when Mode is Test.
Transaction Type: Charging Now or Later
Authorize and Capture is the recommended choice. The card is charged when the customer places the order, and the money goes into your account on Authorize.net's normal schedule. The order is marked paid (New) and the customer gets their receipt.
Authorize Only checks the card and holds the money on it, but doesn't take it. The order is still marked paid (New) in Sunshine and the receipt is sent, and a note is added to the order: "Authorize.net authorized the card but did not charge it yet. Capture the payment in your Authorize.net account."
With Authorize Only, you have to capture each payment yourself, or you never get the money:
- Log in to Authorize.net and go to Transaction Search > Unsettled Transactions
- Open the transaction (the order number is in the Invoice # column)
- Click Capture
Authorize.net only keeps a hold for a limited time, so capture each payment soon after the order comes in. Use Authorize Only when you want to look over each order before you charge for it. Otherwise, stick with Authorize and Capture.
Testing with the Authorize.net Sandbox
The sandbox is a separate practice account at Authorize.net with its own codes. Your live codes won't work in Test mode, and sandbox codes won't work in Live mode.
- Sign up for a free sandbox account at the Authorize.net Developer Center
- Log in at sandbox.authorize.net and get the API Login ID and Transaction Key the same way as above
- In Sunshine, set Mode to Test and paste them into Test Login ID and Test Transaction Key
- Place an order using card number 4111 1111 1111 1111, any future expiration date and any 3-digit CVC
In Test mode, customers see this note above the card form: "This will be processed as a test payment and no real money will be exchanged." Set Mode back to Live when you're done testing.
What Customers See at Checkout
When a customer chooses Authorize.net on the payment step, a card form appears on your checkout page with four fields: Card number, Expiration (MM/YY), CVC and Zipcode. Authorize.net doesn't need a full billing address, so there is no extra address step for it.
The button reads Submit Order & Pay followed by the order total. The card is sent to Authorize.net as soon as they click it.
What Happens After Payment
When Authorize.net approves the card, the order is marked New, the customer goes to their receipt page and the receipt email is sent. The Authorize.net transaction ID is saved on the order, in the Authorize.net tab on the order screen, and the order number is sent to Authorize.net as the invoice number so you can find the payment there.
When the card is declined
The customer stays on the checkout page and sees why, for example "Error processing credit card: This transaction has been declined. (2)" or "Your card was not approved. Please try again or use another card." They can fix the card details or use another card and try again. Nothing is charged.
When Authorize.net holds a payment for review
If your Authorize.net fraud filters flag a payment, Authorize.net holds it instead of approving it. Sunshine leaves the order as Pending Payment and doesn't send the receipt. The customer is taken to their receipt page, which shows the order as pending. A note on the order gives the transaction ID and tells you to approve or decline it in Authorize.net.
- In Authorize.net, find the transaction under your held or unsettled transactions and open it
- Click Approve or Decline
- Back in Sunshine, open the order and change its status. Set it to New if you approved it. This finishes the order and sends the customer their receipt. Set it to Cancelled if you declined it
When a prepaid or gift card covers only part of the order
Some prepaid and gift cards only have enough on them to pay part of the total. Authorize.net can approve that smaller amount, but Sunshine won't accept a partial payment. It cancels that partial charge in Authorize.net and tells the customer: "Your card does not have enough on it to pay the full order total, so it was not charged. Please use another card."
A note is added to the order with the amount the card covered. If Sunshine couldn't cancel the partial charge, the note says so and gives the transaction ID, so you can void it yourself in Authorize.net.
Refunds
You can refund an Authorize.net payment from your WordPress admin.
- Open the order in Sunshine > Orders
- In the Order Actions panel, choose Refund payment in Authorize.net
- Leave Full refund ticked to refund everything that's left, or untick it and enter the amount
- Click Apply
A full refund marks the order Refunded. A partial refund is recorded on the order and comes off its total, but the order keeps its status. You can make more partial refunds later, up to what's left.
Sunshine doesn't email the customer about an Authorize.net refund, so let them know yourself.
Some refunds have to be done in Authorize.net instead:
- Payments that haven't settled yet. Authorize.net only refunds a payment after it settles, which usually happens once a day. Until then, void the payment in Authorize.net, then mark the order Cancelled or Refunded in Sunshine.
- Authorize Only payments you never captured. There's no charge to refund. Void the hold in Authorize.net instead.
- Older payments. Authorize.net only allows refunds for a limited time after a payment settles. After that, you'll need to send the money back another way.
If a refund doesn't go through, Sunshine shows Authorize.net's reason at the top of the order screen.
Admin Payment Problem Email
Sunshine can email you when Authorize.net approves only part of an order on a prepaid card, so you know a customer tried to pay and was turned away. This email is off until you turn it on.
- Go to Sunshine > Settings > Email and open Admin Payment Problem
- Tick Enabled
- Add one or more addresses in Recipient(s), or leave it empty to send to your site's admin email
- Under Send when, keep "A payment didn't match the order" ticked
The email also covers orders marked Failed and other payment problems. See Emails for all the options.
Troubleshooting
"User authentication failed due to invalid authentication values"
Authorize.net doesn't recognize your codes. Check that:
- You copied the API Login ID and Transaction Key, not your Authorize.net username and password
- Live codes are in the Live fields and sandbox codes are in the Test fields, and Mode matches the codes you're using
- There are no spaces before or after either code
- The Transaction Key is still current. If someone made a new one in Authorize.net, the old one stops working
"No response from credit card processor"
Your website couldn't reach Authorize.net. This usually means your web host or a security plugin is blocking connections from your site to other servers. Ask your host to allow connections to Authorize.net.
Orders are marked paid but the money never arrives
Check your Transaction Type. With Authorize Only, every payment waits for you to capture it in Authorize.net. Switch to Authorize and Capture if you want cards charged right away.
An order is stuck on Pending Payment
Open the order and read its notes. If Authorize.net held the payment for review, approve or decline it in Authorize.net, then change the order's status as described above.
If you need more detail about what happened at checkout, turn on logging and try another test order.
Still need help?
If you have not yet found your answer in the documentation articles, please contact support