Making Requests#
Base URLs#
| Environment | URL |
|---|---|
| Live | https://api.gocardless.com/ |
| Sandbox | https://api-sandbox.gocardless.com/ |
The API is only available over HTTPS. Attempting to access the API over HTTP will return a tls_required error.
Healthcheck#
Both environments expose a health check endpoint you can use to verify connectivity. It requires no authorisation and is not rate limited — a 200 response means the API is available.
https://api.gocardless.com/health_check(live)https://api-sandbox.gocardless.com/health_check(sandbox)
Authentication#
After creating an access token in the dashboard, pass it in an Authorization header using the bearer scheme:
Versions#
Every request must include a GoCardless-Version header specifying a released API version:
| Version | Notes |
|---|---|
2015-07-06 | Current version. Removed helper endpoint (replaced with individual endpoints). |
Headers#
Content type#
All requests and responses are JSON-formatted and UTF-8 encoded. Include an Accept header on all requests:
For POST and PUT requests, also include Content-Type and Content-Length:
You may use either application/json or application/vnd.api+json for both headers.
HTTP methods#
The API supports GET, POST, PUT, and DELETE. If your HTTP client or proxy doesn't support PUT or DELETE, send a POST with an override header:
Optional properties#
When making requests, omit optional properties from the JSON body entirely rather than sending null. Our API libraries handle this automatically — it's only relevant if you're constructing raw requests.