Submit deposit verification
Submit the mobile network’s verification code while next_action.type is one_time_code. Keep the code as a string to preserve leading zeros. The existing otp field is also accepted instead of code. Follow any next_action returned. On 429, stop submitting codes and check the transaction.
Submit the mobile network’s verification code while next_action.type is one_time_code. Keep the code as a string to preserve leading zeros. The existing otp field is also accepted instead of code. Follow any next_action returned. On 429, stop submitting codes and check the transaction.
Required API key scope: deposit.
Request example
POST /api/mpesa/transactions/507f1f77bcf86cd799439011/otp HTTP/1.1Host: api.edgepro.siteX-API-Key: <your-api-key>X-Deripay-API-Version: 2Accept: application/jsonContent-Type: application/json{ "connection_id": "conn_example_01", "type": "one_time_code", "code": "123456"}partnerAPIKeyX-API-Key<token>transaction_id*stringX-API-Key*stringYour API key. Send requests from your server.
X-Deripay-API-Version*stringSelects the response and error format documented here. Without it, the same URL returns the original format.
Accept?stringapplication/json- body
code*stringCode sent by the customer’s network, kept as a string to preserve leading zeros. Submit only while next_action.type is one_time_code.
connection_id?stringotp?stringExisting alias for code. Send either code or otp; if both are supplied, they must match.
type?"one_time_code"Defaults to one_time_code. Submit only when the transaction requires this action.
"one_time_code"Successful request.
application/json- response
success*booleanmessage*stringdata*curl -X POST 'https://api.edgepro.site/api/mpesa/transactions/507f1f77bcf86cd799439011/otp' \ -H 'X-API-Key: <your-api-key>' \ -H 'X-Deripay-API-Version: 2' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "connection_id": "conn_example_01", "type": "one_time_code", "code": "123456"}'{ "success": true, "message": "Verification submitted", "data": { "id": "507f1f77bcf86cd799439011", "connection_id": "conn_example_01", "type": "deposit", "payment_method": "mobile_money", "status": "pending", "country": "KE", "network": "mpesa", "local": { "amount": "700", "currency": "KES" }, "settlement": { "amount": "5.00", "currency": "USD" }, "idempotency_key": "order-1001", "account_login_id": "CR123456", "next_action": null, "failure": null, "created_at": "2026-10-12T09:00:00Z", "updated_at": "2026-10-12T09:00:00Z", "completed_at": null }}Create crypto deposit POST
Create a crypto checkout with a quote in KES. Open next_action.url so the customer can choose an asset and network. Check the transaction after checkout and wait for completed to confirm Wallet funding.
Start withdrawal verification POST
Start withdrawal email verification after the customer confirms the destination number and network. Save an idempotency key before calling. The status can be pending while the email is prepared. Submit the email code to /api/mpesa/withdraw.