Home / Guides / STK Push integration guide / subscription businesses
DASNET business guide · Kenya

STK Push integration guide for subscription businesses | 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 subscription businesses.

Explore DASNETDeveloper documentation
Mobile-money checkout for a merchant
In this guide

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 subscription businesses

A production-grade integration separates payment initiation, customer authorisation, provider callback validation and final reconciliation. For subscription businesses, the goal is to track renewals, failed charges and customer changes. 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 automatic renewal does not guarantee a successful charge or current customer consent. 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

  1. Keep Daraja consumer secrets and passkeys in server-side environment variables or a managed secret store.
  2. Request access tokens on the server and handle expiry without exposing credentials in browser code.
  3. Validate amount, currency, phone format, shortcode, callback URL and a unique internal order reference before initiation.
  4. Persist the provider request identifiers and internal correlation ID before returning a response to the checkout UI.
  5. Verify callback structure and authenticity according to provider guidance; make processing idempotent and log redacted events.
  6. Support pending, success, failure, timeout, duplicate callback and delayed callback outcomes; reconcile against provider status records.

A workflow shaped around this use case

  1. Make the price, billing frequency and cancellation terms clear.
  2. Track each renewal attempt and failure reason where available.
  3. Provide a customer-friendly cancellation and support process.

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

  1. Track the number of unresolved items and how long they remain open.
  2. Separate pending, successful, failed, reversed and disputed outcomes in reports.
  3. Keep a clear owner for exceptions and a reference for every consequential action.
  4. Review access permissions and avoid storing credentials or sensitive authentication data in notes.
  5. 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 subscription businesses?

The main objective is to track renewals, failed charges and customer changes. 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 subscription businesses · Safaricom Daraja API workflows for subscription businesses · Online payment links for subscription businesses · Customer payment requests for subscription businesses · Merchant payment collections for subscription businesses · Bulk payouts and bulk payments for subscription businesses

Get started with DASNET