Distributor API
Create Operation
Create a new distributor operation (cash-in or cash-out)
POST
Documentation Index
Fetch the complete documentation index at: https://docs.uw.stargate.is/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Authentication
Bearer token with your API key. Must have Perform Operations permission.
Must be
application/jsonPath Parameters
The unique identifier of the distributor. Must match the distributor ID associated with the API key.
Request Body
Cash-In Operation
Must be
"cash-in"Amount to credit to the destination wallet (e.g., “5000.00”)
End user’s mobile phone number in international format (e.g., “+234 8123456781”). Required when cashing in to an individual wallet. Cannot be used together with
merchantToShortCode.Merchant’s short code number (e.g., “100000”). Required when cashing in to a merchant wallet. Cannot be used together with
phoneTo.Optional reference note or description for the operation (e.g., “Receipt #1234”, “Customer deposit”).
For cash-in operations, you must provide either
phoneTo (individual wallet) or merchantToShortCode (merchant wallet), but not both.Cash-Out Operation
Must be
"cash-out-fulfillment"Amount to debit from the user’s wallet (e.g., “3000.00”)
End user’s mobile phone number in international format (e.g., “+234 8123456781”)
Type of fulfillment. Currently only
"cash" is supported.Receipt or reference ID for the cash-out transaction
Optional reference note or description for the operation.
Response
Unique identifier for the created operation
Validation Rules
The API validates the following before creating an operation:API Key Permissions
API Key Permissions
- Must have Perform Operations permission
- Distributor ID must match the key’s associated distributor
Amount Validation
Amount Validation
- Must be a valid decimal number
- Must be greater than 0
- Cannot exceed API key’s max transaction amount (if set)
Daily Volume Limit
Daily Volume Limit
- Sum of today’s operations + this operation cannot exceed key’s daily volume limit (if set)
Destination Validation
Destination Validation
- For individual wallets:
phoneTomust be in international format (e.g., +234 8123456781) and belong to a registered user - For merchant wallets:
merchantToShortCodemust be a valid, existing merchant short code - You must provide exactly one of
phoneToormerchantToShortCodefor cash-in operations
Balance Checks
Balance Checks
- Cash-In: Distributor must have sufficient balance
- Cash-Out: User must have sufficient wallet balance
Maker-Checker Workflow
Operations created via API follow the maker-checker approval pattern. The operation is created in a pending state and requires approval by a checker before execution.
- Operation is saved with status pending
- A checker with appropriate permissions must approve it via the web interface
- Once approved, the operation is executed on the blockchain
- The operation status changes to completed or failed
Related Endpoints
Get Balance
Check distributor balance before creating operations
Get Operations
Query operation history and status