- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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