Payable expects a set of headers to be present when making calls to our API. Below you will find a set of headers accepted by Payable. Whether they are required and if so when, along with a short description of the header's purpose.
Header | Required? | Description |
---|---|---|
X-Api-Key | Required for API to API integration | If you are using API key authentication then the X-Api-Key header should be used. |
Bearer | Required if X-Api-Key is not provided | If you are using JWT authentication then the Bearer token header should be used. If this is supplied along with the X-Api-Key, then it takes precedence over the API key. |
X-Request-Id | Not required | This is an optimal id that identifies the request being made. It's very helpful when troubleshooting requests, and Payable will ask for this id when you ask us to look into an issue. |
X-Idempotency-Key | For any requests that modify data | This is required to ensure we don't process duplicate requests in our system (either by mistake, or from retry logic). This is especially important for modifying resources, and therefore is mandatory on a POST request. |
X-Api-Version | Not required (defaults to the latest available version) | This header is used to target the request against a specific API version. |
Content-Type | For any requests where you send data | For requests containing data, Payable expects a JSON format for the body. Therefore we recommend adding the content type header with a value of application/json when sending us data in a request. |
Accept | Not required | At this time all records returned by the Payable API are in standard JSON format. Therefore it's not necessary to let us know that you support a specific media type. But it might help in troubleshooting when speaking with Payable about an issue. |