cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is it possible to invoke the update customer payment profile before the authorization request?

Problem: When proceeding with payment using Authorize.Net and an existing saved payment method, the order is placed with the billing address saved in the existing customer payment profile, rather than the billing address selected on the checkout page.

So, in this case, how can I send a request to update the Customer Payment Profile before the payment authorization request at 'https://test.authorize.net/Payment/Api.ashx'?.

sachinpawar
Member
3 REPLIES 3

We offer a Hosted Customer Profile feature similar to Hosted Payment, enabling you to manage your profiles. For more information, please visit this page: Customer Profiles.

Regards,
Dipesh
Please DONOT submit any sensitive data
dipespat
Contributor

@sachinpawar wrote:

Problem: When proceeding with payment using Authorize.Net and an existing saved payment method, the order is placed with the billing address saved in the existing customer payment profile, rather than the billing address selected on the checkout page.

So, in this case, how can I send a request to update the Customer Payment Profile before the payment authorization request at ':https://test.authorize.net/Payment/Api.ashx'?.


Use the updateCustomerPaymentProfile API
Before sending the payment authorization request, you must update the customer's payment profile with the selected billing address. Use the updateCustomerPaymentProfileRequest API method provided by Authorize.Net.

Structure the Update Request
Prepare the request payload with the necessary details, including:

customerProfileId (unique ID of the customer profile).
paymentProfileId (unique ID of the payment method to update).
Updated billTo object with the new billing address.

<updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>YourAPILoginID</name>
<transactionKey>YourTransactionKey</transactionKey>
</merchantAuthentication>
<customerProfileId>123456789</customerProfileId>
<paymentProfile>
<customerPaymentProfileId>987654321</customerPaymentProfileId>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>123 Updated St.</address>
<city>Updated City</city>
<state>CA</state>
<zip>90001</zip>
<country>USA</country>
</billTo>
</paymentProfile>
<validationMode>liveMode</validationMode>
</updateCustomerPaymentProfileRequest>


Send the Update Request
Post the XML request to the Authorize.Net API endpoint. Ensure you handle the response to confirm that the update was successful before proceeding to the payment authorization. Proceed with Payment Authorization
After successfully updating the payment profile, you can initiate the payment request with the updated billing address.

evaelfie
Member

Yes you can update the Customer Payment Profile before sending the authorization request.

Authorize.Net always uses the billing address stored in the Customer Profile when processing a transaction with a saved payment method.
So if the customer selects a different billing address on checkout, you must update their payment profile before calling createTransactionRequest.

So, in this case, how can I send a request to update the Customer Payment Profile before the payment authorization request at ':https://test.authorize.net/Payment/Api.ashx'?.

How to Update the Customer Payment Profile Before Authorization

Step 1 โ€” Call updateCustomerPaymentProfileRequest

Before you authorize the payment, send an update request with the new billing address chosen at checkout.

Minimum required fields:

  • customerProfileId

  • customerPaymentProfileId

  • updated billTo object

    XML Request Example

     

     
    <updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>YourAPILoginID</name> <transactionKey>YourTransactionKey</transactionKey> </merchantAuthentication> <customerProfileId>123456789</customerProfileId> <paymentProfile> <customerPaymentProfileId>987654321</customerPaymentProfileId> <billTo> <firstName>John</firstName> <lastName>Doe</lastName> <address>123 Updated St.</address> <city>Updated City</city> <state>CA</state> <zip>90001</zip> <country>USA</country> </billTo> </paymentProfile> <validationMode>liveMode</validationMode> </updateCustomerPaymentProfileRequest>

     

     

    API Endpoint

     

     
    https://api.authorize.net/xml/v1/request.api

     

     

    Note: This is the official endpoint for updating profiles โ€” not https://test.authorize.net/Payment/Api.ashx.


    Step 2 Confirm the Update Was Successful

    You must check the response:

    • If resultCode = Ok โ†’ proceed to payment authorization

    • If it fails โ†’ do not send the authorization request


      Step 3 Now Send Your Authorization Request

      After the profile is updated, call:

      • createTransactionRequest

      • using the existing customerProfileId and paymentProfileId

        Authorize.Net will automatically use the updated billing address.


        โœ” Final Answer (Short Version You Can Post)

        Yes, itโ€™s possible.
        Before sending the authorization request, call the updateCustomerPaymentProfileRequest API and update the billTo address of the customerโ€™s saved payment profile. Once the update returns a successful response, you can safely send the authorization request, and Authorize.Net will use the updated billing address.

        You must post your update request to:

         

         
        https://api.authorize.net/xml/v1/request.api

        After the update, run the payment authorization normally.

MikeHuston1
Member