Simulate a payment into a collection (sandbox only)
Sandbox only. Behaves as if a payer paid this collection, so you can test your integration end to end without sending real money. The collection must be open. Answers 200 once the collection has been marked as received, or 202 when the payment was accepted and the collection has not caught up yet: read it with GET /v1/collections/{id} a little later. No real money moves. While sandbox crediting is enabled, a collection created in sandbox is then credited at the bank simulator: read it until its status is credited. Otherwise it stays received. Not available in production: the route answers 404 there.
Authorization
partner-key In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/simulations/collections/string/deposits" \ -H "Content-Type: application/json" \ -d '{ "amount": "25.00" }'{ "collectionId": "a1b2c3d4-0000-4000-8000-000000000001", "reference": "DEMO-7K3Q2M", "route": "memo", "deposit": { "id": "SIM-DEP-6f1c2d9e-3b7a-4c51-9d0e-2a8b7c6d5e4f", "amount": "25.00", "currency": "USD", "status": "received" }, "collectionStatus": "received", "crediting": "pending", "message": "Deposit received. The collection is credited to your account shortly; poll GET /v1/collections/{id} until it reads credited."}Ask a payer to send you KES over M-PESA POST
Sends an STK Push prompt to the number you name. The payer approves it on their own handset with their PIN — there is no OTP for you to handle and no way for you to complete it on their behalf. The deposit lands in your own KES account, which is resolved from your verified business and is not something you can specify. This returns as soon as the prompt is out, so treat the response as pending: the completion signal is the credit.received webhook, and a prompt the payer declines or ignores produces no event at all. There is no idempotency key. A repeated call is a second prompt, and if the payer approves both then both deposits land and each raises its own credit.received.
Simulate a USDT deposit for a sell order (sandbox only) POST
Sandbox only. Behaves as if the USDT for this sell order arrived on chain, so you can test your integration end to end without sending any. Attach the transaction hash to the order first with PATCH /v1/orders/{id}. The body may be empty: the order's own amount is used. A different amount sends the order to review. Not available in production: the route answers 404 there.