Donations API Error XML Documentation

Options

As it turns out, there is no complete documentation on the xml structure of the errors returned by the Donation API. As a result, I've been encouraged to start posting the errors that I have seen. If you are also using the donation API, please post different types of error messages that you have seen. Here are a few to start it off.

Note: The main difference I can see is when it's a credit card number related error. Also, the field validations seem to be performed first. If you have field validation errors and a bad credit card number, it will only report the field errors. It also seems that the regex for credit card number length and the check for the expiration date being in the past seem to be handled by the field validation mechanism instead of the credit card processing mechanism.

Field Errors

<donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd">

<errors>

<code>101</code>

<message>

Error: There was a problem encountered while processing your donation.

</message>

<reason>FIELD_VALIDATION</reason>

<pageError>

There was a problem processing your request. Please see below.

</pageError>

<fieldError>Credit card number is invalid.</fieldError>

<fieldError>Gift amount is invalid.</fieldError>

<fieldError>Billing city is required.</fieldError>

</errors>

</donationResponse>

Malformed Credit Card Number (too few digits etc)

<donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd">

<errors>

<code>101</code>

<message>

Error: There was a problem encountered while processing your donation.

</message>

<reason>FIELD_VALIDATION</reason>

<pageError>

There was a problem processing your request. Please see below.

</pageError>

<fieldError>Credit card number is invalid.</fieldError>

</errors>

</donationResponse>

Expiration Date Is Past

<donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd">

<errors>

<code>101</code>

<message>

Error: There was a problem encountered while processing your donation.

</message>

<reason>FIELD_VALIDATION</reason>

<pageError>

There was a problem processing your request. Please see below.

</pageError>

<fieldError>Credit card expiration date is invalid.</fieldError>

</errors>

</donationResponse>

Bad Credit Card/CVV Number

<donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd">

<errors>

<code>101</code>

<message>

Error: There was a problem encountered while processing your donation.

</message>

<reason>CARD_DECLINED</reason>

<declineReason>CARD_DECLINE</declineReason>

<declineDetail>Invalid account number: INVALID CARD</declineDetail>

<declineUserMessage>

The credit card was declined. Please check the information that you entered.

</declineUserMessage>

<pageError>

The credit card was declined. Please check the information that you entered.

</pageError>

</errors>

</donationResponse>

Tagged:

Comments

  • Colin,


    Are there any specific settings you use to get the fieldErrors to show up? I can't get a <reason> to show up with FIELD_VALIDATION at all. FWIW, here is an XML response from another org, first without any donation fields entered:


    <?xml version="1.0" encoding="UTF-8"?>

    <donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd" xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <errors>

    <code>101</code>

    <message>Error: There was a problem encountered while processing your donation.</message>

    <reason>FIELD_VALIDATION</reason>

    <pageError>There was a problem processing your request. Please see below.</pageError>

    <fieldError>An email address is required.</fieldError>

    <fieldError>A state or province is required.</fieldError>

    <fieldError>A last name is required.</fieldError>

    <fieldError>A zip or postal code is required.</fieldError>

    <fieldError>A street address is required.</fieldError>

    <fieldError>A first name is required.</fieldError>

    <fieldError>A city is required.</fieldError>

    </errors>

    </donationResponse>



    With all fields entered except a CC #:



    <?xml version="1.0" encoding="UTF-8"?><br /><donationResponse xsi:schemaLocation="<a href="http://convio.com/crm/v1.0" target="_blank">http://convio.com/crm/v1.0</a> <a href="http://service.convio.net/xmlschema" target="_blank">http://service.convio.net/xmlschema</a>/crm.public.v1.xsd" xmlns="<a href="http://convio.com/crm/v1.0" target="_blank">http://convio.com/crm/v1.0</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"><br /> <errors><br /> <code>101</code><br /> <message>Error: There was a problem encountered while processing your donation.</message><br /> <reason>UNSPECIFIED</reason><br /> <pageError>Error: Neither a credit card number nor a bank account number was specified. Some form of payment must be provided.</pageError><br /> </errors><br /></donationResponse><br /><br /><br />With an invalid CC #:<br /><br />

    <?xml version="1.0" encoding="UTF-8"?><br /><donationResponse xsi:schemaLocation="<a href="http://convio.com/crm/v1.0" target="_blank">http://convio.com/crm/v1.0</a> <a href="http://service.convio.net/xmlschema" target="_blank">http://service.convio.net/xmlschema</a>/crm.public.v1.xsd" xmlns="<a href="http://convio.com/crm/v1.0" target="_blank">http://convio.com/crm/v1.0</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"><br /> <errors><br /> <code>101</code><br /> <message>Error: There was a problem encountered while processing your donation.</message><br /> <reason>FIELD_VALIDATION</reason><br /> <pageError>There was a problem processing your request. Please see below.</pageError><br /> <fieldError>Credit card number is invalid.</fieldError><br /> </errors><br /></donationResponse><br /><br /><br />With a valid CC #, but invalid expiration date:<br /><br />

    <?xml version="1.0" encoding="UTF-8"?><br /><donationResponse xsi:schemaLocation="<a href="http://convio.com/crm/v1.0" target="_blank">http://convio.com/crm/v1.0</a> <a href="http://service.convio.net/xmlschema" target="_blank">http://service.convio.net/xmlschema</a>/crm.public.v1.xsd" xmlns="<a href="http://convio.com/crm/v1.0" target="_blank">http://convio.com/crm/v1.0</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"><br /> <errors><br /> <code>101</code><br /> <message>Error: There was a problem encountered while processing your donation.</message><br /> <reason>FIELD_VALIDATION</reason><br /> <pageError>There was a problem processing your request. Please see below.</pageError><br /> <fieldError>Credit card expiration date is invalid.</fieldError><br /> </errors><br /></donationResponse>




Categories