Documentation
Learn how to integrate PressureFace into your application
Table of Contents
Overview
PressureFace enables real-time payment streaming with per-second granularity. Money flows continuously based on time, not discrete transactions.
Key concepts:
- Flow: A continuous payment stream with a defined rate
- Rate: Amount per second (in cents)
- Settlement: Batch aggregation of accrued amounts
- Balance: Total accrued but not yet settled amount
Auth & Keys
Coming soon. Authentication will use API keys with scoped permissions.
# Authentication will be implemented in v0.4.0Start Flow
Create a new payment flow with a specified rate.
POST /api/flows
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"rate": 2, // cents per second
"recipient": "user_123",
"description": "Freelance work payment"
}
// Response
{
"id": "flow_abc123",
"status": "active",
"rate": 2,
"started_at": "2024-01-01T12:00:00Z"
}Stop Flow
Stop an active flow and trigger settlement.
POST /api/flows/{flow_id}/stop
Authorization: Bearer YOUR_API_KEY
// Response
{
"id": "flow_abc123",
"status": "stopped",
"total_accrued": 120, // cents
"stopped_at": "2024-01-01T12:01:00Z"
}Get Balance
Retrieve current balance for a user or flow.
GET /api/balance?user_id=user_123
Authorization: Bearer YOUR_API_KEY
// Response
{
"user_id": "user_123",
"balance": 450, // cents
"pending_settlements": 2,
"last_updated": "2024-01-01T12:00:00Z"
}Webhooks
Receive real-time notifications about flow events and settlements.
// Settlement webhook payload
{
"event": "settlement.completed",
"data": {
"settlement_id": "sett_xyz789",
"user_id": "user_123",
"amount": 1200, // cents
"flows": ["flow_abc123", "flow_def456"],
"settled_at": "2024-01-01T12:00:00Z"
}
}Settlement window: Every hour for Pro plans, every 24 hours for Starter plans.
Need Help?
Can't find what you're looking for? We're here to help.