- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Invalid child element 'expirationDate' in profile update
I am trying to update customer profiles. I keep getting an error which tells me that the credit card element has an invalid expiration date. I am logging the expiration dates which I send, and they are valid (for example, 2023-09). I am using the .net api so I cannot do anything about field order or the structure of the xml which gets sent. I have followed the example at https://github.com/AuthorizeNet/sample-code-csharp/blob/master/CustomerProfiles/UpdateCustomerPaymen... almost exactly. I can post some code, but other than the error handling and using real data, it is the same as the sample.
I need an idea of where to look for the problem - nothing I have found in the docs or forums is any help. It would be nice if there was a way to get the xml which is being sent, but I don't see how to do that.
โ06-14-2022 10:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ray482 if you are using the SDK, your request is formed with JSON and you can enter the fields in any order that you wish. You may still get an error "invalid child element" in some circumstances, but it is not anything to do with the order of the fields. In re your expiration date, I think the .net SDK excludes the dash and uses a MMYY format. Try your request using 0923.
โ06-14-2022 01:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not using the sdk - just using the authorizenet.dll with c#. The docs explicitly say to use the 2023-09 format, but some of the examples show 0923. I will give this a shot and see if it helps. Thanx for responding.
โ06-14-2022 01:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I found the problem. When updating a profile, I was not including a masked card number if the card did not change. So the credit card element had an expiration date, but it did not have a card number. I found this by serializing the request object to xml (would be nice if that function was part of the api).
โ06-14-2022 03:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's a danger of static discharge whilst two metal cans touch throughout decanting and during electrostatic spray painting.
โ10-16-2022 08:11 PM

