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:
https://cashier.flowpayment.netAuthentication
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:
# 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.
// Success Response
{
"id": "cs_abc123",
"status": "pending",
"checkout_url": "https://checkout.example.com/cs_abc123",
...
}
// Error Response
{
"detail": "Invalid API key"
}HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Resource created |
400 | Bad request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not found - Resource doesn't exist |
500 | Server error |