Endpoint
POST /v3/collect
Required fields
Quote first
Create the collection
Send the same request withquote: false.
Use a new external_reference for every collection. Duplicate references return an error.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create customer collection requests.
POST /v3/collect
| Field | Description |
|---|---|
currency | Customer payment currency. |
source | Use mobile. |
amount | Amount to collect. |
phone_number | Customer phone number. |
external_reference | Unique reference from your system. |
callback_url | URL that should receive status callbacks. |
quote | Set true to quote only, or false to create the collection. |
curl https://serviceapi.sarafa.ss/v3/collect \
-H "x-api-key: YOUR_API_KEY" \
-H "environment: sandbox" \
-H "Content-Type: application/json" \
-d '{
"currency": "KES",
"source": "mobile",
"amount": 25,
"phone_number": "+254700000000",
"external_reference": "order-1001",
"callback_url": "https://example.com/sarafa/callback",
"quote": true
}'
quote: false.
Use a new external_reference for every collection. Duplicate references return an error.