Get a collection
Authorization
apiKey AuthorizationBearer <token>
A Swichi Gateway payments key.
In: header
Path Parameters
id*string
Response Body
application/json
application/json
curl -X GET "https://example.com/collections/string"{ "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"}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.
Refund a collection POST
Pays a paid collection back to the phone that paid it, in full (no body) or in part (`amount`). Refunds of one collection never add up to more than it paid; a refund still on its way counts. The money and the payout fee come from your wallet. `collection.refunded` fires when the payer has it. Needs the `collections` scope.