Should product_id live in the frontend?
Create Checkout from your backend and control allowed Products server-side.
Products & ProductPrices
Create Products and versioned ProductPrices in the dashboard, then send a stable product_id from your backend.
Start for freeOutcome
Name the plan and describe the value customers receive.
Choose a fixed VND amount and monthly or yearly cadence.
Store the Product ID server-side and send it when creating Checkouts.
API keys are server secrets. Never expose them in browser or mobile code.
const checkout = await billing.checkout.create({
customer_id: customerId,
product_id: process.env.VIETBILLING_PRODUCT_ID,
success_url: "https://app.example/success",
cancel_url: "https://app.example/cancel"
})Create Checkout from your backend and control allowed Products server-side.
Changing price creates a new ProductPrice so history and existing Subscriptions retain their snapshot.