@@ -169,3 +169,38 @@ your `starpod.config.ts` and RSS feed:
169169- ` /{episode-number}.html.md ` - Alternative episode URL
170170
171171No configuration needed - it just works!
172+
173+ ## Polar.sh Checkout Integration
174+
175+ This site uses Polar.sh for sponsor checkout. To set it up:
176+
177+ 1 . ** Get your Polar credentials:**
178+ - Log in to your [ Polar dashboard] ( https://polar.sh )
179+ - Go to Settings → API to get your access token
180+ - Create two products for your sponsorship packages (30-second and 60-second ads)
181+ - Note the product IDs from each product's page
182+
183+ 2 . ** Configure environment variables:**
184+ Create a ` .env ` file in the root directory with:
185+ ``` env
186+ POLAR_ACCESS_TOKEN=your_polar_access_token_here
187+ POLAR_30SEC_PRODUCT_ID=your_30sec_product_id_here
188+ POLAR_60SEC_PRODUCT_ID=your_60sec_product_id_here
189+ POLAR_SUCCESS_URL=https://whiskey.fm/sponsor/success
190+ ```
191+
192+ 3 . ** Test the integration:**
193+ - For testing, you can set ` PUBLIC_POLAR_SERVER=sandbox ` in your ` .env `
194+ - Visit ` /sponsor ` and click on either sponsorship option
195+ - You'll be redirected to Polar's checkout page
196+ - After successful payment, users return to ` /sponsor/success `
197+
198+ 4 . ** Go live:**
199+ - Remove ` PUBLIC_POLAR_SERVER ` or set it to ` production `
200+ - Ensure your product IDs are for production products
201+ - Test with a real payment to confirm everything works
202+
203+ The integration uses the ` @polar-sh/astro ` package which provides:
204+ - Server-side checkout session creation at ` /api/checkout `
205+ - Automatic tax compliance through Polar's Merchant of Record service
206+ - Support for multiple products and dynamic pricing
0 commit comments