Introduction

Welcome to the Cashier API documentation. This guide will help you integrate payment processing into your application.

Overview

Cashier is a payment gateway that allows you to accept payments in Brazil through multiple payment methods including PIX, credit cards, and more. The API provides two main integration options:

  • Hosted Checkout: Redirect customers to a secure, pre-built checkout page
  • Direct API: Build your own checkout experience with full control

Base URL

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

Production URL
text
https://cashier.flowpayment.net

Authentication

The Cashier API uses API keys to authenticate requests. You can obtain your API key from the dashboard. Include your API key in all requests using one of these methods:

Authentication Headers
bash
# Option 1: X-API-Key header
curl -H "X-API-Key: sk_live_your_api_key" ...

# Option 2: Authorization Bearer
curl -H "Authorization: Bearer sk_live_your_api_key" ...

API Key Types

Live Keys (sk_live_*)

Use for production. Processes real payments and charges real money.

Test Keys (sk_test_*)

Use for development and testing. No real charges are made.

Response Format

All API responses are returned in JSON format. Successful responses include the requested data, while error responses include an error message.

Response Examples
json
// Success Response
{
  "id": "cs_abc123",
  "status": "pending",
  "checkout_url": "https://checkout.example.com/cs_abc123",
  ...
}

// Error Response
{
  "detail": "Invalid API key"
}

HTTP Status Codes

CodeDescription
200Success
201Resource created
400Bad request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not found - Resource doesn't exist
500Server error