Skip to content

Environment variables

Variable Purpose Default
MPESA_ENVIRONMENT Target environment: sandbox or production sandbox
DARAJA_CONSUMER_KEY API consumer key
DARAJA_CONSUMER_SECRET API consumer secret
DARAJA_BUSINESS_SHORT_CODE Short code for your business
DARAJA_PASS_KEY Pass key for STK push
DARAJA_TRANSACTION_TYPE STK transaction type CustomerPayBillOnline
DARAJA_CALL_BACK_URL Callback URL for STK push
DARAJA_ACCOUNT_REF Account reference for STK push
DARAJA_INITIATOR_NAME B2C/B2B initiator
DARAJA_INITIATOR_PASSWORD B2C/B2B initiator password
DARAJA_BUSINESS_CONSUMR_PARTY_A B2C PartyA shortcode
DARAJA_CREDIT_PARTY_IDENTIFIER Credit party identifier (optional)
DARAJA_BUSINESS_EXPRESS_CHECKOUT_SHORT_CODE Primary shortcode for Business Express