- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
transactionRequest has invalid child profile
I've been trying for hours and cannot figure out the problem. I get the error
The element 'transactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'profile'
The api documentation shows profile as one tier under transactionRequest. Since that's wrong, where do I put it? I've read here and can't see what I'm doing wrong. Please look at this request and tell me what I'm doing wrong. Thank you.
{
"createTransactionRequest": {
"merchantAuthentication": {
"name": "",
"transactionKey": ""
},
"refId": "",
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": 1.05,
"payment": {
"creditCard": {
"cardNumber": "4111111111111111",
"expirationDate": "0220",
"cardCode": "999"
}
},
"billTo": {
"firstName": "",
"lastName": "",
"company": "",
"address": "",
"city": "",
"state": "FL",
"zip": "33169",
"country": "USA"
},
"customerIP": "",
"transactionSettings": {
"setting": {
"settingName": "testRequest",
"settingValue": "false"
}
},
"profile": {
"createProfile": "true"
},
"customer": {
"id": "123456"
}
}
}
}
โ06-17-2017 06:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since I can't find a way to edit my post, I'll leave this additional note as a reply:
After testing back and forth, I found that if I change the order so that 'profile' directly follows 'payment', even though the nested layer is at the same depth and still belongs to 'transactionRequest', then I can get a result that that replicates the post here.
Can someone explain to me how the order matters inside of an object? Admittedly this is really bizarre and very confusing. Any help is appreciated.
โ06-17-2017 07:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a way to solve this: https://stackoverflow.com/a/46576580/7396433
โ10-06-2018 02:21 AM

