Variables

Backend Variables

Below is a list of variables to configure the Platfone NodeJS Backend:

VariableDescriptionCategoryOptional
TZTimezone setting for the application (e.g., UTC).GeneralYes
PORTPort number for the application server (default: 3333).GeneralYes
HOSTHostname for the application server (default: localhost).GeneralYes
LOG_LEVELLogging level for the application (e.g., info, debug, error).GeneralYes
APP_KEYApplication encryption key for security purposes.GeneralNo
NODE_ENVNode.js environment (e.g., development, production).GeneralNo
API_URL_PREFIXURL prefix for API endpoints (e.g., /api/v2).GeneralYes
APP_VERSIONSJSON object containing version information for iOS and Android apps.GeneralYes
DB_HOSTHostname or IP address of the MySQL (MariaDB) server.DatabaseNo
DB_PORTPort number for the MySQL (MariaDB) server (default: 3306).DatabaseNo
DB_USERUsername for connecting to the MySQL (MariaDB) database.DatabaseNo
DB_PASSWORDPassword for connecting to the MySQL (MariaDB) database.DatabaseNo
DB_DATABASEName of the MySQL (MariaDB) database for storing customer and payment data.DatabaseNo
GOOGLE_APPLICATION_CREDENTIALSPath to Firebase Admin SDK service account key file.FirebaseNo
PLATFONE_API_URLThe URL for the Platfone API, either sandbox or production endpoint.PlatfoneNo
PLATFONE_API_KEYAPI key for the Platfone API.PlatfoneNo
CUSTOMER_PRICE_MARKUPPercentage markup applied to the cost of temporary phone numbers for profit.PlatfoneNo
PLATFONE_ADMINS_FIREBASE_UIDSComma-separated list of Firebase UIDs for admin access to the Platfone API.PlatfoneYes
STRIPE_ENABLEDEnable Stripe payments for users to top up their balance.StripeYes
STRIPE_PUBLISHABLE_KEYStripe publishable API key for client-side purchases.StripeYes
STRIPE_SECRET_KEYStripe secret API key used for creating customers and payment intents.StripeYes
STRIPE_WEBHOOK_SECRETSecret key for verifying incoming Stripe webhook messages.StripeYes
STRIPE_METADATA_PAYMENT_SOURCEValue added to each Stripe payment intent to distinguish it from other backends.StripeYes
APPSTORE_ENABLEEnable App Store in-app purchases as a payment option.App StoreYes
APPSTORE_BUNDLE_IDUnique bundle ID for your app in the App Store (e.g., com.example.app).App StoreYes
APPSTORE_APP_IDNumeric App ID for your app in the App Store, found in App Store Connect.App StoreYes
APPSTORE_PRODUCTSJSON object with product IDs and prices in cents for App Store purchases.App StoreYes
GOOGLE_PLAY_ENABLEEnable Google Play in-app purchases as a payment option.Google PlayYes
GOOGLE_PLAY_SECRET_FILEJSON content of service account key file for Google Play Console access.Google PlayYes
GOOGLE_PLAY_PACKAGE_NAMEPackage name of your app as defined in Google Play.Google PlayYes
GOOGLE_PLAY_PRODUCTSJSON object with product IDs and prices in cents for Google Play purchases.Google PlayYes
PAYPAL_ENABLEEnable PayPal payments as a payment option.PayPalYes
PAYPAL_CLIENT_IDClient ID for your PayPal account.PayPalYes
PAYPAL_ENVIRONMENTPayPal environment setting (sandbox or production).PayPalYes
PAYPAL_CLIENT_SECRETClient Secret for your PayPal account.PayPalYes
PAYPAL_WEBHOOK_IDWebhook ID for your PayPal account.PayPalYes
CRYPTOMUS_ENABLEEnable Cryptomus Crypto Payment Gateway as a payment option.CryptomusYes
CRYPTOMUS_MERCHANT_IDMerchant ID for your Cryptomus account.CryptomusYes
CRYPTOMUS_API_KEYAPI Key for your Cryptomus account.CryptomusYes
CRYPTOMUS_CALLBACK_URLCallback URL for Cryptomus payments.CryptomusYes
PAYEER_ENABLEEnable Payeer as a payment option.PayeerYes
PAYEER_MERCHANT_IDMerchant ID for your Payeer account.PayeerYes
PAYEER_API_KEYAPI Key for your Payeer account.PayeerYes
OXPROCESSING_ENABLEEnable 0xprocessing as a payment option.0xprocessingYes
OXPROCESSING_WEBHOOK_PASSWORDWebhook password for your 0xprocessing account.0xprocessingYes
BINANCE_ENABLEEnable Binance as a payment option.BinanceYes
BINANCE_API_KEYAPI Key for your Binance account.BinanceYes
BINANCE_API_SECRETAPI Secret for your Binance account.BinanceYes
BINANCE_MERCHANT_IDMerchant ID for your Binance account.BinanceYes
BINANCE_PUBLIC_KEYPublic Key for your Binance account.BinanceYes
BINANCE_BASE_URLBase URL for Binance API.BinanceYes
ANYPAY_ENABLEEnable anypay as a payment option.AnypayYes
ANYPAY_PAYMENT_MIN_AMOUNTMinimum amount (in cents) for anypay payment.AnypayYes
ANYPAY_SECRET_KEYSecret Key for your anypay account.AnypayYes
ANYPAY_MERCHANT_IDMerchant ID for your anypay account.AnypayYes
ANYPAY_WEBHOOK_WHITELISTED_IPArray of whitelisted IP addresses for anypay webhook.AnypayYes
WENJISHOU_ENABLEDEnable Wenjishou as a payment option.WenjishouYes
WENJISHOU_CNY_EXCHANGE_RATEExchange rate for CNY to USD for Wenjishou payments.WenjishouYes
PAYMENT_MAX_AMOUNTMaximum amount (in cents) for any payment.PaymentYes
TELEGRAM_AUTH_ENABLEDEnable Telegram authentication as a login option.TelegramYes
TELEGRAM_BOT_TOKENTelegram Bot Token for your Telegram bot.TelegramYes
SENDMAIL_ENABLEDEnable email notifications.EmailYes
SMTP_DOMAINDomain for send from and unsubscribe links.EmailYes
SMTP_HOSTSMTP server hostname for sending emails.EmailYes
SMTP_PORTSMTP server port number.EmailYes
SMTP_SECUREWhether SMTP connection should use SSL/TLS.EmailYes
SMTP_USERSMTP server username for authentication.EmailYes
SMTP_PASSSMTP server password for authentication.EmailYes
CONTACT_FORM_EMAIL_TOEmail address to send contact form messages to.EmailYes
CONTACT_FORM_EMAIL_FROMEmail address to send contact form messages from.EmailYes
RECAPTCHA_ENABLEDEnable ReCaptcha Enterprise for form protection.ReCaptchaYes
RECAPTCHA_PROJECT_IDGoogle Cloud Project ID for ReCaptcha Enterprise.ReCaptchaYes
RECAPTCHA_SITE_KEYReCaptcha Site Key for your ReCaptcha account.ReCaptchaYes
RECAPTCHA_MIN_SCOREMinimum score required for ReCaptcha validation.ReCaptchaYes