question

noumansarwar avatar image
noumansarwar asked Leonardolap edited

Issue Creating ACH token got 400 - Invalid Json Format

I got an error while creating ACH token although I don't have any eCheck data I entered dummy false data here is given json payload object that I used given below:

{

"ach": {

"bank_account_number": "string",

"bank_routing_number": "string",

"encrypted": true,

"check_type": "personal_check",


"customer_id_type": "driver_license",

"customer_id_state": "string",

"customer_id": "string",


"first_name": "string",

"last_name": "string",

"business_name": "string",

"email": "string",

"phone": "string",

"session_id": "string",

"address_line1": "string",

"address_line2": "string",

"address_city": "string",

"address_state": "string",

"address_zip": "string",

"address_country": "string",

"agreement": {

"locale": "en",

"template_data": "Nothing",

"type": "Self",

"agreement_id": "93859dklsdkf"

}


}

}

Got this response with status code 400

{

"message": "Invalid JSON format"

}


API Token
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image
bryanvargas answered
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sravan avatar image
sravan answered

could someone please send a screenshot with all the details, this is still not working

,

That request example also did not work, could someone please send a screenshot on how the ach token is generated, clover is very bad at documentation, please someone help

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tommchris avatar image
tommchris answered

The error message "400 - Invalid JSON Format" typically indicates that the JSON data being sent in your API request is not properly formatted. This can occur when creating an ACH token or performing any API operation that requires JSON data.

Incredibox Sprunki

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jhonleo02 avatar image
jhonleo02 answered jhonleo02 edited

The error message "Invalid JSON format" indicates that there's an issue with the JSON payload you're sending. Ensure that all required fields have valid values, especially for fields marked as strings. For example, replace "string" with actual values or valid placeholders. Additionally, check for proper JSON syntax, including correct nesting and punctuation. Validate your JSON using a JSON validator to catch any formatting issues. Visit forums to explore more, and discover additional insights

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

landy avatar image
landy answered

I appreciate the subtlety and depth Solar of this thought. It’s very well stated.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

raeesjow avatar image
raeesjow answered raeesjow edited

Some fields might expect specific formats. For instance, "check_type" might require valid values (e.g., personal_check is fine, but check for allowed values in the documentation). Similarly, "customer_id_type" and "customer_id_state" may need specific formats.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Leonardolap avatar image
Leonardolap answered Leonardolap edited

The error "400 - Invalid JSON Format" usually means the JSON data in your API request is incorrectly formatted. This often happens when creating an ACH token or performing other API actions that rely on properly structured JSON data.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community