Variables

Backend Variables

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

VariableDescriptionCategoryAdvanced
PLATFONE_API_URLThe URL for the Platfone API, either sandbox or production endpoint.GeneralNo
PLATFONE_API_KEYAPI key for the Platfone API.GeneralNo
CUSTOMER_PRICE_MARKUPPercentage markup applied to the cost of temporary phone numbers for profit.GeneralNo
APPSTORE_ENABLEEnable App Store in-app purchases as a payment option.App StoreNo
APPSTORE_BUNDLE_IDUnique bundle ID for your app in the App Store (e.g., com.example.app).App StoreNo
APPSTORE_APP_IDNumeric App ID for your app in the App Store, found in App Store Connect.App StoreNo
APPSTORE_ENVIRONMENTEnvironment for App Store purchases (Sandbox or Production).App StoreNo
APPSTORE_PRODUCTSJSON object with product IDs and prices in cents for App Store purchases.App StoreNo
GOOGLE_PLAY_ENABLEEnable Google Play in-app purchases as a payment option.Google PlayNo
GOOGLE_PLAY_SECRET_FILEPath to the service account key file with access to manage Google Play financial data.Google PlayNo
GOOGLE_PLAY_PACKAGE_NAMEPackage name of your app as defined in Google Play.Google PlayNo
GOOGLE_PLAY_PRODUCTSJSON object with product IDs and prices in cents for Google Play purchases.Google PlayNo
CLOUD_FUNCTIONS_LOCATIONCloud Functions deployment region, ideally close to the database for performance.GeneralYes
CREATE_TN_CUSTOMER_ON_FIREBASE_USER_CREATEWhether to create a customer in Platfone API when a Firebase Auth user is created.GeneralYes
DELETE_TN_CUSTOMER_ON_FIREBASE_USER_DELETEWhether to delete a customer in Platfone API when a Firebase Auth user is deleted.GeneralYes
FIRESTORE_DATABASE_NAMEName of the Firestore database for storing customer and payment data.GeneralYes
FIRESTORE_CUSTOMERS_COLLECTIONName of the Firestore collection for storing customer data.GeneralYes
FIRESTORE_PAYMENTS_COLLECTIONName of the Firestore collection for storing payment data.GeneralYes
PLATFONE_ADMINS_FIREBASE_UIDSComma-separated list of Firebase UIDs for admin access to Platfone API.GeneralYes
STRIPE_ENABLEEnable Stripe payments for users to top up their balance.StripeYes
STRIPE_WEBHOOK_SECRETSecret key for verifying incoming Stripe webhook messages.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_METADATA_PAYMENT_SOURCEValue added to each Stripe payment intent to distinguish it for this backend.StripeYes