I would like to add an editable company/business name field to my Accept Hosted Payment Form. How can I achieve this?
Here is the JSON object in my getHostedPaymentPageRequest -
function authUser(dono_amount, customer_type, user_email_address, user_first_name, user_last_name, user_business, user_address, user_city, user_state, user_zip, user_phone_number, show_credit_card, show_bank_account) {
$.when(
$.ajax({
url: "https://apitest.authorize.net/xml/v1/request.api",
type: "POST",
contentType: "application/json",
data: JSON.stringify({
"getHostedPaymentPageRequest": {
"merchantAuthentication": {
"name": "[name]",
"transactionKey": "[key]"
},
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": dono_amount,
"profile": {
"customerProfileId": "[id]"
},
"customer": {
"type": customer_type,
"email": user_email_address,
},
"billTo": {
"firstName": user_first_name,
"lastName": user_last_name,
"company": user_business,
"address": user_address,
"city": user_city,
"state": user_state,
"zip": user_zip,
"country": "US",
"phoneNumber": user_phone_number
}
},
"hostedPaymentSettings": {
"setting": [{
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"showReceipt\": true, \"url\": \"https://mysite.com/receipt\", \"urlText\": \"Donate\", \"cancelUrl\": \"mysite.com\", \"cancelUrlText\": \"Cancel\"}"
}, {
"settingName": "hostedPaymentButtonOptions",
"settingValue": "{\"text\": \"Donate\"}"
}, {
"settingName": "hostedPaymentStyleOptions",
"settingValue": "{\"bgColor\": \"#41413F\"}"
}, {
"settingName": "hostedPaymentPaymentOptions",
"settingValue": "{\"cardCodeRequired\": true, \"showCreditCard\": " + show_credit_card + ", \"showBankAccount\": " + show_bank_account + "}"
}, {
"settingName": "hostedPaymentSecurityOptions",
"settingValue": "{\"captcha\": true}"
}, {
"settingName": "hostedPaymentShippingAddressOptions",
"settingValue": "{\"show\": false, \"required\": false}"
}, {
"settingName": "hostedPaymentBillingAddressOptions",
"settingValue": "{\"show\": true, \"required\": false}"
}, {
"settingName": "hostedPaymentCustomerOptions",
"settingValue": "{\"showEmail\": true, \"requiredEmail\": true, \"addPaymentProfile\": false}"
}, {
"settingName": "hostedPaymentOrderOptions",
"settingValue": "{\"show\": true, \"merchantName\": \"MerchantName\"}"
}, {
"settingName": "hostedPaymentIFrameCommunicatorUrl",
"settingValue": "{\"url\": \"}"
}]
}
}
}),
dataType: "json",
success: function (response) {
console.log(response);
console.log(response.token);
$("#send_token input").attr("value", response.token)
}
})
).done(function () {
$("#iframe_holder").addClass("open-iframe");
$("#add_payment").show();
$("#send_token").attr({ "action": "https://test.authorize.net/payment/payment", "target": "add_payment" }).submit();
});
}
07-07-2024
04:24 AM
- last edited on
08-09-2024
11:26 PM
by
Underbat
08-05-2025 01:05 AM
To make the company/business name an editable field in the Accept Hosted Payment Form (Authorize. Net), customize the form using the Hosted Payment Settings in the Merchant Interface. Enable and mark the “Company” field as editable in the Billing Information section. Use the API to include hosted Payment Billing Address Options with "show Company": true and "required": false.
08-07-2025 12:31 AM
To make the company/business name editable in an Accept Hosted Payment Form, update your Authorize.Net payment form settings. In the form customization or API request parameters, set the company field as visible and editable instead of read-only. Save changes, then test the form to ensure users can enter or modify their business name.
08-12-2025 12:32 AM