[{"data":1,"prerenderedAt":773},["ShallowReactive",2],{"navigation_docs":3,"-guides-payments-providers":119,"-guides-payments-providers-surround":768},[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":90,"body":121,"description":753,"extension":754,"links":755,"meta":756,"navigation":757,"path":91,"seo":758,"stem":92,"__hash__":767},"docs/2. guides/6. payments/3. providers.md",{"type":122,"value":123,"toc":733},"minimark",[124,129,134,174,178,206,209,217,252,256,309,319,322,326,329,374,377,381,406,410,550,554,596,599,601,605,608,633,639,641,645,649,652,667,673,677,680,700,702,706,729],[125,126,128],"h2",{"id":127},"stripe-configuration","Stripe Configuration",[130,131,133],"h3",{"id":132},"get-your-credentials","Get Your Credentials",[135,136,137,148,168,171],"ol",{},[138,139,140,141],"li",{},"Go to ",[142,143,147],"a",{"href":144,"rel":145},"https://dashboard.stripe.com/apikeys",[146],"nofollow","dashboard.stripe.com/apikeys",[138,149,150,151,155,156,160,161,155,164,167],{},"You'll see two sets of keys: ",[152,153,154],"strong",{},"Test"," (prefixed ",[157,158,159],"code",{},"sk_test_",") and ",[152,162,163],{},"Live",[157,165,166],{},"sk_live_",")",[138,169,170],{},"Start with test keys while developing",[138,172,173],{},"Copy your secret key and webhook secret",[130,175,177],{"id":176},"find-your-webhook-secret","Find Your Webhook Secret",[135,179,180,187,190,196],{},[138,181,140,182],{},[142,183,186],{"href":184,"rel":185},"https://dashboard.stripe.com/webhooks",[146],"dashboard.stripe.com/webhooks",[138,188,189],{},"Create a new endpoint or click your existing one",[138,191,192,193],{},"Your webhook endpoint should be: ",[157,194,195],{},"https://your-domain.com/payments/webhook",[138,197,198,199,202,203,167],{},"Copy the ",[152,200,201],{},"Signing secret"," (starts with ",[157,204,205],{},"whsec_",[130,207,105],{"id":208},"environment-variables",[210,211,212,213,216],"p",{},"Add these to your ",[157,214,215],{},".env",":",[218,219,224],"pre",{"className":220,"code":221,"language":222,"meta":223,"style":223},"language-env shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","PAYMENT_PROVIDER=stripe\nSTRIPE_SECRET_KEY=sk_test_...\nSTRIPE_WEBHOOK_SECRET=whsec_...\nSTRIPE_PUBLISHABLE_KEY=pk_test_...\n","env","",[157,225,226,234,240,246],{"__ignoreMap":223},[227,228,231],"span",{"class":229,"line":230},"line",1,[227,232,233],{},"PAYMENT_PROVIDER=stripe\n",[227,235,237],{"class":229,"line":236},2,[227,238,239],{},"STRIPE_SECRET_KEY=sk_test_...\n",[227,241,243],{"class":229,"line":242},3,[227,244,245],{},"STRIPE_WEBHOOK_SECRET=whsec_...\n",[227,247,249],{"class":229,"line":248},4,[227,250,251],{},"STRIPE_PUBLISHABLE_KEY=pk_test_...\n",[130,253,255],{"id":254},"how-stripe-payment-flow-works","How Stripe Payment Flow Works",[135,257,258,268,277,288,294,303],{},[138,259,260,263,264,267],{},[152,261,262],{},"Frontend calls"," ",[157,265,266],{},"POST /payments/create-intent"," with amount and currency",[138,269,270,273,274],{},[152,271,272],{},"Server responds"," with ",[157,275,276],{},"clientSecret",[138,278,279,263,282,273,284,287],{},[152,280,281],{},"Frontend uses",[157,283,276],{},[157,285,286],{},"Stripe.js"," to confirm payment",[138,289,290,293],{},[152,291,292],{},"User completes"," payment form on Stripe's hosted page",[138,295,296,263,299,302],{},[152,297,298],{},"Stripe fires",[157,300,301],{},"payment_intent.succeeded"," webhook to your server",[138,304,305,308],{},[152,306,307],{},"Your server"," receives webhook and fulfills the order",[210,310,311,312,315,316,318],{},"The ",[157,313,314],{},"STRIPE_PUBLISHABLE_KEY"," is safe to expose in frontend code. It's never used server-side. Include it in ",[157,317,215],{}," for reference, but the server only reads the secret key.",[320,321],"hr",{},[125,323,325],{"id":324},"lemonsqueezy-configuration","LemonSqueezy Configuration",[130,327,133],{"id":328},"get-your-credentials-1",[135,330,331,343,368],{},[138,332,333,336,337,342],{},[152,334,335],{},"API Key:"," Go to ",[142,338,341],{"href":339,"rel":340},"https://app.lemonsqueezy.com/settings/api",[146],"app.lemonsqueezy.com/settings/api"," and generate an API key",[138,344,345,348,349,354,355],{},[152,346,347],{},"Store ID:"," Find your store ID in the URL. Go to ",[142,350,353],{"href":351,"rel":352},"https://app.lemonsqueezy.com/stores",[146],"app.lemonsqueezy.com/stores"," — it's the numeric ID in the URL\n",[356,357,358],"ul",{},[138,359,360,361,364,365],{},"Example: ",[157,362,363],{},"app.lemonsqueezy.com/stores/12345"," → Store ID is ",[157,366,367],{},"12345",[138,369,370,373],{},[152,371,372],{},"Webhook Secret:"," Create a webhook in your store settings and copy the signing secret",[130,375,105],{"id":376},"environment-variables-1",[210,378,212,379,216],{},[157,380,215],{},[218,382,384],{"className":220,"code":383,"language":222,"meta":223,"style":223},"PAYMENT_PROVIDER=lemonsqueezy\nLEMONSQUEEZY_API_KEY=your_api_key\nLEMONSQUEEZY_WEBHOOK_SECRET=your_webhook_secret\nLEMONSQUEEZY_STORE_ID=12345\n",[157,385,386,391,396,401],{"__ignoreMap":223},[227,387,388],{"class":229,"line":230},[227,389,390],{},"PAYMENT_PROVIDER=lemonsqueezy\n",[227,392,393],{"class":229,"line":236},[227,394,395],{},"LEMONSQUEEZY_API_KEY=your_api_key\n",[227,397,398],{"class":229,"line":242},[227,399,400],{},"LEMONSQUEEZY_WEBHOOK_SECRET=your_webhook_secret\n",[227,402,403],{"class":229,"line":248},[227,404,405],{},"LEMONSQUEEZY_STORE_ID=12345\n",[130,407,409],{"id":408},"the-variant-id-requirement","The Variant ID Requirement",[411,412,414,425,432,442,545],"callout",{"type":413},"info",[210,415,416,417,420,421,424],{},"LemonSqueezy uses ",[152,418,419],{},"product variants",", not raw amounts. You cannot charge an arbitrary amount like ",[157,422,423],{},"$29.99"," — you must have a product in your LemonSqueezy store first.",[210,426,427,428,431],{},"For variable-amount payments (custom invoices, tips, or metered billing), create a ",[152,429,430],{},"\"Pay What You Want\""," product in LemonSqueezy and use that variant's ID.",[210,433,434,435,437,438,441],{},"When calling ",[157,436,266],{},", pass ",[157,439,440],{},"variantId"," in the metadata:",[218,443,447],{"className":444,"code":445,"language":446,"meta":223,"style":223},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"amount\": 2999,\n  \"currency\": \"usd\",\n  \"metadata\": {\n    \"variantId\": \"78901\"\n  }\n}\n","json",[157,448,449,455,476,498,512,533,539],{"__ignoreMap":223},[227,450,451],{"class":229,"line":230},[227,452,454],{"class":453},"sMK4o","{\n",[227,456,457,460,464,467,469,473],{"class":229,"line":236},[227,458,459],{"class":453},"  \"",[227,461,463],{"class":462},"spNyl","amount",[227,465,466],{"class":453},"\"",[227,468,216],{"class":453},[227,470,472],{"class":471},"sbssI"," 2999",[227,474,475],{"class":453},",\n",[227,477,478,480,483,485,487,490,494,496],{"class":229,"line":242},[227,479,459],{"class":453},[227,481,482],{"class":462},"currency",[227,484,466],{"class":453},[227,486,216],{"class":453},[227,488,489],{"class":453}," \"",[227,491,493],{"class":492},"sfazB","usd",[227,495,466],{"class":453},[227,497,475],{"class":453},[227,499,500,502,505,507,509],{"class":229,"line":248},[227,501,459],{"class":453},[227,503,504],{"class":462},"metadata",[227,506,466],{"class":453},[227,508,216],{"class":453},[227,510,511],{"class":453}," {\n",[227,513,515,518,521,523,525,527,530],{"class":229,"line":514},5,[227,516,517],{"class":453},"    \"",[227,519,440],{"class":520},"sBMFI",[227,522,466],{"class":453},[227,524,216],{"class":453},[227,526,489],{"class":453},[227,528,529],{"class":492},"78901",[227,531,532],{"class":453},"\"\n",[227,534,536],{"class":229,"line":535},6,[227,537,538],{"class":453},"  }\n",[227,540,542],{"class":229,"line":541},7,[227,543,544],{"class":453},"}\n",[210,546,311,547,549],{},[157,548,440],{}," is required for LemonSqueezy. Stripe ignores it.",[130,551,553],{"id":552},"how-lemonsqueezy-payment-flow-works","How LemonSqueezy Payment Flow Works",[135,555,556,563,570,578,584,592],{},[138,557,558,263,560,562],{},[152,559,262],{},[157,561,266],{}," with variantId in metadata",[138,564,565,273,567],{},[152,566,272],{},[157,568,569],{},"checkoutUrl",[138,571,572,575,576],{},[152,573,574],{},"Frontend redirects"," user to ",[157,577,569],{},[138,579,580,583],{},[152,581,582],{},"User pays"," on LemonSqueezy's hosted checkout page",[138,585,586,263,589,302],{},[152,587,588],{},"LemonSqueezy fires",[157,590,591],{},"order_created",[138,593,594,308],{},[152,595,307],{},[210,597,598],{},"LemonSqueezy is a merchant of record — you don't see raw payment method data. LemonSqueezy handles the transaction and deposits funds to your account.",[320,600],{},[125,602,604],{"id":603},"switching-providers","Switching Providers",[210,606,607],{},"Changing providers is simple — no code changes needed.",[135,609,610,627,630],{},[138,611,612,613,616,617,619,620,623,624],{},"Update ",[157,614,615],{},"PAYMENT_PROVIDER"," in ",[157,618,215],{}," to ",[157,621,622],{},"stripe"," or ",[157,625,626],{},"lemonsqueezy",[138,628,629],{},"Add the required env vars for your new provider",[138,631,632],{},"Restart your server",[210,634,635,636,638],{},"The adapter is instantiated once on startup based on the ",[157,637,615],{}," value. That's it.",[320,640],{},[125,642,644],{"id":643},"test-vs-live-keys","Test vs Live Keys",[130,646,648],{"id":647},"development-test-keys","Development (Test Keys)",[210,650,651],{},"Use test keys while building:",[356,653,654,661],{},[138,655,656,202,659,167],{},[152,657,658],{},"Stripe test key",[157,660,159],{},[138,662,663,666],{},[152,664,665],{},"LemonSqueezy test mode"," (check the API key source)",[210,668,669,670,672],{},"Test keys never charge real payment methods. They're safe to keep in version control during development (though you should still use ",[157,671,215],{},").",[130,674,676],{"id":675},"production-live-keys","Production (Live Keys)",[210,678,679],{},"When you go live:",[356,681,682,688,691,697],{},[138,683,684,685,687],{},"Switch to live keys (",[157,686,166],{}," for Stripe)",[138,689,690],{},"Update webhooks to your production URL",[138,692,693,694,696],{},"Double-check ",[157,695,615],{}," is set correctly",[138,698,699],{},"Verify webhook secrets are production secrets, not test secrets",[320,701],{},[125,703,705],{"id":704},"what-comes-next","What Comes Next",[356,707,708,715,722],{},[138,709,710,714],{},[152,711,712],{},[142,713,95],{"href":96}," — Make payment requests",[138,716,717,721],{},[152,718,719],{},[142,720,105],{"href":106}," — Complete reference",[138,723,724,728],{},[152,725,726],{},[142,727,100],{"href":101}," — Handle payment events",[730,731,732],"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);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":223,"searchDepth":236,"depth":236,"links":734},[735,741,747,748,752],{"id":127,"depth":236,"text":128,"children":736},[737,738,739,740],{"id":132,"depth":242,"text":133},{"id":176,"depth":242,"text":177},{"id":208,"depth":242,"text":105},{"id":254,"depth":242,"text":255},{"id":324,"depth":236,"text":325,"children":742},[743,744,745,746],{"id":328,"depth":242,"text":133},{"id":376,"depth":242,"text":105},{"id":408,"depth":242,"text":409},{"id":552,"depth":242,"text":553},{"id":603,"depth":236,"text":604},{"id":643,"depth":236,"text":644,"children":749},[750,751],{"id":647,"depth":242,"text":648},{"id":675,"depth":242,"text":676},{"id":704,"depth":236,"text":705},"Configure your payment provider credentials for Stripe or LemonSqueezy.","md",null,{},{"icon":93},{"title":759,"description":760,"keywords":761},"Payment Provider Configuration","Get API keys and configure Stripe or LemonSqueezy for payment processing.",[762,763,764,765,766],"stripe configuration","lemonsqueezy configuration","api keys","webhook secrets","payment provider setup","-GoJ2CLWYjrFSLO8kHJPqd8pDKoq2jb5o77Bf5kH4ms",[769,771],{"title":85,"path":86,"stem":87,"description":770,"icon":88,"children":-1},"Get the payments module running in your project with either the Charcole CLI or manual setup.",{"title":95,"path":96,"stem":97,"description":772,"icon":98,"children":-1},"Complete reference for all 4 payment endpoints with request and response examples.",1777986766030]