question

noumansarwar avatar image
noumansarwar asked islasophia commented

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
1 comment
10 |2000

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

islasophia avatar image islasophia commented ·

Facing the issue of creating an ACH token with a 400 - Invalid JSON format error can be frustrating. It’s essential to ensure that the JSON structure is correctly formatted and all required fields are included. Just like a grease pump is needed to ensure smooth operation of machinery, proper formatting is crucial for smooth API integrations and token creation!

0 Likes 0 ·
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.

pauladepasquale avatar image
pauladepasquale answered

The "400 - Invalid JSON Format" error usually occurs when the JSON payload is incorrectly structured. Ensure your JSON is properly formatted, with correct syntax and data types. Use a JSON validator and refer to the API documentation for the correct format.

10 |2000

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

alexrose avatar image
alexrose answered

The error message "Invalid JSON format" typically indicates an issue with the structure or content of your JSON payload. Based on the payload you provided, here are a few potential issues to check:

  1. Quotation marks: Ensure all strings are enclosed in double quotation marks (not single quotes).
  2. Data types: Some fields (e.g., bank_account_number, bank_routing_number, customer_id, etc.) expect specific formats (e.g., numbers or valid IDs) and could cause issues if filled with dummy data or incorrect values.
  3. Missing required fields: Verify that all required fields are included and correctly formatted according to the API documentation.
  4. Check "agreement" object: Ensure the "agreement" object fields are valid and required for the API you're interacting with.

Double-check the payload against the API documentation for correct field types and required values.

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

When encountering the "400 - Invalid JSON Format" error, double-check that all required fields are included in your payload and adhere to the specified formats outlined in the API documentation. Fields like "check_type," "customer_id_type," or "customer_id_state" might need specific values or formats. Using a JSON linter can also help identify structural issues before making the Spotify APK API call.

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