Getting Started

Get Started

Quick start guide for the Flow Payments API

Base URL

All API requests must be sent to the following base URL:

https://api.flow-payments.com/api
https://api-staging.flow-payments.com/api

Request and Response Format

The Flow Payments API uses JSON format for all requests and responses.

Required Headers

All requests must include the following headers:

Content-Type: application/json
Accept: application/json
Authorization: Bearer {your_api_token}

Rate Limiting

The API implements rate limiting to ensure service stability. Limits are applied per API token.

!NOTE If you exceed the rate limit, you will receive an HTTP 429 Too Many Requests response. Please reduce the frequency of your requests.

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of a request.

Common Status Codes

CodeDescription
200Success - The request was processed successfully
201Created - The resource was created successfully
400Bad Request - Missing or invalid parameters
401Unauthorized - Missing or invalid API token
403Forbidden - Access denied to the resource
404Not Found - The requested resource does not exist
422Unprocessable Entity - Validation errors
429Too Many Requests - Rate limit exceeded
500Server Error - An error occurred on the server side

Error Format

Error responses include a descriptive message:

{
  "message": "The given data was invalid.",
  "errors": {
    "amount": [
      "The amount must be at least 5."
    ]
  }
}

Quick Example Request

Here's a simple example to retrieve the list of available cryptocurrencies:

curl -X GET https://api.flow-payments.com/api/assets \
  -H "Authorization: Bearer your_api_token" \
  -H "Accept: application/json"

Response

{
  "data": [
    {
      "id": 1,
      "name": "Bitcoin",
      "symbol": "BTC",
      "chain": "bitcoin",
      "type": "native",
      "decimals": 8,
      "usd_rate": "45000.00",
      "network_fee": "0.0001"
    },
    {
      "id": 2,
      "name": "Ethereum",
      "symbol": "ETH",
      "chain": "ethereum",
      "type": "native",
      "decimals": 18,
      "usd_rate": "3000.00",
      "network_fee": "0.001"
    }
  ]
}

Pagination

Endpoints that return lists of resources are paginated. You can control pagination with the following parameters:

ParameterDescriptionDefault
pagePage number1
perPageNumber of items per page10

Paginated Response Example

{
  "data": [...],
  "links": {
    "first": "https://api.flow-payments.com/api/invoices?page=1",
    "last": "https://api.flow-payments.com/api/invoices?page=5",
    "prev": null,
    "next": "https://api.flow-payments.com/api/invoices?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "per_page": 10,
    "to": 10,
    "total": 50
  }
}