Skip to content

Services

Polar

Sell digital downloads or software subscriptions with a checkout that can also deliver the file or license key after payment.

Visit Polar

If you sell a set of design icons, the buyer expects a download as soon as they pay. Polar lets you attach that benefit to the product. It acts as the seller for the transaction and handles applicable sales tax.

Set up a sample product with a small file and walk through a test purchase. Follow the buyer’s download link and open the file. Checking what arrives helps you catch an old or missing attachment before launch.

When to use it
When you sell software, downloads or access to a private GitHub repository or Discord server.
When to skip it
If you sell physical goods or human services. Polar doesn’t support them.
What it costs
Free Starter plan: 5% + 50¢ per sale, plus 1.5% for cards from outside the US. Paid plans from $20 a month lower the fee. Checked 9 Nov 2026.

Take payments with Polar

Add a Polar checkout for one digital product. You practice in Polar’s separate sandbox with fake cards first, then switch to real payments after a review.

You’ll need

  • A website or web app you’re building with your AI tool, running on your computer.
  • PLAN.md, with the digital product you want to sell and its price.
  • To take real payments: your site online, a government ID, and a bank account for payouts.
  • Polar sandbox account. It’s free and takes test payments only.
  • Polar account.

Your part

  • Create the sandbox account, the product and the access token.
  • Copy keys into your .env file.
  • Pay with the test card, then pass Polar’s review to get paid out.

Copy the prompt for these steps

All 6 steps, in one prompt
I’m following “Take payments with Polar” on BuildLadder.
What the guide says I’ll end up with: A Buy button on your site that opens Polar’s checkout, takes a test payment, and tells your site when someone has paid.
This comes from https://buildladder.com/tools/polar#payments. If you can open web pages, read https://buildladder.com/tools/polar.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.

How to work with me:
- Go through the steps below in order, one at a time.
- Do what you can yourself in this folder: write code, run commands, check settings. If a service has an official command-line tool, like the Vercel CLI, you can offer to use it. Ask me before you install anything, sign in to anything or spend money.
- When a step needs me, like making an account or clicking in a dashboard, tell me exactly what to do in small steps. Then wait until I say it’s done.
- The actions, checks and fixes in each step were written for me, the reader. Where one says “your AI tool”, that means you, and “Say:” means something I would say to you.
- Never ask me to paste passwords or secret keys into this chat. I type those into the service’s own settings.
- After each step, tell me how to check it worked. Once Git is set up, save a version each time a step works. Then ask if I’m ready for the next one.
- Use plain words. I may never have coded before.

## Step 1 of 6: Create a sandbox account and a product

This step is mine to do. Walk me through it, one action at a time:
- Go to sandbox.polar.sh and create a testing account using a sign-in option shown there.
- Create an organization when asked. It holds your products and customers.
- Open Products and create a new product. Choose a one-time purchase or a subscription, then set a fixed price.
- Save the product. Your AI tool will ask for its product ID later, and that ID is safe to share.

It worked when: Your Polar sandbox organization holds one product with its price.

If something goes wrong:
- You signed in at polar.sh instead. Open the organization switcher and click Go to sandbox. Or type sandbox.polar.sh into your browser.
- You don’t know if Polar allows what you sell. Read Polar’s Acceptable Use Policy before you build. It lists what you can’t sell.

## Step 2 of 6: Save your access token in .env

This step is mine to do. Walk me through it, one action at a time:
- Ask your AI tool: “Which file in this folder should hold secret keys, and is it ignored by Git? Don’t ask me for the key.”
- If that file isn’t ignored by Git yet, ask your AI tool to add it to .gitignore before you go on.
- In your sandbox organization’s settings, open the area for organization access tokens and create one.
- Give it a name and an expiration date. Scopes set what the token is allowed to do. Ask your AI tool which ones a checkout needs.
- Copy the token. Open the file your AI tool named, such as .env, and add POLAR_ACCESS_TOKEN= followed by the token.
- Add a second line, POLAR_ENVIRONMENT=sandbox, then save the file.

It worked when: A file that Git ignores holds POLAR_ACCESS_TOKEN and POLAR_ENVIRONMENT=sandbox.

If something goes wrong:
- You get an error about your token. Sandbox tokens only work with the sandbox. Check you made it at sandbox.polar.sh, and POLAR_ENVIRONMENT says sandbox.
- You pasted the token into your AI tool’s chat by mistake. In the organization’s settings, revoke that access token and create a new one. Save the new token in your file.

## Step 3 of 6: Add a checkout for one product

Read PLAN.md in this folder. It says what I want to sell.

I want to add Polar payments for one product, in Polar’s sandbox only. No real money.

Before you write code, check Polar’s current official docs at polar.sh/docs for checkouts. Then look at my code and tell me:
- whether it has a server part that can keep a secret token safe
- if it doesn’t, the simplest option, such as a Polar Checkout Link, and what adding a server would change

Wait for my answer. Then build the smallest version that works:
- a Buy button on the page where people decide to buy
- a checkout that sends them to Polar’s hosted checkout page
- a page they come back to after paying

Rules:
- Read the access token from POLAR_ACCESS_TOKEN. Use the sandbox or production server based on POLAR_ENVIRONMENT, which is “sandbox” for now. Never put a token in code.
- Read the product ID from a POLAR_PRODUCT_ID environment variable, because it changes when I take real payments. Tell me where to find it. It’s safe to share.
- Keep everything that already works. Ask before you change something big.

When you’re done, explain in plain words what you changed, and how I can see the Buy button.

It worked when: The Buy button on your site opens Polar’s checkout page with your product and price.

If something goes wrong:
- Your AI tool says your site has no server part. Ask it to compare two choices in plain words: a Polar Checkout Link, or adding a small server. Pick one before it builds.
- The checkout says the product wasn’t found. Check POLAR_PRODUCT_ID is the ID from your sandbox product. Products from polar.sh don’t exist in the sandbox.

## Step 4 of 6: Buy it with a test card

This step is mine to do. Walk me through it, one action at a time:
- Open your site and click your Buy button.
- Use the email address you signed up with. The sandbox only sends emails to members of your organization.
- Enter the card number 4242 4242 4242 4242, any future expiry date and any CVC.
- Pay, then wait to come back to your site.
- Look for the new order in your sandbox dashboard.

It worked when: You land back on your site, and your sandbox dashboard shows a successful test order.

If something goes wrong:
- You don’t come back to your site after paying. Tell your AI tool: “After a test payment, I don’t land back on my site. Please find out why.”

## Step 5 of 6: React when a payment succeeds

The test checkout works. Now I want my site to react when a payment succeeds, using a Polar webhook.

Check Polar’s current docs on webhooks first. Then:
- Add a webhook route that listens for order.paid.
- Verify every event with Polar’s official SDK, using the raw request body and the signing secret from the POLAR_WEBHOOK_SECRET environment variable.
- When a payment succeeds, do this one thing: (say what should happen, like “email the download link” or “mark the order as paid”).
- Give access from the webhook, not from the page they come back to, because people can close that page before it loads.
- Make it safe if the same event arrives twice.

If my site has no server part, stop and explain my options before you build anything.

To test on my computer, check Polar’s docs for how to forward sandbox webhooks to my machine, for example with the Polar CLI. Tell me the exact steps, and I’ll run any command myself in a separate terminal. Tell me where to find or set the signing secret, and I’ll put it in my .env file myself.

Keep everything that already works. When you’re done, explain what changed and how to check it worked.

It worked when: After a test payment, your site does the one thing you asked, and the terminal forwarding your webhooks shows order.paid.

If something goes wrong:
- The webhook fails with a signature error. Check POLAR_WEBHOOK_SECRET in your .env file matches the secret for this endpoint, then restart your site.
- Nothing happens after a payment. Check the forwarding command is still running in its own terminal. Then tell your AI tool what that terminal shows.

## Step 6 of 6: Switch to real payments

This step is mine to do. Walk me through it, one action at a time:
- Finish building first. Polar reviews faster when your product, checkout and webhook work and your site is online.
- Go to polar.sh and create your real account and organization. Create your product again with the same price.
- Open Finance, then Account. Submit your business for approval, verify your ID with a selfie, and connect a payout account. Finish any details Polar asks for, and check the account’s status before you take real payments.
- In your real organization’s settings, create an organization access token. Save it in your host’s settings as POLAR_ACCESS_TOKEN.
- In the same settings, set POLAR_ENVIRONMENT to production and POLAR_PRODUCT_ID to your real product’s ID.
- In Settings, then Webhooks, click Add Endpoint. Enter your live webhook address, choose Raw, set a secret and pick order.paid.
- Save that secret in your host’s settings as POLAR_WEBHOOK_SECRET.
- Don’t test with a real card, because Polar treats it as card testing. Make a 100% discount code instead, so no money moves.

It worked when: Your public site has a live checkout, and the live keys are only in your host’s settings.

Before we move on, check with me:
- Does a purchase with your 100% discount code make your site do the one thing you asked?

If something goes wrong:
- You can’t get paid out yet. Payouts wait for Polar’s review. Polar says initial reviews can take up to 14 days. A payout you request during a review shows as Held for review, then pays out after approval. Later reviews can hold payouts while purchases and renewals continue.
- The live checkout fails but the sandbox worked. Check every setting in your host uses production values: the token, the product ID and the webhook secret. Then put your site online again.

The steps

  • Steps marked AI tool are done by your AI tool when you paste the prompt. The rest are yours.
  • Save a version after every step that works.
  • If a screen looks different from a step, ask your AI tool where the setting moved.
  • Never paste a password or secret key into the chat.
  1. A test account, ready to use

    Create a sandbox account and a product

    You

    Polar’s sandbox is a separate practice site with its own sign-in. Payments there use fake cards, so you can build and test without moving real money.

    1. Go to sandbox.polar.sh and create a testing account using a sign-in option shown there.
    2. Create an organization when asked. It holds your products and customers.
    3. Open Products and create a new product. Choose a one-time purchase or a subscription, then set a fixed price.
    4. Save the product. Your AI tool will ask for its product ID later, and that ID is safe to share.

    It worked when: Your Polar sandbox organization holds one product with its price.

    You signed in at polar.sh instead.

    Open the organization switcher and click Go to sandbox. Or type sandbox.polar.sh into your browser.

    You don’t know if Polar allows what you sell.

    Read Polar’s Acceptable Use Policy before you build. It lists what you can’t sell.

  2. Save your access token in .env

    You

    Your code needs a secret access token to talk to Polar. You paste it into your .env file yourself, so it stays out of your AI tool’s chat and off GitHub.

    1. Ask your AI tool: “Which file in this folder should hold secret keys, and is it ignored by Git? Don’t ask me for the key.”
    2. If that file isn’t ignored by Git yet, ask your AI tool to add it to .gitignore before you go on.
    3. In your sandbox organization’s settings, open the area for organization access tokens and create one.
    4. Give it a name and an expiration date. Scopes set what the token is allowed to do. Ask your AI tool which ones a checkout needs.
    5. Copy the token. Open the file your AI tool named, such as .env, and add POLAR_ACCESS_TOKEN= followed by the token.
    6. Add a second line, POLAR_ENVIRONMENT=sandbox, then save the file.

    It worked when: A file that Git ignores holds POLAR_ACCESS_TOKEN and POLAR_ENVIRONMENT=sandbox.

    You get an error about your token.

    Sandbox tokens only work with the sandbox. Check you made it at sandbox.polar.sh, and POLAR_ENVIRONMENT says sandbox.

    You pasted the token into your AI tool’s chat by mistake.

    In the organization’s settings, revoke that access token and create a new one. Save the new token in your file.

  3. A working checkout

    Add a checkout for one product

    AI tool

    Your AI tool adds a Buy button that sends people to Polar’s own checkout page. Polar handles the card details and the tax, so your code never sees them.

    It worked when: The Buy button on your site opens Polar’s checkout page with your product and price.

    Your AI tool says your site has no server part.

    Ask it to compare two choices in plain words: a Polar Checkout Link, or adding a small server. Pick one before it builds.

    The checkout says the product wasn’t found.

    Check POLAR_PRODUCT_ID is the ID from your sandbox product. Products from polar.sh don’t exist in the sandbox.

  4. Buy it with a test card

    You

    Pay for your own product with Polar’s test card. Nothing is charged, and you see exactly what a customer sees.

    1. Open your site and click your Buy button.
    2. Use the email address you signed up with. The sandbox only sends emails to members of your organization.
    3. Enter the card number 4242 4242 4242 4242, any future expiry date and any CVC.
    4. Pay, then wait to come back to your site.
    5. Look for the new order in your sandbox dashboard.

    It worked when: You land back on your site, and your sandbox dashboard shows a successful test order.

    You don’t come back to your site after paying.

    Tell your AI tool: “After a test payment, I don’t land back on my site. Please find out why.”

  5. React when a payment succeeds

    AI tool

    A webhook is a message Polar sends your site when someone pays. Your site uses it to give buyers what they paid for, even if they close the page early.

    It worked when: After a test payment, your site does the one thing you asked, and the terminal forwarding your webhooks shows order.paid.

    The webhook fails with a signature error.

    Check POLAR_WEBHOOK_SECRET in your .env file matches the secret for this endpoint, then restart your site.

    Nothing happens after a payment.

    Check the forwarding command is still running in its own terminal. Then tell your AI tool what that terminal shows.

  6. Switch to real payments

    You

    Your sandbox doesn’t carry over, so you set things up again on polar.sh. You make each change yourself, and your AI tool can explain any of them.

    1. Finish building first. Polar reviews faster when your product, checkout and webhook work and your site is online.
    2. Go to polar.sh and create your real account and organization. Create your product again with the same price.
    3. Open Finance, then Account. Submit your business for approval, verify your ID with a selfie, and connect a payout account. Finish any details Polar asks for, and check the account’s status before you take real payments.
    4. In your real organization’s settings, create an organization access token. Save it in your host’s settings as POLAR_ACCESS_TOKEN.
    5. In the same settings, set POLAR_ENVIRONMENT to production and POLAR_PRODUCT_ID to your real product’s ID.
    6. In Settings, then Webhooks, click Add Endpoint. Enter your live webhook address, choose Raw, set a secret and pick order.paid.
    7. Save that secret in your host’s settings as POLAR_WEBHOOK_SECRET.
    8. Don’t test with a real card, because Polar treats it as card testing. Make a 100% discount code instead, so no money moves.

    It worked when: Your public site has a live checkout, and the live keys are only in your host’s settings.

    Check this step
    • Does a purchase with your 100% discount code make your site do the one thing you asked?
    You can’t get paid out yet.

    Payouts wait for Polar’s review. Polar says initial reviews can take up to 14 days. A payout you request during a review shows as Held for review, then pays out after approval. Later reviews can hold payouts while purchases and renewals continue.

    The live checkout fails but the sandbox worked.

    Check every setting in your host uses production values: the token, the product ID and the webhook secret. Then put your site online again.

Compare Polar with the other options

Stuck? Try these, in order
  1. Stop asking it to “fix it”. Say exactly what’s wrong.

    Paste this into the same chat. It asks your AI tool to find the problem with you.

    Troubleshooting prompt
    I’m following “Polar” on BuildLadder and something isn’t working.
    This comes from https://buildladder.com/tools/polar. If you can open web pages, read https://buildladder.com/tools/polar.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.
    
    Ask me which step I’m on, what I tried and what happened, one question at a time. Look at the files in this folder if you can. Then explain the problem in plain words and suggest the smallest fix. Don’t change anything that already works.

  2. Check the service isn’t down.

    If you use one of these, open its status page before changing any code: Supabase, Vercel, Netlify, Cloudflare, Stripe, Clerk, Firebase, Resend, GitHub, Expo, Claude, OpenAI.

  3. Go back to your last saved version.
    Troubleshooting prompt
    Take my product back to the last saved version that worked. First show me which version that is and what will change. Don’t delete anything else.

  4. Make the change smaller.
    Troubleshooting prompt
    Let’s make a smaller change. Undo what you just tried. Then do only the first part of it, and tell me how to check that part works before we go on.

  5. Ask a person.

    Copy this, fill in each line, and post it in a community like r/vibecoding. Take out any keys or passwords first.

    Problem report
    What I'm building: (one sentence)
    What I asked my AI tool to do: (the last request)
    What I expected: (what should happen)
    What happened instead: (what you see)
    The exact error, if any: (copy it here)
    What I've tried: (each attempt, in order)
    My tools: (AI tool, website or app, hosting)

Look things up

Questions people ask

Words used on this page

Test mode
Test mode is a practice space in a payment service. Stripe calls it a sandbox. You pay with fake card numbers, so you can check everything works without moving real money.
Merchant of record
A merchant of record is the company that legally sells to your customer. It collects and pays sales tax and VAT for you, and its name can appear on the buyer’s card statement.
API key
An API key is a long code that tells a service your app is allowed to use it. Many keys are secret, so treat them like passwords and keep them out of shared code.
Environment variable
An environment variable is a named setting stored outside your code, such as an API key or a database address. Your app reads it when it runs, so secrets stay out of your shared files.
Git
Git is a free tool on your computer that keeps a history of your product's files. It lets you save versions, compare them, and go back if something breaks.
Checkout
A checkout is the page where a customer enters payment details and pays. Payment services host one for you, so card details never touch your own code.
Backend
The backend is the behind-the-scenes part of an app that visitors never see. It runs on a server, where it saves data and checks who is signed in.
Webhook
A webhook is a message one service sends to your app when something happens, like a payment going through. Your app listens at a web address and reacts.
Production
Production is the live version of your website or app that real people use. Changes there affect everyone, so you test them in a preview first.

Official pages

Updated · Polar