cancel
Showing results for 
Search instead for 
Did you mean: 

Error E_WC_20 The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:name' element is invalid

I am trying to create a JavaScript call using the instructions following the API documentation at https://developer.authorize.net/api/reference/features/acceptjs.html#Integrating_the_JavaScript_Libr.... I created sandbox account and obtained my public client key from Account > Settings > Security Settings > General Security Settings > Manage Public Client Key.

 

My POST body from the Accept.dispatchData() method is:

{  
   "securePaymentContainerRequest":{  
      "merchantAuthentication":{  
         "name":"2b427vXXXX",
         "clientKey":"79kvzcqrqRN6AHycs2D937d5GSp33Baaw9J8NB6U882H6Z49nADkXXXXXXXXXXXX"
      },
      "data":{  
         "type":"TOKEN",
         "id":"83c30d4d-b45c-5372-84e3-863e2a2255d8",
         "token":{  
            "cardNumber":"4111111111111111",
            "expirationDate":"0222"
         }
      }
   }
}

However I get the error E_WC_20

"The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:name' element is invalid - The value '9f22aLcpsP43kK43ykPWSEsGEUh8n7TXhZEVZz55a8S47J9xZ26EXXXXXXXXXXXX' is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value."
 
I know the credentials are correct because when I send that body to https://apitest.authorize.net/xml/v1/request.api using Postman I get a success message.
 
I am not using the correct key or not sending the clientKey correctly? authData.clientKey wants a 36 character string, but my public client key is 64.
mchaffins7
Member
0 REPLIES 0