List collections
Authorization
apiKey AuthorizationBearer <token>
A Swichi Gateway payments key.
In: header
Query Parameters
limit?integer
Range
1 <= value <= 100Default
20starting_after?string
The id of the last object of the previous page.
status?string
Value in
- "pending"
- "succeeded"
- "failed"
- "expired"
reference?string
Length
length <= 100created_from?string
Only objects made on or after this day (YYYY-MM-DD, East Africa Time).
Format
datecreated_to?string
Only objects made on or before this day (YYYY-MM-DD, East Africa Time).
Format
dateResponse Body
application/json
application/json
curl -X GET "https://example.com/collections"{ "object": "list", "has_more": true, "data": [ { "id": "string", "object": "collection", "livemode": true, "amount": 0, "fee": 0, "net": 0, "currency": "TZS", "status": "pending", "network": "mpesa", "phone": "string", "reference": "string", "description": "string", "metadata": { "property1": "string", "property2": "string" }, "failure": { "code": "string", "message": "string" }, "receipt": "string", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z" } ]}API reference
Every endpoint of the Swichi Payments API, generated from its OpenAPI contract, with a Try it panel.
Ask a phone to pay POST
Sends a USSD push to the payer's phone and answers at once with the collection, `pending`. It becomes `succeeded` when Swichi has confirmed the money with the network, `failed` when the payer refuses or has too little, or `expired` when nobody answers in time. Needs the `collections` scope.