cancel
Showing results for 
Search instead for 
Did you mean: 

API error E00001 when calling getHostedPaymentPageRequest using example data

Hi,

 

I am trying to test the Accept Hosted integration method and am getting error when calling getHostedPaymentPageRequest. The error is E00001 "An error occurred during processing. Please try again."  I know the data must be formatted correctly because I'm using the exact Authorize.Net data from the example, just replacing the login ID and transaction key with mine. 

 

Here is my input data which I got directly from the GetHostedPaymentForm() – Sample Request and Response section of the Accept Hosted reference page.

 

 

{
	"getHostedPaymentPageRequest": {
		"merchantAuthentication": {
			"name": "API_LOGIN_ID",
			"transactionKey": "TRANSACTION_KEY"
		},
		"transactionRequest": {
			"transactionType": "authCaptureTransaction",
			"amount": "20.00",
			"customer": {
				"email": "bmcmanus@mail.com"
			},
			"billTo": {
				"firstName": "Ellen",
				"lastName": "Johnson",
				"company": "Souveniropolis",
				"address": "14 Main Street",
				"city": "Pecan Springs",
				"state": "TX",
				"zip": "44628",
				"country": "USA"
			}
		},
		"hostedPaymentSettings": {
			"setting": [{
				"settingName": "hostedPaymentBillingAddressOptions",
				"settingValue": "{\"show\": true, \"required\":true}"
			}, {
				"settingName": "hostedPaymentButtonOptions",
				"settingValue": "{\"text\": \"Pay\"}"
			}, {
				"settingName": "hostedPaymentCustomerOptions",
				"settingValue": "{\"showEmail\":true,\"requiredEmail\":true}"
			}, {
				"settingName": "hostedPaymentPaymentOptions",
				"settingValue": "{\"cardCodeRequired\":true}"
			}, {
				"settingName": "hostedPaymentReturnOptions",
				"settingValue": "{\"url\":\"https://www.google.com\",\"urlText\":\"Continue\",\"cancelUrl\":\"https://mysite.com/cancel\",\"cancelUrlText\":\"hkjhkjhkjhk\"}"
			}, {
				"settingName": "hostedPaymentSecurityOptions",
				"settingValue": "{\"captcha\": false}"
			}, {
				"settingName": "hostedPaymentShippingAddressOptions",
				"settingValue": "{\"show\":false,\"required\":true}"
			}, {
				"settingName": "hostedPaymentStyleOptions",
				"settingValue": "{\"bgColor\": \"EE00EE\"}"
			}]
		}
	}
}

 

I tried running this through code, through Fiddler and even directly from the API reference page by pasting it into the "Try It" box and clicking Send.  All give the E00001 error.

 

What is the issue?

 

wp
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions
RichardH
Administrator Administrator
Administrator
6 REPLIES 6

@wp Did you generate a signature key as mentioned in this post: https://community.developer.authorize.net/t5/Integration-and-Testing/Help-Migrating-from-SIM-to-CIM-...

 

Richard

RichardH
Administrator Administrator
Administrator

Yep, that was it.  And now of course I see that it mentions that requirement right on the reference page.  I guess I saw key and thought transaction key.  Oh well maybe this will help the next person who doesn't RTFM :)

 

Thanks

Hi, I've been having the same error despite being able to create the signature key

I'm trying an implementation with CFML

denlopez88
Member

Hi @denlopez88,

 

Can you post the request that your code creates?

Sure is button with an onclick event attached that perform this post request:

 

$.post("https://apitest.authorize.net/xml/v1/request.api",
{
"getHostedPaymentPageRequest": {
"merchantAuthentication": {
"name": "3fHh95RmE",
"transactionKey": "3p5mZ7fBN46F7Jt6"
},
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": "20.00",
"customer": {
"email": "bmcmanus@mail.com"
},
"billTo": {
"firstName": "Ellen",
"lastName": "Johnson",
"company": "Souveniropolis",
"address": "14 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
}
},
"hostedPaymentSettings": {
"setting": [{
"settingName": "hostedPaymentBillingAddressOptions",
"settingValue": "{\"show\": true, \"required\":true}"
}, {
"settingName": "hostedPaymentButtonOptions",
"settingValue": "{\"text\": \"Pay\"}"
}, {
"settingName": "hostedPaymentCustomerOptions",
"settingValue": "{\"showEmail\":true,\"requiredEmail\":true}"
}, {
"settingName": "hostedPaymentPaymentOptions",
"settingValue": "{\"cardCodeRequired\":true}"
}, {
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"url\":\"https://www.mysite.com/continue\",\"urlText\":\"Continue\",\"cancelUrl\":\"https://mysite.com/cancel\",\"cancelUrlText\":\"Cancel\"}"
}, {
"settingName": "hostedPaymentSecurityOptions",
"settingValue": "{\"captcha\": false}"
}, {
"settingName": "hostedPaymentShippingAddressOptions",
"settingValue": "{\"show\":false,\"required\":true}"
}, {
"settingName": "hostedPaymentStyleOptions",
"settingValue": "{\"bgColor\": \"EE00EE\"}"
}]
}
}
},
function(data,status){
alert("Data: " + data + "\nStatus: " + status);
}
);

what i get is a 200 ok response but in the message body i got this:

{"messages":{"resultCode":"Error","message":[{"code":"E00001","text":"Unexpected character encountered while parsing value: g. Path '', line 0, position 0."}]}}

Hi thanks for the quick response, i already manage to get a succesfull response from the authorize.net API, I think I had an issue with how my data was beeing sent in the post request I use JSON.stringify to format my data and finally get my token.