- Variable pricing without managing multiple products
- Customer-driven pricing where buyers choose their amount
- Programmatic price control where you set the amount dynamically via API
- Flexible pricing models for digital products, donations, or experimental launches
How It Works
With Pay What You Want enabled, you can:- Set price bounds: Define a minimum price (required) and optionally a maximum price
- Pass dynamic amounts: Include an
amountfield in the product cart when creating checkout sessions - Let customers choose: If no amount is provided, customers can enter their own price (within your bounds)
When you pass an
amount in the product cart, that amount is used for the checkout. If you omit the amount field, customers can select their own price during checkout (subject to your minimum/maximum settings).Step 1: Create a Product with Pay What You Want
First, create a one-time product in your Dodo Payments dashboard and enable Pay What You Want pricing.1
Create a new product
Navigate to Products in your Dodo Payments dashboard and click Add Product.
2
Configure product details
Fill in the required product information:
- Product Name: Display name for your product
- Product Description: Clear description of what customers are purchasing
- Product Image: Upload an image (PNG/JPG/WebP, up to 3 MB)
- Tax Category: Select the appropriate tax category
3
Set pricing type
Select Pricing Type as Single Payment (one-time payment).
4
Enable Pay What You Want
In the Pricing section, enable the Pay What You Want toggle.
5
Set minimum price
Enter the Minimum Price that customers must pay. This is required and ensures you maintain a revenue floor.Example: If your minimum is $5.00, enter
5.00 (or 500 cents).6
Set maximum price (optional)
Optionally, set a Maximum Price to cap the amount customers can pay.
7
Set suggested price (optional)
Optionally, enter a Suggested Price that will be displayed to guide customers. This helps anchor expectations and can improve average order value.
8
Save the product
Click Add Product to save. Note your product ID (e.g.,
pdt_123abc456def) for use in checkout sessions.Step 2: Create Checkout Sessions with Dynamic Pricing
Once your product is configured with Pay What You Want, you can create checkout sessions with dynamic amounts. Theamount field in the product cart allows you to set the price programmatically for each checkout session.
Understanding the Amount Field
When creating a checkout session, you can include anamount field in each product cart item:
- If
amountis provided: The checkout uses this exact amount (must be within your minimum/maximum bounds) - If
amountis omitted: Customers can enter their own price during checkout (within your bounds)
Code Examples
Amount Format: The
amount field must be in the lowest denomination of the currency. For USD, this means cents (e.g., $25.00 = 2500). For other currencies, use the smallest unit (e.g., paise for INR).Step 3: Let Customers Choose Their Price
If you want customers to select their own price during checkout, simply omit theamount field from the product cart. The checkout page will display an input field where customers can enter any amount within your minimum and maximum bounds.
Common Use Cases
Use Case 1: Tiered Pricing Based on User Type
Offer different prices to different customer segments using the same product:Use Case 2: Dynamic Pricing Based on Quantity
Adjust price based on quantity purchased:Use Case 3: Time-Based or Promotional Pricing
Apply promotional pricing during specific periods:Best Practices
Set Reasonable Bounds
Choose a minimum price that covers your costs while remaining accessible. Use a suggested price to guide customer expectations.
Validate Amounts
Always validate that dynamic amounts fall within your product’s minimum and maximum bounds before creating checkout sessions.
Track Pricing Decisions
Use metadata to track why specific amounts were chosen (e.g.,
pricing_tier, discount_code, user_segment).Handle Edge Cases
Ensure your application handles cases where amounts exceed maximum bounds or fall below minimums gracefully.
Validation and Error Handling
Always validate amounts against your product’s minimum and maximum settings:API Reference
Pay What You Want Feature
Learn more about the Pay What You Want pricing model and its capabilities.
Checkout Sessions Guide
Explore advanced checkout session features and customization options.
Troubleshooting
Amount is being ignored
Amount is being ignored
If your
amount field is being ignored, verify that:- The product has Pay What You Want enabled in the dashboard
- The product is a Single Payment (one-time) product, not a subscription
- The amount is in the correct format (lowest currency denomination, e.g., cents for USD)
Amount exceeds maximum or is below minimum
Amount exceeds maximum or is below minimum
The API will reject checkout sessions where the amount violates your product’s price bounds. Always validate amounts before creating checkout sessions, or let customers choose their price by omitting the
amount field.Customer can't enter their own price
Customer can't enter their own price
If customers aren’t seeing the price input field, ensure you’ve omitted the
amount field from the product cart. When amount is provided, the checkout uses that exact amount.