# ============================================================================= # Paytm Payment Gateway - environment variables # ============================================================================= # Defaults below are pre-filled for STAGING. To go live: # 1. Set PAYTM_ENVIRONMENT="production" # 2. Replace PAYTM_MID + PAYTM_MERCHANT_KEY with your production credentials # (staging keys do NOT work in production). # 3. Set PAYTM_WEBSITE_NAME="DEFAULT" — this is the production value for # most MIDs. If you get resultCode 501 on the first call, check the # Production API Details on your dashboard for an override. # ============================================================================= PAYTM_ENVIRONMENT="staging" PAYTM_MID="" PAYTM_MERCHANT_KEY="" # PAYTM_WEBSITE_NAME — per environment: # Staging: "WEBSTAGING" (default, almost always correct) # Production: "DEFAULT" (default for most MIDs; verify on the Paytm # dashboard if the call returns resultCode 501) PAYTM_WEBSITE_NAME="WEBSTAGING" PAYTM_CALLBACK_BASE="http://localhost:3001" # ----------------------------------------------------------------------------- # Paytm PG domain — DO NOT GUESS THIS VALUE # ----------------------------------------------------------------------------- # Only two valid Paytm PG domains exist. Pick the one matching PAYTM_ENVIRONMENT # above, or leave PAYTM_PG_DOMAIN unset to let the backend derive it. # # Staging: https://securestage.paytmpayments.com # Production: https://secure.paytmpayments.com # # Older domains like 'securegw.paytm.in' and 'securegw-stage.paytm.in' are # DEPRECATED and will not work. They show up in stale tutorials and LLM # training data - do not use them. PAYTM_PG_DOMAIN="https://securestage.paytmpayments.com" # ----------------------------------------------------------------------------- # Optional overrides - leave commented unless you need them # ----------------------------------------------------------------------------- # PAYTM_CALLBACK_URL="" # auto-derived from PAYTM_CALLBACK_BASE # PAYTM_STATUS_API_URL="" # auto-derived from PAYTM_PG_DOMAIN # NODE_EXTRA_CA_CERTS="./certs/corp-proxy-ca.crt" # corp proxy CA - see troubleshooting skill # ============================================================================= # How to get your MID and Merchant Key # ============================================================================= # Staging (test mode): # https://dashboard.paytmpayments.com/next/apikeys -> # Generate now (under Test API Details) # # Production (Live Mode): # https://dashboard.paytmpayments.com/next/apikeys -> # Get Merchant ID, Merchant Key from Production API details. # (Production keys are issued only after KYC + account activation. If the # tab is empty, finish onboarding or contact your Paytm KAM.) # # Always wrap the Merchant Key in double quotes - it can contain '#', '@', '$', # which an unquoted .env value would treat as a comment / shell metacharacter. # # ============================================================================= # Field descriptions # ============================================================================= # PAYTM_ENVIRONMENT - "staging" (test) or "production" (live). # PAYTM_MID - Your unique Merchant ID provided by Paytm. # PAYTM_MERCHANT_KEY - Secret key for checksum generation. Never expose publicly. # PAYTM_WEBSITE_NAME - Per-MID identifier. Use "WEBSTAGING" for staging, # the value Paytm provisioned (often "DEFAULT") for prod. # PAYTM_CALLBACK_BASE - Public base URL where Paytm posts payment results. # Must be reachable from the user's browser. # # ============================================================================= # Important notes # ============================================================================= # - Use staging environment for testing integrations. # - Switch to production only after successful staging tests. # - Ensure callback URL is publicly reachable in production. # - Never commit a filled-in .env or expose Merchant Key in client code.