Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.moflay.com/llms.txt

Use this file to discover all available pages before exploring further.

Use the dashboard API Keys page for ongoing API key operations after your first key is created.

When to manage keys

Manage API keys when you need to:
  • Add a key for another service or deployment target
  • Rotate a key during a normal security cycle
  • Revoke a key after a leak or employee offboarding
  • Review key usage and last-used timestamps
  • Reduce permissions for a service
  • Create separate keys for sandbox and production.
  • Use one key per service, worker, or deployment target.
  • Grant only the permissions each service needs.
  • Store keys in a secret manager or deployment environment variables.
  • Rotate keys instead of reusing one key everywhere.

Permissions

Current API permissions include:
PermissionUse
express.payCreate M-Pesa Express payment requests
customers.readRead customer records
customers.writeCreate, update, or delete customer records
transactions.readRead transactions and payment status

Rotate a key

  1. Create a new key in the same environment with the same required permissions.
  2. Add the new key to your secret manager or deployment environment.
  3. Deploy the service that uses the new key.
  4. Confirm the new key is being used successfully.
  5. Revoke the old key.

Respond to a leaked key

If a key may be exposed:
  1. Revoke the key immediately.
  2. Create a replacement key with the minimum required permissions.
  3. Redeploy affected services.
  4. Review recent key usage and payment activity.
  5. Rotate any related internal secrets if they were exposed with the key.