STK Push integration guide for agencies and studios | DASNET
A production-grade integration separates payment initiation, customer authorisation, provider callback validation and final reconciliation.
This guide explains the workflow, how to prepare, which checks matter and how to handle common exceptions for agencies and studios.
Explore DASNETDeveloper documentation
Understand the workflow, apply the checklist, and confirm which payment channels and features are enabled for your account before using them in production.
What STK Push integration guide means for agencies and studios
A production-grade integration separates payment initiation, customer authorisation, provider callback validation and final reconciliation. For agencies and studios, the goal is to coordinate multiple clients, projects and billing milestones. A reliable workflow makes the request, responsible person, reference and final outcome visible rather than leaving the process in disconnected messages.
The operational challenge
A common challenge is that several team members may work on the same client while billing evidence lives in different places. When the source request, payment status and business record do not line up, staff can repeat work or act on an assumption. A consistent process separates initiation from completion and records the evidence used to make a decision.
A practical end-to-end workflow
- Keep Daraja consumer secrets and passkeys in server-side environment variables or a managed secret store.
- Request access tokens on the server and handle expiry without exposing credentials in browser code.
- Validate amount, currency, phone format, shortcode, callback URL and a unique internal order reference before initiation.
- Persist the provider request identifiers and internal correlation ID before returning a response to the checkout UI.
- Verify callback structure and authenticity according to provider guidance; make processing idempotent and log redacted events.
- Support pending, success, failure, timeout, duplicate callback and delayed callback outcomes; reconcile against provider status records.
A workflow shaped around this use case
- Assign project and client owners and document handovers.
- Track time or milestones against the agreed scope.
- Review invoice line items and approvals before sending.
How DASNET fits
DASNET is a business workspace for supported payment workflows and everyday business operations. Depending on account configuration, teams may use it to manage payment requests and collections, review transaction records, handle supported wallet and payout activity, organise invoices or bills, and keep customer and operational information together. The precise menu, channel and automation available to a business should be confirmed in its account. DASNET is not a promise that every payment rail, bank destination or provider feature is automatically enabled.
Controls and measures to review
- Track the number of unresolved items and how long they remain open.
- Separate pending, successful, failed, reversed and disputed outcomes in reports.
- Keep a clear owner for exceptions and a reference for every consequential action.
- Review access permissions and avoid storing credentials or sensitive authentication data in notes.
- Compare material payment totals with trusted provider or bank records.
Frequently asked questions
Should the frontend call Daraja with a secret?
No. A backend service should hold secrets and call the provider. Never bundle consumer secrets or passkeys into browser JavaScript.
What should the callback do?
Validate the payload, correlate it to a known request, safely record the provider result and trigger idempotent business updates.
How do I test failed and duplicate callbacks?
Use an approved test environment and simulate duplicate, delayed, malformed and failure events before production launch.
Does DASNET enable STK Push for every account automatically?
No blanket guarantee is implied. Live use depends on account setup, merchant approval, production credentials and enabled provider routes.
How does this apply to agencies and studios?
The main objective is to coordinate multiple clients, projects and billing milestones. Start with the workflow and controls on this page, then verify the exact features enabled for your DASNET account.
What should we do if a payment or record looks wrong?
Pause any consequential action, keep the non-sensitive reference and timestamp, check the trusted source record, and follow your documented support or reconciliation process. Never share PINs, OTPs, passwords or API secrets.
Does DASNET guarantee that every feature is enabled?
No. Product availability depends on account setup, permissions, provider approvals and enabled services. Confirm the live configuration before making operational commitments.
Related DASNET guides
Continue with these related workflows:
M-Pesa STK Push for agencies and studios · Safaricom Daraja API workflows for agencies and studios · Online payment links for agencies and studios · Customer payment requests for agencies and studios · Merchant payment collections for agencies and studios · Bulk payouts and bulk payments for agencies and studios