When you make a request to the Dwolla API, your request is processed and a response is returned. This response, in JSON format, contains information about the success or failure of your request, along with any relevant data.
This section will guide you through the structure and components of Dwolla API responses, helping you interpret the information they provide.
By understanding how to read and interpret API responses, you can effectively troubleshoot issues, extract valuable data, and build robust integrations with the Dwolla platform.
Status codes are numerical codes that indicate the outcome of an API request. They provide essential information about the success or failure of the request.
{
"code": "BadRequest",
"message": "The request body contains bad syntax or is incomplete."
}
This response indicates a top-level error code of BadRequest with a descriptive error message explaining the issue.
Response headers provide supplementary details about the response. They can contain information about the content type, date, and other relevant data.
HTTP headers are case-insensitive by definition. This means that the Dwolla API, like most HTTP servers, might return headers in various capitalization formats. For instance, you could receive a Location header as location
or Location
. While HTTP/2 mandates lowercase header names, older HTTP/1.1 connections might still use mixed casing.
To ensure consistent handling, it's recommended to normalize header names to lowercase within your application. This involves converting all header names to lowercase before accessing their values. This approach provides a reliable way to reference headers without worrying about inconsistent capitalization.
For example, if you're expecting a Location
header, you should check for location
as well to ensure you capture all possible variations.
Here are some common headers you might encounter in Dwolla API responses:
Custom Headers: The X-Request-ID
and CF-RAY
headers provide additional information that can be used for debugging purposes.
All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.