Skip to main content
Production credentials connect Moflay to your live Safaricom setup. You need them before Moflay can initiate real STK push payments for your business.

Prerequisites

  • A valid till or paybill approved for your business
  • Access to the Safaricom Daraja portal
  • A Moflay organization with access to the production environment

What you need from Safaricom

Before you open the Moflay dashboard, collect:
  • Consumer key
  • Consumer secret
  • Business shortcode
  • Passkey
  • The business type for the shortcode, such as till or paybill

Connect the credentials

1

Open the production environment

Go to Credentials and switch from sandbox to production.
2

Enter the live Daraja values

Paste your consumer key, consumer secret, shortcode, and passkey, then choose the right business type.
3

Save the configuration

Save the credentials so Moflay can use them for production payment requests.
4

Create a production API key

Generate a mof_live_ API key for the service that will call Moflay in production.

Important behavior

Moflay handles the Safaricom callback side of the payment flow internally. Your own backend should consume Moflay webhooks for business events such as payment.completed and payment.failed.

Verify the result

Your production setup is complete when:
  • The credentials save successfully in the production environment
  • A production API key can authenticate successfully
  • You can complete a controlled live payment test

Troubleshooting

  • The payment request fails immediately: Recheck the consumer key, consumer secret, shortcode, passkey, and business type.
  • Sandbox works but production does not: Confirm you switched both the credentials page and your API key to production.