VietBilling

Products & ProductPrices

Model recurring plans before writing Checkout code.

Create Products and versioned ProductPrices in the dashboard, then send a stable product_id from your backend.

Start for free

Outcome

Catalog and Checkout share one configuration source instead of hard-coded frontend prices.

01

Create Product

Name the plan and describe the value customers receive.

02

Add ProductPrice

Choose a fixed VND amount and monthly or yearly cadence.

03

Use product_id

Store the Product ID server-side and send it when creating Checkouts.

Integrate from your backend

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"
})

FAQ

Should product_id live in the frontend?

Create Checkout from your backend and control allowed Products server-side.

Can I edit a ProductPrice in use?

Changing price creates a new ProductPrice so history and existing Subscriptions retain their snapshot.