Whenever I try to post this json data (I redacted the merchantAuthentication fields):
{ "createCustomerProfileRequest": { "merchantAuthentication": { "name": "XXXXXX", "transactionKey": "XXXXXXXXXXXXX" }, "profile": { "merchantCustomerId": "4928", "paymentProfiles": { "customerType": "business", "payment": { "bankAccount": { "nameOnAccount": "John Doe", "accountType": "checking", "routingNumber": "21000021", "accountNumber": "28342398", "echeckType": "WEB", "bankName": "Test bank", } } } }, "validationMode": "testMode" } }
I get the following error message:
{"messages":{"resultCode":"Error","message":[{"code":"E00003","text":"The element 'bankAccount' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'nameOnAccount' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'accountType, routingNumber' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'."}]}}
When I removed the nameOnAccount field, the error returned suggested that other fields should be removed as well. When I removed those fields, the error message I recieved told me that I needed to add nameOnAccount back. Any idea what's going on here?
Solved! Go to Solution.
01-21-2018 06:39 PM
Hi @sskacy18
Sorry for the trouble, the Json API which you are using has strict policy on the order of the elements, its because it based on the XML APIs, and thus you are getting the xsd error.
To get the correct result you will need to give the elements in the prescribed order only.
"bankAccount": { "accountType": "checking", "routingNumber": "121042882", "accountNumber": "123456789", "nameOnAccount": "John Doe", "echeckType" : "WEB", "bankName" : "Bank Name" }
Also, you can look into our SDKs for faster integration.
Hope this Helps !
01-21-2018 10:01 PM
Hi @sskacy18
Sorry for the trouble, the Json API which you are using has strict policy on the order of the elements, its because it based on the XML APIs, and thus you are getting the xsd error.
To get the correct result you will need to give the elements in the prescribed order only.
"bankAccount": { "accountType": "checking", "routingNumber": "121042882", "accountNumber": "123456789", "nameOnAccount": "John Doe", "echeckType" : "WEB", "bankName" : "Bank Name" }
Also, you can look into our SDKs for faster integration.
Hope this Helps !
01-21-2018 10:01 PM
That fixed it! Thank you!! I could have spent the rest of my life working on this and might have never figured it out.
01-22-2018 06:57 AM