Forums / Built-in Shipping and Payment Modules / Authorize.NET AIM refund gives "Bill To First Name is required" error

Authorize.NET AIM refund gives "Bill To First Name is required" error

Views: 1,254

Results 1 to 5 of 5
8 Oct 2025, 6:44 PM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Authorize.NET AIM refund gives "Bill To First Name is required" error

ZC 2.0.1, PHP 8.2, try to do a refund, and it bounces back with

Bill To First Name is required.

at the top in red as an error message.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

8 Oct 2025, 6:57 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Authorize.NET AIM refund gives "Bill To First Name is required" error

Looking at the order class, there is no such field as $order->billing['firstname'] which is used at various points in includes/modules/payment/authorizenet_aim.php.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

8 Oct 2025, 9:44 PM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Authorize.NET AIM refund gives "Bill To First Name is required" error

swguy:

Looking at the order class, there is no such field as $order->billing['firstname'] which is used at various points in includes/modules/payment/authorizenet_aim.php.

when querying an order, that is true. when looking an order object prior to the creation of the order, it is not true.

more to the point, a refund transaction does not require a firstname. at least it does not with the authorize.net api. see:

https://developer.authorize.net/api/reference/index.html#payment-transactions-refund-a-transaction

i would think that would be the same for the AIM api; but good luck finding that documentation as the authorize.net AIM api has been deprecated for many years now.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

8 Oct 2025, 11:04 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Authorize.NET AIM refund gives "Bill To First Name is required" error

The refund logic used to work from admin in prior releases; not sure why it does now or where this error message came from, especially since (as you noted) this is an old API which isn't generally upated.

There is documentation but I'm not seeing any useful clues in it.

https://www.authorize.net/content/dam/anet-redesign/documents/AIM_guide.pdf

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

9 Oct 2025, 12:23 AM
#5
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Authorize.NET AIM refund gives "Bill To First Name is required" error

swguy:

ZC 2.0.1, PHP 8.2, try to do a refund, and it bounces back with

Bill To First Name is required.

at the top in red as an error message.

well, i would turn on debug and ensure that this error is in fact coming back from authorize.net and not something from ZC.

if so, the documentation on page 29 clearly states what is required and first name is not on the list.

finally, i would ensure that you are actually sending a refund transaction. first name is required for payment transactions, and i would look at the x_type as potentially that may have somehow changed.

if all of that checks out i would look at your authorize.net dashboard to see the log of what transaction actually got sent.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.