Reply
Highlighted
Member
Posts: 4
Registered: ‎11-14-2017
Accepted Solution

Create a customer profile without payment info

[ Edited ]

Hi,

 

I do not know how to create a customer profile without payment information. I need to create a customer profile in order to use it with Accept Customer Hosted Form. The problem is that the api documentation says that the payment info is mandatory:

 

<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API_LOGIN_ID</name>
<transactionKey>API_TRANSACTION_KEY</transactionKey>
</merchantAuthentication>
<profile>
<merchantCustomerId>Merchant_Customer_ID</merchantCustomerId>
<description>Profile description here</description>
<email>customer-profile-email@here.com</email>
<paymentProfiles>
<customerType>individual</customerType>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2020-12</expirationDate>
</creditCard>
</payment>
</paymentProfiles>
</profile>
<validationMode>testMode</validationMode>
</createCustomerProfileRequest>

 

The fact that I need to create a customer profile with payment information at the same time does not make sense to me.

 

Could somebody help me to understand what I need to do?

 

Thanks a lot.

 


Accepted Solutions
Highlighted
Solution
Accepted by topic author rodrigoyaj
‎11-14-2017 11:59 AM
Member
Posts: 4
Registered: ‎11-14-2017

Re: Create a customer profile without payment info

Well, I took the validationMode off and now it works.

 

Thanks.

View solution in original post


All Replies
Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Create a customer profile without payment info

[ Edited ]

Hi @rodrigoyaj,

 

The payment profile is the actual payment information stored, so it makes sense that you'd need to provide that. The customer profile is just the customer information, and "contains" payment profiles and shipping profiles.

 

If you want to create a customer profile without any payment profiles, that's certainly possible, and is detailed in the API documentation for Create a Customer Profile. The section of the documentation that you linked to is specifically for creating a payment profile.

Highlighted
Member
Posts: 4
Registered: ‎11-14-2017

Re: Create a customer profile without payment info

Hi @Aaron, thanks for your answer.

 

You are right, my links is wrong. I wanted to linked to the same link that you mentioned (API documentation for Create a Customer Profile), sorry for that.

 

I did some test with the "Try it" functionality of "Create Customer Profile" section and I cannot make it work without the payment info.

 

I send this:

<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>data</name>
<transactionKey>data</transactionKey>
</merchantAuthentication>
<profile>
<merchantCustomerId>Merchant_Customer_ID</merchantCustomerId>
<description>Profile description here</description>
<email>customer-profile-email@here.com</email>
</profile>
<validationMode>testMode</validationMode>
</createCustomerProfileRequest>

 

I get this:

<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>
Error
</resultCode>
<message>
<code>
E00013
</code>
<text>
Validation Mode is invalid without Payment Profiles.
</text>
</message>
</messages>
</createCustomerProfileResponse>

 

Thanks.

Highlighted
Member
Posts: 4
Registered: ‎11-14-2017

Re: Create a customer profile without payment info

It seems that I am missing the validationMode field.

Highlighted
Solution
Accepted by topic author rodrigoyaj
‎11-14-2017 11:59 AM
Member
Posts: 4
Registered: ‎11-14-2017

Re: Create a customer profile without payment info

Well, I took the validationMode off and now it works.

 

Thanks.

Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Create a customer profile without payment info

Yes, "validationMode" is a directive to tell the system how to validate the payment information sent. If you're not sending payment information, but you are telling the system how to validate payment information, that's a request that doesn't make sense, so it'll throw an error. (E00013 - "Validation Mode is invalid without Payment Profiles")

 

Glad everything worked out!

 

Highlighted
Member
Posts: 3
Registered: ‎07-31-2018

Re: Create a customer profile without payment info

I run in the same problem with node.js, i did remove the :

createRequest.setValidationMode(ApiContracts.ValidationModeEnum.NONE);

from the code but still, it requests the payment info and i gett an error:

{ code: 'E00029', text: 'Payment information is required.' }