Decide a sandbox collection

Test keys only. Settles a pending sandbox collection as if the payer had answered.

POST
/sandbox/collections/{id}/simulate

Test keys only. Settles a pending sandbox collection as if the payer had answered.

Authorization

apiKey
AuthorizationBearer <token>

A Swichi Gateway payments key.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/sandbox/collections/string/simulate" \  -H "Content-Type: application/json" \  -d '{    "outcome": "succeeded"  }'
{  "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"}