Overview

The Stax API is organized around REST, providing predictable, resource-oriented URLs and standard HTTP response codes for indicating errors. This makes it easy to integrate with, whether you're a seasoned developer or just getting started.

Getting Started

Base URL

All API requests should be made to the following base URL:

https://apiprod.fattlabs.com

When using a live or sandbox API key, you will use the same production URL: https://apiprod.fattlabs.com. However, your sandbox will be linked to a test gateway and will not use real money.

Authentication

To access the API, you need an API key. All requests must include this key in the Authorization header as a Bearer Token. Keep your API key secure and never expose it in client-side code or public repositories.

Example:

Authorization: Bearer YOUR_SECRET_KEY

Example Request

curl -X GET "https://apiprod.fattlabs.com/"\
-H "Authorization: Bearer YOUR_SECRET_KEY"\
-H "Content-Type: application/json"

Features

Content-Type Header

The Content-Type header must always be set to:

application/json

This ensures the API understands your requests and responds with JSON.

HTTP Methods

The Stax API supports the following HTTP methods:

  • GET: Retrieve a resource.

  • POST: Create a new resource.

  • PUT: Update an existing resource.

  • DELETE: Delete a resource.


Rate Limits

The API enforces a rate limit of 100 requests per minute. If you exceed this limit, you'll receive a 429 Too Many Requests response. The Retry-After header in the response indicates when you can retry your request.


Error Handling

The Stax API uses standard HTTP status codes to indicate the success or failure of requests. Here are some common codes:

  • 200 OK: The request was successful.

  • 400 Bad Request: The request is invalid (e.g., missing parameters).

  • 401 Unauthorized: Authentication failed (e.g., missing or incorrect API key).

  • 404 Not Found: The requested resource does not exist.

  • 429 Too Many Requests: You've exceeded the rate limit.

  • 500 Internal Server Error: Something went wrong on our end.


Cross-Origin Resource Sharing (CORS)

The Stax API supports CORS, allowing secure interaction from client-side applications. However, never expose your secret API key in public client-side code.


Need Help?

If you have any questions or run into issues, check out our API Documentation or contact our support team for assistance.