Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 5
Registered: ‎12-22-2020

Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

Hi - I'm using the accept hosted iframe form with customer profiles enabled. Shipping / billing addresses are visible and required in the hosted form account settings. When a user makes a payment they are given the option to store their payment information and this all works fine for the initial payment. However, if a user then attempts to make a second payment and elects to use their stored payment information, a red validation message indicating that shipping information is missing appears. Since they elected to use saved payment information, no shipping / billing info shows up on the form and they have no way to submit or edit this information (which I assume is stored in the customer profile anyway). How do  I allow the customer to pay using their stored payment information in this situation?

 

Thank you!

Member
Posts: 5
Registered: ‎12-22-2020

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

I went a little further with this. The exact error message is "Ship To First Name is Required". I've confirmed that there IS shipping address associated with the CIM data for the user making the paymnet. I've tried several things including:

1) Creating the shipping information using accept suite.

2) Setting the shipping profile as default.

3) Setting shipping to not required when making the getHostedPaymentPage call (keep in mind that my client says that this MUST be required in the account hosted payment settings so I can't change this).

 

Still receive the same error.

Posts: 492
Topics: 0
Kudos: 99
Blog Posts: 0
Ideas: 0
Solutions: 42
Registered: ‎04-28-2017

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

[ Edited ]

Hello,

 

Each customer profile that is created is automatically assigned a Customer Profile ID, along with a Payment Profile ID for each payment method, and if applicable, a Shipping Profile ID for any shipping addresses. If they have entered incomplete information, they can update the profile at any time.

 

To create a customer shipping address, you would use a createCustomerShippingAddressRequest API call with the customerProfileId:

{
    "createCustomerShippingAddressRequest": {
        "merchantAuthentication": {
            "name": "xxxxxxx",
            "transactionKey": "xxxxxxxxx"
        },
        "customerProfileId": "10000",
        "address": {
            "firstName": "Mary",
            "lastName": "Smith",
            "company": "",
            "address": "123 Main St.",
            "city": "Bellevue",
            "state": "WA",
            "zip": "98004",
            "country": "USA",
            "phoneNumber": "000-000-0000",
            "faxNumber": ""
        },
        "defaultShippingAddress": true
    }
}

 

Updating a customer's shipping address is done with an updateCustomerShippingAddressRequest API call. The relevant JSON is below:

{
    "updateCustomerShippingAddressRequest": {
        "merchantAuthentication": {
            "name": "XXXXXXX",
            "transactionKey": "XXXXXXX"
        },
        "customerProfileId": "10000",
        "address": {
            "firstName": "Mary",
            "lastName": "Smith",
            "company": "",
            "address": "123 Main St.",
            "city": "Bellevue",
            "state": "WA",
            "zip": "98004",
            "country": "USA",
            "phoneNumber": "000-000-0000",
            "faxNumber": "",
            "customerAddressId": "30000"
        },
        "defaultShippingAddress": true
    }
}

 

Powered by NexWebSites.com -
Certified Authorize.net developers
Member
Posts: 5
Registered: ‎12-22-2020

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

Hi - thank you very much for your response. The problem I'm running into is that the customer profile DOES have a shipping address associated with it and the hosted payment form STILL fails with "Shipping First Name is required" message.

Posts: 492
Topics: 0
Kudos: 99
Blog Posts: 0
Ideas: 0
Solutions: 42
Registered: ‎04-28-2017

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

[ Edited ]

Hello,

 

Are there First Name values associated with all of the shipping addresses? And are you calling the hosted payment page with the customerProfileId?

 

Have you tried? :

"settingName": "hostedPaymentShippingAddressOptions", "settingValue": "{\"show\": true, \"required\": true}

Powered by NexWebSites.com -
Certified Authorize.net developers
Member
Posts: 1
Registered: ‎01-04-2021

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

the whole discussion helped me a lot thanks for the info

click to like 
kudos 
thanks again 

Member
Posts: 5
Registered: ‎12-22-2020

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

There is full shipping information (first name, last name, address) associated with the shipping profile. I am specifying the customer profile id in my getHostedPaymentPage request and also specifying that both billing and shipping address are required (these are both also required in the hosted form configuration of the account). The error only occurs when the user selects a saved payment method - the transaction succeeds if they manually enter all information every time.

Member
Posts: 5
Registered: ‎12-22-2020

Re: Issue with Accept Hosted / Customer Profiles when billing / shipping addresses are required

After a couple of support calls and some experimentation - so as far as I can tell - the accept hosted form just does not support using saved payment methods with shipping addresses required. It appears that the transactions that are created when selecting saved payment methods are created with no shipping address and requiring it in the hosted form configuration settings rightly raises a validation error. At this point it seems I'll have to create ui on my side to handle this situation. Thanks for the help and if anyone has any other ideas I'm all ears.