Documentation Index
Fetch the complete documentation index at: https://docs.fyatu.com/llms.txt
Use this file to discover all available pages before exploring further.
Collections
A collection is an inbound payment from a Fyatu user to your business wallet. You create a checkout session, redirect the customer, and receive a webhook when the payment completes.Flow
Statuses
| Status | Description |
|---|---|
PENDING | Awaiting customer payment |
COMPLETED | Payment successful |
FAILED | Payment failed or expired |
REFUNDED | Fully refunded |
PARTIALLY_REFUNDED | Partially refunded |
Checkout sessions expire after 60 minutes. If not completed, the collection moves to
FAILED.Fees
Collection fees are deducted from the received amount — the customer pays the gross amount, you receive the net:| Gross Amount | Fee | Net Amount Received |
|---|---|---|
| $25.00 | $0.75 | $24.25 |
| $100.00 | $3.00 | $97.00 |
Webhook Payload
Best Practices
- Use order IDs: pass
orderIdto link each collection to your order system and prevent duplicates - Verify server-side: always call
GET /collections/{id}before fulfilling an order — never trust the webhook payload alone - Handle expiry: sessions expire after 60 minutes; let customers re-initiate if they don’t complete in time
- Verify webhook signatures: check the HMAC-SHA256 signature on every incoming webhook before processing
- Retry safely: for 5xx errors, use exponential backoff (start at 1 s, cap at 30 s, max 3 retries)
Error Codes
| Code | Cause | Resolution |
|---|---|---|
DUPLICATE_REFERENCE | Order ID already used | Use a unique orderId per collection |
Endpoints
POST /collections— Create checkout sessionGET /collections/{id}— Get collection detailsGET /collections— List collections

