Request basics#
These conventions apply across the API. This request lists your two most recent orders:
curl "https://api.withflintpay.com/v1/orders?page_size=2" \
-H "Authorization: Bearer YOUR_API_KEY"| Topic | What to know |
|---|---|
| Host | https://api.withflintpay.com, with every path under /v1. Live keys and test keys use the same host. See Sandboxes & test mode. |
| Authentication | Send Authorization: Bearer with a secret key. A flint_test_ key reaches the sandbox it belongs to, and a flint_live_ key reaches live data. Keep secret keys on your server. See Authentication, API key scopes. |
| Requests | JSON bodies up to 1 MiB unless an endpoint sets a lower limit. A larger body returns 413 REQUEST_BODY_TOO_LARGE. The OAuth token endpoints take form-encoded bodies instead. See OAuth. |
| Responses | The object, or an array for a list, under data, with request_id and meta. Filter your API request logs by request_id to see what Flint received. See API request logs. |
| Lists | Set page_size, up to 100. When more results remain, the response includes next_page_token; send it back as page_token for the next page. See Pagination. |
| Amounts | Money is an integer in the currency’s minor unit with an ISO 4217 code: { "amount": 1250, "currency": "USD" } is $12.50. See Money & currency. |
| Retries | Send an Idempotency-Key header on writes. Retrying the same request with the same key within 24 hours returns the original result instead of repeating it. Some routes, including those that move money or stock, require one. See Idempotency. |
| Versions | An API key request uses your merchant’s default API version. Send Flint-Version: YYYY-MM-DD to choose a version for one request. The Flint-Version response header and meta.api_version show the version that shaped the response. See API versions and upgrades. |
| Errors | An error object with a stable code, a message, the param at fault when there is one, details, and remediation.retry, which says whether to resend, rebuild, or stop. See Error codes, Error handling. |
| Rate limits | A request over a limit returns 429 RATE_LIMIT_EXCEEDED with a Retry-After header. Nothing ran, so wait and resend it with the same Idempotency-Key. See Rate limits. |
