[{"data":1,"prerenderedAt":870},["ShallowReactive",2],{"navigation_docs":3,"-guides-payments-environment-variables":119,"-guides-payments-environment-variables-surround":865},[4,25],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"/getting-started","1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","/getting-started/introduction","1.getting-started/2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","/getting-started/installation","1.getting-started/3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Project Structure","/getting-started/project-structure","1.getting-started/4.project-structure","i-lucide-folder-tree",{"title":26,"icon":6,"path":27,"stem":28,"children":29,"page":6},"Guides","/guides","2. guides",[30,34,49,74],{"title":31,"path":32,"stem":33,"icon":24},"Repositories","/guides/respositories","2. guides/3. respositories",{"title":35,"icon":6,"path":36,"stem":37,"children":38,"page":6},"Authentication","/guides/authentication","2. guides/4. authentication",[39,44],{"title":40,"path":41,"stem":42,"icon":43},"Authentication Setup","/guides/authentication/setup","2. guides/4. authentication/5. setup","i-lucide-lock-keyhole",{"title":45,"path":46,"stem":47,"icon":48},"JWT Configuration","/guides/authentication/jwt-configuration","2. guides/4. authentication/6. jwt-configuration","i-lucide-key",{"title":50,"icon":6,"path":51,"stem":52,"children":53,"page":6},"Charcoles Swagger","/guides/swagger","2. guides/5. swagger",[54,59,64,69],{"title":55,"path":56,"stem":57,"icon":58},"Introduction to Charcole Swagger Documentation","/guides/swagger/introduction","2. guides/5. swagger/6. introduction","i-lucide-book-open",{"title":60,"path":61,"stem":62,"icon":63},"Adding Swagger to Existing Charcole Projects","/guides/swagger/swagger-migration","2. guides/5. swagger/7. swagger-migration","i-lucide-arrow-up-circle",{"title":65,"path":66,"stem":67,"icon":68},"Swagger for Non-Charcole Projects","/guides/swagger/non-charcole-users","2. guides/5. swagger/8. non-charcole-users","i-lucide-package-plus",{"title":70,"path":71,"stem":72,"icon":73},"Swagger Examples","/guides/swagger/swagger-examples","2. guides/5. swagger/9. swagger-examples","i-lucide-code-2",{"title":75,"icon":76,"path":77,"stem":78,"children":79,"page":6},"Charcoles Payments","i-heroicons-credit-card","/guides/payments","2. guides/6. payments",[80,84,89,94,99,104,109,114],{"title":81,"path":82,"stem":83,"icon":76},"Payments","/guides/payments/introduction","2. guides/6. payments/1. introduction",{"title":85,"path":86,"stem":87,"icon":88},"Setup","/guides/payments/setup","2. guides/6. payments/2. setup","i-heroicons-wrench-screwdriver",{"title":90,"path":91,"stem":92,"icon":93},"Providers","/guides/payments/providers","2. guides/6. payments/3. providers","i-heroicons-building-library",{"title":95,"path":96,"stem":97,"icon":98},"API Endpoints","/guides/payments/endpoints","2. guides/6. payments/4. endpoints","i-heroicons-arrows-right-left",{"title":100,"path":101,"stem":102,"icon":103},"Webhooks","/guides/payments/webhooks","2. guides/6. payments/5. webhooks","i-heroicons-bolt",{"title":105,"path":106,"stem":107,"icon":108},"Environment Variables","/guides/payments/environment-variables","2. guides/6. payments/6. environment-variables","i-heroicons-key",{"title":110,"path":111,"stem":112,"icon":113},"Using Without Charcole","/guides/payments/non-charcole-users","2. guides/6. payments/7. non-charcole-users","i-heroicons-puzzle-piece",{"title":115,"path":116,"stem":117,"icon":118},"Examples","/guides/payments/payments-examples","2. guides/6. payments/8. payments-examples","i-heroicons-code-bracket",{"id":120,"title":105,"body":121,"description":849,"extension":850,"links":851,"meta":852,"navigation":853,"path":106,"seo":854,"stem":107,"__hash__":864},"docs/2. guides/6. payments/6. environment-variables.md",{"type":122,"value":123,"toc":829},"minimark",[124,129,284,287,291,299,382,384,388,392,402,405,414,417,423,433,453,462,465,468,481,490,493,496,505,508,517,520,523,530,539,542,545,554,557,560,571,574,583,585,589,595,608,610,614,617,739,741,745,749,752,764,767,771,774,783,786,802,804,808,825],[125,126,128],"h2",{"id":127},"all-payment-variables","All Payment Variables",[130,131,132,151],"table",{},[133,134,135],"thead",{},[136,137,138,142,145,148],"tr",{},[139,140,141],"th",{},"Variable",[139,143,144],{},"Required",[139,146,147],{},"Provider",[139,149,150],{},"Description",[152,153,154,178,201,218,240,256,270],"tbody",{},[136,155,156,163,166,169],{},[157,158,159],"td",{},[160,161,162],"code",{},"PAYMENT_PROVIDER",[157,164,165],{},"Yes",[157,167,168],{},"Both",[157,170,171,174,175],{},[160,172,173],{},"\"stripe\""," or ",[160,176,177],{},"\"lemonsqueezy\"",[136,179,180,185,188,191],{},[157,181,182],{},[160,183,184],{},"STRIPE_SECRET_KEY",[157,186,187],{},"If Stripe",[157,189,190],{},"Stripe",[157,192,193,194,174,197,200],{},"Secret key from Stripe dashboard (",[160,195,196],{},"sk_live_...",[160,198,199],{},"sk_test_...",")",[136,202,203,208,210,212],{},[157,204,205],{},[160,206,207],{},"STRIPE_WEBHOOK_SECRET",[157,209,187],{},[157,211,190],{},[157,213,214,215,200],{},"Webhook signing secret from Stripe (",[160,216,217],{},"whsec_...",[136,219,220,225,228,230],{},[157,221,222],{},[160,223,224],{},"STRIPE_PUBLISHABLE_KEY",[157,226,227],{},"No",[157,229,190],{},[157,231,232,233,174,236,239],{},"Publishable key for frontend (",[160,234,235],{},"pk_live_...",[160,237,238],{},"pk_test_...",") — safe to expose",[136,241,242,247,250,253],{},[157,243,244],{},[160,245,246],{},"LEMONSQUEEZY_API_KEY",[157,248,249],{},"If LemonSqueezy",[157,251,252],{},"LemonSqueezy",[157,254,255],{},"API key from LemonSqueezy settings",[136,257,258,263,265,267],{},[157,259,260],{},[160,261,262],{},"LEMONSQUEEZY_WEBHOOK_SECRET",[157,264,249],{},[157,266,252],{},[157,268,269],{},"Webhook signing secret from LemonSqueezy",[136,271,272,277,279,281],{},[157,273,274],{},[160,275,276],{},"LEMONSQUEEZY_STORE_ID",[157,278,249],{},[157,280,252],{},[157,282,283],{},"Numeric store ID from LemonSqueezy dashboard",[285,286],"hr",{},[125,288,290],{"id":289},"complete-env-block","Complete .env Block",[292,293,294,295,298],"p",{},"Copy this into your ",[160,296,297],{},".env"," file and fill in your credentials:",[300,301,306],"pre",{"className":302,"code":303,"language":304,"meta":305,"style":305},"language-env shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Payments\nPAYMENT_PROVIDER=\n\n# Stripe — https://dashboard.stripe.com/apikeys\nSTRIPE_SECRET_KEY=\nSTRIPE_WEBHOOK_SECRET=\nSTRIPE_PUBLISHABLE_KEY=\n\n# LemonSqueezy — https://app.lemonsqueezy.com/settings/api\nLEMONSQUEEZY_API_KEY=\nLEMONSQUEEZY_WEBHOOK_SECRET=\nLEMONSQUEEZY_STORE_ID=\n","env","",[160,307,308,316,322,329,335,341,347,353,358,364,370,376],{"__ignoreMap":305},[309,310,313],"span",{"class":311,"line":312},"line",1,[309,314,315],{},"# Payments\n",[309,317,319],{"class":311,"line":318},2,[309,320,321],{},"PAYMENT_PROVIDER=\n",[309,323,325],{"class":311,"line":324},3,[309,326,328],{"emptyLinePlaceholder":327},true,"\n",[309,330,332],{"class":311,"line":331},4,[309,333,334],{},"# Stripe — https://dashboard.stripe.com/apikeys\n",[309,336,338],{"class":311,"line":337},5,[309,339,340],{},"STRIPE_SECRET_KEY=\n",[309,342,344],{"class":311,"line":343},6,[309,345,346],{},"STRIPE_WEBHOOK_SECRET=\n",[309,348,350],{"class":311,"line":349},7,[309,351,352],{},"STRIPE_PUBLISHABLE_KEY=\n",[309,354,356],{"class":311,"line":355},8,[309,357,328],{"emptyLinePlaceholder":327},[309,359,361],{"class":311,"line":360},9,[309,362,363],{},"# LemonSqueezy — https://app.lemonsqueezy.com/settings/api\n",[309,365,367],{"class":311,"line":366},10,[309,368,369],{},"LEMONSQUEEZY_API_KEY=\n",[309,371,373],{"class":311,"line":372},11,[309,374,375],{},"LEMONSQUEEZY_WEBHOOK_SECRET=\n",[309,377,379],{"class":311,"line":378},12,[309,380,381],{},"LEMONSQUEEZY_STORE_ID=\n",[285,383],{},[125,385,387],{"id":386},"variable-notes","Variable Notes",[389,390,162],"h3",{"id":391},"payment_provider",[292,393,394,395,174,398,401],{},"Determines which adapter is used. Valid values: ",[160,396,397],{},"stripe",[160,399,400],{},"lemonsqueezy",".",[292,403,404],{},"To switch providers, just update this variable and restart your server. No code changes needed.",[300,406,408],{"className":302,"code":407,"language":304,"meta":305,"style":305},"PAYMENT_PROVIDER=stripe\n",[160,409,410],{"__ignoreMap":305},[309,411,412],{"class":311,"line":312},[309,413,407],{},[389,415,184],{"id":416},"stripe_secret_key",[292,418,419,420,422],{},"Your secret API key from Stripe. Never expose this. Keep it in ",[160,421,297],{}," only.",[292,424,425,426,401],{},"Find it at ",[427,428,432],"a",{"href":429,"rel":430},"https://dashboard.stripe.com/apikeys",[431],"nofollow","dashboard.stripe.com/apikeys",[292,434,435,439,440,443,446,449,450],{},[436,437,438],"strong",{},"Test key"," (development): starts with ",[160,441,442],{},"sk_test_",[444,445],"br",{},[436,447,448],{},"Live key"," (production): starts with ",[160,451,452],{},"sk_live_",[300,454,456],{"className":302,"code":455,"language":304,"meta":305,"style":305},"STRIPE_SECRET_KEY=sk_test_51234...\n",[160,457,458],{"__ignoreMap":305},[309,459,460],{"class":311,"line":312},[309,461,455],{},[389,463,207],{"id":464},"stripe_webhook_secret",[292,466,467],{},"The signing secret for webhook verification. Found in Stripe webhook settings.",[292,469,470,471,476,477,480],{},"Get it from ",[427,472,475],{"href":473,"rel":474},"https://dashboard.stripe.com/webhooks",[431],"dashboard.stripe.com/webhooks"," — look for the endpoint URL ending in ",[160,478,479],{},"/payments/webhook"," and copy the signing secret.",[300,482,484],{"className":302,"code":483,"language":304,"meta":305,"style":305},"STRIPE_WEBHOOK_SECRET=whsec_test_12345...\n",[160,485,486],{"__ignoreMap":305},[309,487,488],{"class":311,"line":312},[309,489,483],{},[389,491,224],{"id":492},"stripe_publishable_key",[292,494,495],{},"Your public API key. Safe to expose in frontend code.",[292,497,498,501,502,504],{},[436,499,500],{},"This key is never used server-side."," Include it in ",[160,503,297],{}," for reference only. The server only reads the secret key.",[292,506,507],{},"If you're using Stripe.js on the frontend, you'll need this key there, but the backend payments module doesn't use it.",[300,509,511],{"className":302,"code":510,"language":304,"meta":305,"style":305},"STRIPE_PUBLISHABLE_KEY=pk_test_abcd...\n",[160,512,513],{"__ignoreMap":305},[309,514,515],{"class":311,"line":312},[309,516,510],{},[389,518,246],{"id":519},"lemonsqueezy_api_key",[292,521,522],{},"Your LemonSqueezy API key for making authenticated requests to their API.",[292,524,470,525,401],{},[427,526,529],{"href":527,"rel":528},"https://app.lemonsqueezy.com/settings/api",[431],"app.lemonsqueezy.com/settings/api",[300,531,533],{"className":302,"code":532,"language":304,"meta":305,"style":305},"LEMONSQUEEZY_API_KEY=your_api_key_here\n",[160,534,535],{"__ignoreMap":305},[309,536,537],{"class":311,"line":312},[309,538,532],{},[389,540,262],{"id":541},"lemonsqueezy_webhook_secret",[292,543,544],{},"The signing secret for LemonSqueezy webhook verification. Created when you set up a webhook in LemonSqueezy.",[300,546,548],{"className":302,"code":547,"language":304,"meta":305,"style":305},"LEMONSQUEEZY_WEBHOOK_SECRET=your_webhook_secret\n",[160,549,550],{"__ignoreMap":305},[309,551,552],{"class":311,"line":312},[309,553,547],{},[389,555,276],{"id":556},"lemonsqueezy_store_id",[292,558,559],{},"Your numeric store ID from LemonSqueezy.",[292,561,562,563],{},"Find it in the URL: ",[427,564,567,568],{"href":565,"rel":566},"https://app.lemonsqueezy.com/stores",[431],"app.lemonsqueezy.com/stores/",[160,569,570],{},"THIS_NUMBER",[292,572,573],{},"Numeric only. No letters or special characters.",[300,575,577],{"className":302,"code":576,"language":304,"meta":305,"style":305},"LEMONSQUEEZY_STORE_ID=12345\n",[160,578,579],{"__ignoreMap":305},[309,580,581],{"class":311,"line":312},[309,582,576],{},[285,584],{},[125,586,588],{"id":587},"optional-vs-required","Optional vs Required",[292,590,591,594],{},[436,592,593],{},"All payment variables are optional in the Zod schema."," If you don't use payments, missing payment vars won't crash your server.",[292,596,597,598,601,602,604,605,607],{},"However, if you set ",[160,599,600],{},"PAYMENT_PROVIDER=stripe",", then ",[160,603,184],{}," and ",[160,606,207],{}," become required at runtime. Missing them will cause an error when the module initializes.",[285,609],{},[125,611,613],{"id":612},"error-reference","Error Reference",[292,615,616],{},"If you see these errors, check the corresponding fix:",[130,618,619,632],{},[133,620,621],{},[136,622,623,626,629],{},[139,624,625],{},"Error",[139,627,628],{},"Meaning",[139,630,631],{},"Fix",[152,633,634,656,676,697,718],{},[136,635,636,641,646],{},[157,637,638],{},[160,639,640],{},"PROVIDER_NOT_CONFIGURED",[157,642,643,645],{},[160,644,162],{}," is not set",[157,647,648,649,174,651,653,654],{},"Add ",[160,650,600],{},[160,652,400],{}," to ",[160,655,297],{},[136,657,658,663,666],{},[157,659,660],{},[160,661,662],{},"STRIPE_CONFIG_MISSING",[157,664,665],{},"Missing Stripe credentials for selected provider",[157,667,668,669,604,671,673,674],{},"Check ",[160,670,184],{},[160,672,207],{}," in ",[160,675,297],{},[136,677,678,683,686],{},[157,679,680],{},[160,681,682],{},"LEMONSQUEEZY_CONFIG_MISSING",[157,684,685],{},"Missing LemonSqueezy credentials for selected provider",[157,687,668,688,690,691,690,693,673,695],{},[160,689,246],{},", ",[160,692,262],{},[160,694,276],{},[160,696,297],{},[136,698,699,704,707],{},[157,700,701],{},[160,702,703],{},"WEBHOOK_SIGNATURE_INVALID",[157,705,706],{},"Webhook signature verification failed",[157,708,709,710,174,712,714,715,401],{},"Check that ",[160,711,207],{},[160,713,262],{}," matches your provider settings. Also verify the raw body middleware is registered before ",[160,716,717],{},"express.json()",[136,719,720,725,734],{},[157,721,722],{},[160,723,724],{},"INVALID_PROVIDER_VALUE",[157,726,727,729,730,174,732],{},[160,728,162],{}," is not ",[160,731,397],{},[160,733,400],{},[157,735,736,737],{},"Fix the spelling or case of ",[160,738,162],{},[285,740],{},[125,742,744],{"id":743},"development-vs-production","Development vs Production",[389,746,748],{"id":747},"development","Development",[292,750,751],{},"Use test keys while building:",[753,754,755,761],"ul",{},[756,757,758,759],"li",{},"Stripe: ",[160,760,199],{},[756,762,763],{},"LemonSqueezy: test API key (check your LemonSqueezy account for test mode)",[292,765,766],{},"Test keys never charge real payment methods.",[389,768,770],{"id":769},"production","Production",[292,772,773],{},"Switch to live keys:",[753,775,776,780],{},[756,777,758,778],{},[160,779,196],{},[756,781,782],{},"LemonSqueezy: live API key",[292,784,785],{},"Double-check:",[753,787,788,793,796,799],{},[756,789,790,792],{},[160,791,162],{}," is correct",[756,794,795],{},"Webhook URLs are set to your production domain",[756,797,798],{},"Webhook secrets are production secrets, not test secrets",[756,800,801],{},"All required vars are present",[285,803],{},[125,805,807],{"id":806},"what-comes-next","What Comes Next",[753,809,810,817],{},[756,811,812,816],{},[436,813,814],{},[427,815,90],{"href":91}," — Get your API keys",[756,818,819,824],{},[436,820,821],{},[427,822,823],{"href":96},"Endpoints"," — Make payment requests",[826,827,828],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":305,"searchDepth":318,"depth":318,"links":830},[831,832,833,842,843,844,848],{"id":127,"depth":318,"text":128},{"id":289,"depth":318,"text":290},{"id":386,"depth":318,"text":387,"children":834},[835,836,837,838,839,840,841],{"id":391,"depth":324,"text":162},{"id":416,"depth":324,"text":184},{"id":464,"depth":324,"text":207},{"id":492,"depth":324,"text":224},{"id":519,"depth":324,"text":246},{"id":541,"depth":324,"text":262},{"id":556,"depth":324,"text":276},{"id":587,"depth":318,"text":588},{"id":612,"depth":318,"text":613},{"id":743,"depth":318,"text":744,"children":845},[846,847],{"id":747,"depth":324,"text":748},{"id":769,"depth":324,"text":770},{"id":806,"depth":318,"text":807},"Complete reference of all payment-related environment variables.","md",null,{},{"icon":108},{"title":855,"description":856,"keywords":857},"Payment Environment Variables","Reference guide for all Stripe and LemonSqueezy configuration variables.",[858,859,860,861,862,863],"environment variables","configuration","stripe keys","lemonsqueezy keys","api keys","webhook secrets","yJhJANIrKoETD2G9qjulWbWtj5QCgN24I2dzyUhBjKU",[866,868],{"title":100,"path":101,"stem":102,"description":867,"icon":103,"children":-1},"Handle payment events reliably with webhook processing, deduplication, and testing.",{"title":110,"path":111,"stem":112,"description":869,"icon":113,"children":-1},"Install the payments module into any Express application.",1777986766424]