[{"data":1,"prerenderedAt":1482},["ShallowReactive",2],{"navigation_docs":3,"-guides-payments-endpoints":119,"-guides-payments-endpoints-surround":1477},[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":95,"body":121,"description":1461,"extension":1462,"links":1463,"meta":1464,"navigation":1465,"path":96,"seo":1466,"stem":97,"__hash__":1476},"docs/2. guides/6. payments/4. endpoints.md",{"type":122,"value":123,"toc":1433},"minimark",[124,129,142,149,154,288,293,341,345,480,490,494,622,628,631,635,638,642,645,690,694,706,710,801,803,807,810,814,817,832,835,838,946,952,1011,1013,1017,1022,1027,1034,1038,1049,1053,1058,1078,1083,1101,1104,1109,1136,1141,1145,1148,1151,1153,1157,1161,1244,1248,1316,1320,1349,1353,1406,1408,1412,1429],[125,126,128],"h2",{"id":127},"post-paymentscreate-intent","POST /payments/create-intent",[130,131,132,133,137,138,141],"p",{},"Create a payment intent. This endpoint returns either a ",[134,135,136],"code",{},"clientSecret"," (Stripe) or ",[134,139,140],{},"checkoutUrl"," (LemonSqueezy) for the frontend to proceed with payment.",[130,143,144,148],{},[145,146,147],"strong",{},"Authentication:"," JWT required (Bearer token)",[150,151,153],"h3",{"id":152},"request","Request",[155,156,161],"pre",{"className":157,"code":158,"language":159,"meta":160,"style":160},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"amount\": 2999,\n  \"currency\": \"usd\",\n  \"metadata\": {\n    \"orderId\": \"order_123\",\n    \"variantId\": \"78901\"\n  }\n}\n","json","",[134,162,163,172,195,218,233,256,276,282],{"__ignoreMap":160},[164,165,168],"span",{"class":166,"line":167},"line",1,[164,169,171],{"class":170},"sMK4o","{\n",[164,173,175,178,182,185,188,192],{"class":166,"line":174},2,[164,176,177],{"class":170},"  \"",[164,179,181],{"class":180},"spNyl","amount",[164,183,184],{"class":170},"\"",[164,186,187],{"class":170},":",[164,189,191],{"class":190},"sbssI"," 2999",[164,193,194],{"class":170},",\n",[164,196,198,200,203,205,207,210,214,216],{"class":166,"line":197},3,[164,199,177],{"class":170},[164,201,202],{"class":180},"currency",[164,204,184],{"class":170},[164,206,187],{"class":170},[164,208,209],{"class":170}," \"",[164,211,213],{"class":212},"sfazB","usd",[164,215,184],{"class":170},[164,217,194],{"class":170},[164,219,221,223,226,228,230],{"class":166,"line":220},4,[164,222,177],{"class":170},[164,224,225],{"class":180},"metadata",[164,227,184],{"class":170},[164,229,187],{"class":170},[164,231,232],{"class":170}," {\n",[164,234,236,239,243,245,247,249,252,254],{"class":166,"line":235},5,[164,237,238],{"class":170},"    \"",[164,240,242],{"class":241},"sBMFI","orderId",[164,244,184],{"class":170},[164,246,187],{"class":170},[164,248,209],{"class":170},[164,250,251],{"class":212},"order_123",[164,253,184],{"class":170},[164,255,194],{"class":170},[164,257,259,261,264,266,268,270,273],{"class":166,"line":258},6,[164,260,238],{"class":170},[164,262,263],{"class":241},"variantId",[164,265,184],{"class":170},[164,267,187],{"class":170},[164,269,209],{"class":170},[164,271,272],{"class":212},"78901",[164,274,275],{"class":170},"\"\n",[164,277,279],{"class":166,"line":278},7,[164,280,281],{"class":170},"  }\n",[164,283,285],{"class":166,"line":284},8,[164,286,287],{"class":170},"}\n",[130,289,290],{},[145,291,292],{},"Fields:",[294,295,296,306,320],"ul",{},[297,298,299,301,302,305],"li",{},[134,300,181],{}," (number, required) — Amount in the smallest currency unit (cents for USD, paisas for PKR). Example: ",[134,303,304],{},"2999"," = $29.99",[297,307,308,310,311,313,314,313,317],{},[134,309,202],{}," (string, required) — ISO 4217 currency code, 3 letters, case-insensitive. Examples: ",[134,312,213],{},", ",[134,315,316],{},"pkr",[134,318,319],{},"gbp",[297,321,322,324,325],{},[134,323,225],{}," (object, optional) — Custom data to attach to the payment\n",[294,326,327,332],{},[297,328,329,331],{},[134,330,242],{}," — Your internal order ID (optional but recommended)",[297,333,334,336,337,340],{},[134,335,263],{}," (string) — ",[145,338,339],{},"LemonSqueezy only"," — Required for LemonSqueezy, ignored by Stripe. The product variant ID in your LemonSqueezy store.",[150,342,344],{"id":343},"response-stripe","Response (Stripe)",[155,346,348],{"className":157,"code":347,"language":159,"meta":160,"style":160},"{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"pi_3abc...\",\n    \"clientSecret\": \"pi_3abc..._secret_xyz\",\n    \"status\": \"requires_payment_method\",\n    \"amount\": 2999,\n    \"currency\": \"usd\"\n  }\n}\n",[134,349,350,354,368,381,401,420,440,454,470,475],{"__ignoreMap":160},[164,351,352],{"class":166,"line":167},[164,353,171],{"class":170},[164,355,356,358,361,363,365],{"class":166,"line":174},[164,357,177],{"class":170},[164,359,360],{"class":180},"success",[164,362,184],{"class":170},[164,364,187],{"class":170},[164,366,367],{"class":170}," true,\n",[164,369,370,372,375,377,379],{"class":166,"line":197},[164,371,177],{"class":170},[164,373,374],{"class":180},"data",[164,376,184],{"class":170},[164,378,187],{"class":170},[164,380,232],{"class":170},[164,382,383,385,388,390,392,394,397,399],{"class":166,"line":220},[164,384,238],{"class":170},[164,386,387],{"class":241},"id",[164,389,184],{"class":170},[164,391,187],{"class":170},[164,393,209],{"class":170},[164,395,396],{"class":212},"pi_3abc...",[164,398,184],{"class":170},[164,400,194],{"class":170},[164,402,403,405,407,409,411,413,416,418],{"class":166,"line":235},[164,404,238],{"class":170},[164,406,136],{"class":241},[164,408,184],{"class":170},[164,410,187],{"class":170},[164,412,209],{"class":170},[164,414,415],{"class":212},"pi_3abc..._secret_xyz",[164,417,184],{"class":170},[164,419,194],{"class":170},[164,421,422,424,427,429,431,433,436,438],{"class":166,"line":258},[164,423,238],{"class":170},[164,425,426],{"class":241},"status",[164,428,184],{"class":170},[164,430,187],{"class":170},[164,432,209],{"class":170},[164,434,435],{"class":212},"requires_payment_method",[164,437,184],{"class":170},[164,439,194],{"class":170},[164,441,442,444,446,448,450,452],{"class":166,"line":278},[164,443,238],{"class":170},[164,445,181],{"class":241},[164,447,184],{"class":170},[164,449,187],{"class":170},[164,451,191],{"class":190},[164,453,194],{"class":170},[164,455,456,458,460,462,464,466,468],{"class":166,"line":284},[164,457,238],{"class":170},[164,459,202],{"class":241},[164,461,184],{"class":170},[164,463,187],{"class":170},[164,465,209],{"class":170},[164,467,213],{"class":212},[164,469,275],{"class":170},[164,471,473],{"class":166,"line":472},9,[164,474,281],{"class":170},[164,476,478],{"class":166,"line":477},10,[164,479,287],{"class":170},[130,481,482,483,485,486,489],{},"Pass ",[134,484,136],{}," to ",[134,487,488],{},"Stripe.js"," on the frontend to confirm the payment.",[150,491,493],{"id":492},"response-lemonsqueezy","Response (LemonSqueezy)",[155,495,497],{"className":157,"code":496,"language":159,"meta":160,"style":160},"{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"abc123\",\n    \"checkoutUrl\": \"https://store.lemonsqueezy.com/checkout/buy/...\",\n    \"status\": \"created\",\n    \"amount\": 2999,\n    \"currency\": \"usd\"\n  }\n}\n",[134,498,499,503,515,527,546,565,584,598,614,618],{"__ignoreMap":160},[164,500,501],{"class":166,"line":167},[164,502,171],{"class":170},[164,504,505,507,509,511,513],{"class":166,"line":174},[164,506,177],{"class":170},[164,508,360],{"class":180},[164,510,184],{"class":170},[164,512,187],{"class":170},[164,514,367],{"class":170},[164,516,517,519,521,523,525],{"class":166,"line":197},[164,518,177],{"class":170},[164,520,374],{"class":180},[164,522,184],{"class":170},[164,524,187],{"class":170},[164,526,232],{"class":170},[164,528,529,531,533,535,537,539,542,544],{"class":166,"line":220},[164,530,238],{"class":170},[164,532,387],{"class":241},[164,534,184],{"class":170},[164,536,187],{"class":170},[164,538,209],{"class":170},[164,540,541],{"class":212},"abc123",[164,543,184],{"class":170},[164,545,194],{"class":170},[164,547,548,550,552,554,556,558,561,563],{"class":166,"line":235},[164,549,238],{"class":170},[164,551,140],{"class":241},[164,553,184],{"class":170},[164,555,187],{"class":170},[164,557,209],{"class":170},[164,559,560],{"class":212},"https://store.lemonsqueezy.com/checkout/buy/...",[164,562,184],{"class":170},[164,564,194],{"class":170},[164,566,567,569,571,573,575,577,580,582],{"class":166,"line":258},[164,568,238],{"class":170},[164,570,426],{"class":241},[164,572,184],{"class":170},[164,574,187],{"class":170},[164,576,209],{"class":170},[164,578,579],{"class":212},"created",[164,581,184],{"class":170},[164,583,194],{"class":170},[164,585,586,588,590,592,594,596],{"class":166,"line":278},[164,587,238],{"class":170},[164,589,181],{"class":241},[164,591,184],{"class":170},[164,593,187],{"class":170},[164,595,191],{"class":190},[164,597,194],{"class":170},[164,599,600,602,604,606,608,610,612],{"class":166,"line":284},[164,601,238],{"class":170},[164,603,202],{"class":241},[164,605,184],{"class":170},[164,607,187],{"class":170},[164,609,209],{"class":170},[164,611,213],{"class":212},[164,613,275],{"class":170},[164,615,616],{"class":166,"line":472},[164,617,281],{"class":170},[164,619,620],{"class":166,"line":477},[164,621,287],{"class":170},[130,623,624,625,627],{},"Redirect the user to ",[134,626,140],{}," to complete checkout on LemonSqueezy's hosted page.",[629,630],"hr",{},[125,632,634],{"id":633},"post-paymentsrefund","POST /payments/refund",[130,636,637],{},"Refund a payment, either fully or partially.",[130,639,640,148],{},[145,641,147],{},[150,643,153],{"id":644},"request-1",[155,646,648],{"className":157,"code":647,"language":159,"meta":160,"style":160},"{\n  \"paymentId\": \"pi_3abc...\",\n  \"amount\": 1000\n}\n",[134,649,650,654,673,686],{"__ignoreMap":160},[164,651,652],{"class":166,"line":167},[164,653,171],{"class":170},[164,655,656,658,661,663,665,667,669,671],{"class":166,"line":174},[164,657,177],{"class":170},[164,659,660],{"class":180},"paymentId",[164,662,184],{"class":170},[164,664,187],{"class":170},[164,666,209],{"class":170},[164,668,396],{"class":212},[164,670,184],{"class":170},[164,672,194],{"class":170},[164,674,675,677,679,681,683],{"class":166,"line":197},[164,676,177],{"class":170},[164,678,181],{"class":180},[164,680,184],{"class":170},[164,682,187],{"class":170},[164,684,685],{"class":190}," 1000\n",[164,687,688],{"class":166,"line":220},[164,689,287],{"class":170},[130,691,692],{},[145,693,292],{},[294,695,696,701],{},[297,697,698,700],{},[134,699,660],{}," (string, required) — The payment ID to refund",[297,702,703,705],{},[134,704,181],{}," (number, optional) — Refund amount in smallest currency unit. Omit for full refund.",[150,707,709],{"id":708},"response","Response",[155,711,713],{"className":157,"code":712,"language":159,"meta":160,"style":160},"{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"re_456...\",\n    \"status\": \"succeeded\",\n    \"amount\": 1000\n  }\n}\n",[134,714,715,719,731,743,762,781,793,797],{"__ignoreMap":160},[164,716,717],{"class":166,"line":167},[164,718,171],{"class":170},[164,720,721,723,725,727,729],{"class":166,"line":174},[164,722,177],{"class":170},[164,724,360],{"class":180},[164,726,184],{"class":170},[164,728,187],{"class":170},[164,730,367],{"class":170},[164,732,733,735,737,739,741],{"class":166,"line":197},[164,734,177],{"class":170},[164,736,374],{"class":180},[164,738,184],{"class":170},[164,740,187],{"class":170},[164,742,232],{"class":170},[164,744,745,747,749,751,753,755,758,760],{"class":166,"line":220},[164,746,238],{"class":170},[164,748,387],{"class":241},[164,750,184],{"class":170},[164,752,187],{"class":170},[164,754,209],{"class":170},[164,756,757],{"class":212},"re_456...",[164,759,184],{"class":170},[164,761,194],{"class":170},[164,763,764,766,768,770,772,774,777,779],{"class":166,"line":235},[164,765,238],{"class":170},[164,767,426],{"class":241},[164,769,184],{"class":170},[164,771,187],{"class":170},[164,773,209],{"class":170},[164,775,776],{"class":212},"succeeded",[164,778,184],{"class":170},[164,780,194],{"class":170},[164,782,783,785,787,789,791],{"class":166,"line":258},[164,784,238],{"class":170},[164,786,181],{"class":241},[164,788,184],{"class":170},[164,790,187],{"class":170},[164,792,685],{"class":190},[164,794,795],{"class":166,"line":278},[164,796,281],{"class":170},[164,798,799],{"class":166,"line":284},[164,800,287],{"class":170},[629,802],{},[125,804,806],{"id":805},"get-paymentsstatuspaymentid","GET /payments/status/:paymentId",[130,808,809],{},"Check the current status of a payment.",[130,811,812,148],{},[145,813,147],{},[150,815,153],{"id":816},"request-2",[155,818,822],{"className":819,"code":820,"language":821,"meta":160,"style":160},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","GET /payments/status/pi_3abc...\n","bash",[134,823,824],{"__ignoreMap":160},[164,825,826,829],{"class":166,"line":167},[164,827,828],{"class":241},"GET",[164,830,831],{"class":212}," /payments/status/pi_3abc...\n",[130,833,834],{},"No request body.",[150,836,709],{"id":837},"response-1",[155,839,841],{"className":157,"code":840,"language":159,"meta":160,"style":160},"{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"pi_3abc...\",\n    \"status\": \"paid\",\n    \"amount\": 2999,\n    \"currency\": \"usd\"\n  }\n}\n",[134,842,843,847,859,871,889,908,922,938,942],{"__ignoreMap":160},[164,844,845],{"class":166,"line":167},[164,846,171],{"class":170},[164,848,849,851,853,855,857],{"class":166,"line":174},[164,850,177],{"class":170},[164,852,360],{"class":180},[164,854,184],{"class":170},[164,856,187],{"class":170},[164,858,367],{"class":170},[164,860,861,863,865,867,869],{"class":166,"line":197},[164,862,177],{"class":170},[164,864,374],{"class":180},[164,866,184],{"class":170},[164,868,187],{"class":170},[164,870,232],{"class":170},[164,872,873,875,877,879,881,883,885,887],{"class":166,"line":220},[164,874,238],{"class":170},[164,876,387],{"class":241},[164,878,184],{"class":170},[164,880,187],{"class":170},[164,882,209],{"class":170},[164,884,396],{"class":212},[164,886,184],{"class":170},[164,888,194],{"class":170},[164,890,891,893,895,897,899,901,904,906],{"class":166,"line":235},[164,892,238],{"class":170},[164,894,426],{"class":241},[164,896,184],{"class":170},[164,898,187],{"class":170},[164,900,209],{"class":170},[164,902,903],{"class":212},"paid",[164,905,184],{"class":170},[164,907,194],{"class":170},[164,909,910,912,914,916,918,920],{"class":166,"line":258},[164,911,238],{"class":170},[164,913,181],{"class":241},[164,915,184],{"class":170},[164,917,187],{"class":170},[164,919,191],{"class":190},[164,921,194],{"class":170},[164,923,924,926,928,930,932,934,936],{"class":166,"line":278},[164,925,238],{"class":170},[164,927,202],{"class":241},[164,929,184],{"class":170},[164,931,187],{"class":170},[164,933,209],{"class":170},[164,935,213],{"class":212},[164,937,275],{"class":170},[164,939,940],{"class":166,"line":284},[164,941,281],{"class":170},[164,943,944],{"class":166,"line":472},[164,945,287],{"class":170},[130,947,948,951],{},[145,949,950],{},"Status values"," (normalized across both providers):",[953,954,955,968],"table",{},[956,957,958],"thead",{},[959,960,961,965],"tr",{},[962,963,964],"th",{},"Status",[962,966,967],{},"Meaning",[969,970,971,982,991,1001],"tbody",{},[959,972,973,979],{},[974,975,976],"td",{},[134,977,978],{},"pending",[974,980,981],{},"Payment created but not yet confirmed",[959,983,984,988],{},[974,985,986],{},[134,987,903],{},[974,989,990],{},"Payment successfully charged",[959,992,993,998],{},[974,994,995],{},[134,996,997],{},"failed",[974,999,1000],{},"Payment failed or was cancelled",[959,1002,1003,1008],{},[974,1004,1005],{},[134,1006,1007],{},"refunded",[974,1009,1010],{},"Payment was refunded",[629,1012],{},[125,1014,1016],{"id":1015},"post-paymentswebhook","POST /payments/webhook",[130,1018,1019],{},[145,1020,1021],{},"Receive and process payment events from Stripe or LemonSqueezy.",[130,1023,1024,1026],{},[145,1025,147],{}," None — authenticated by provider signature (Stripe-Signature or X-Signature header)",[130,1028,1029,1030,1033],{},"This endpoint is called by your payment provider, not your frontend. Always return ",[134,1031,1032],{},"200 OK"," to acknowledge receipt.",[150,1035,1037],{"id":1036},"signature-verification","Signature Verification",[130,1039,1040,1041,1044,1045,1048],{},"The module automatically verifies webhook signatures using ",[134,1042,1043],{},"STRIPE_WEBHOOK_SECRET"," or ",[134,1046,1047],{},"LEMONSQUEEZY_WEBHOOK_SECRET",". Unsigned or tampered webhooks are rejected.",[150,1050,1052],{"id":1051},"events","Events",[130,1054,1055],{},[145,1056,1057],{},"Stripe Events:",[294,1059,1060,1066,1072],{},[297,1061,1062,1065],{},[134,1063,1064],{},"payment_intent.succeeded"," — Payment confirmed, fulfill order",[297,1067,1068,1071],{},[134,1069,1070],{},"payment_intent.payment_failed"," — Payment failed",[297,1073,1074,1077],{},[134,1075,1076],{},"charge.refunded"," — Refund processed",[130,1079,1080],{},[145,1081,1082],{},"LemonSqueezy Events:",[294,1084,1085,1090,1095],{},[297,1086,1087,1065],{},[134,1088,1089],{},"order_created",[297,1091,1092,1077],{},[134,1093,1094],{},"order_refunded",[297,1096,1097,1100],{},[134,1098,1099],{},"subscription_cancelled"," — Subscription ended",[150,1102,709],{"id":1103},"response-2",[130,1105,1106,1107,187],{},"Always return ",[134,1108,1032],{},[155,1110,1112],{"className":157,"code":1111,"language":159,"meta":160,"style":160},"{\n  \"received\": true\n}\n",[134,1113,1114,1118,1132],{"__ignoreMap":160},[164,1115,1116],{"class":166,"line":167},[164,1117,171],{"class":170},[164,1119,1120,1122,1125,1127,1129],{"class":166,"line":174},[164,1121,177],{"class":170},[164,1123,1124],{"class":180},"received",[164,1126,184],{"class":170},[164,1128,187],{"class":170},[164,1130,1131],{"class":170}," true\n",[164,1133,1134],{"class":166,"line":197},[164,1135,287],{"class":170},[1137,1138,1140],"callout",{"type":1139},"warning","Never return 4xx from a webhook unless signature verification fails. If you return 4xx, payment providers will retry the webhook and create a retry storm. If your fulfillment logic fails, log the error, return 200, and handle the retry manually.",[150,1142,1144],{"id":1143},"webhook-reliability","Webhook Reliability",[130,1146,1147],{},"Never rely on frontend callbacks alone. Users close tabs, lose internet, and refresh pages. The only reliable confirmation is the webhook.",[130,1149,1150],{},"Always fulfill orders based on webhook events, not on frontend callbacks. Your server's controller handles deduplication automatically — if the same event arrives twice, it processes only once.",[629,1152],{},[125,1154,1156],{"id":1155},"example-usage","Example Usage",[150,1158,1160],{"id":1159},"create-a-stripe-payment","Create a Stripe Payment",[155,1162,1164],{"className":819,"code":1163,"language":821,"meta":160,"style":160},"curl -X POST http://localhost:3000/payments/create-intent \\\n  -H \"Authorization: Bearer your-jwt-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"amount\": 2999,\n    \"currency\": \"usd\",\n    \"metadata\": {\"orderId\": \"order_123\"}\n  }'\n",[134,1165,1166,1184,1198,1211,1221,1226,1231,1236],{"__ignoreMap":160},[164,1167,1168,1171,1174,1177,1180],{"class":166,"line":167},[164,1169,1170],{"class":241},"curl",[164,1172,1173],{"class":212}," -X",[164,1175,1176],{"class":212}," POST",[164,1178,1179],{"class":212}," http://localhost:3000/payments/create-intent",[164,1181,1183],{"class":1182},"sTEyZ"," \\\n",[164,1185,1186,1189,1191,1194,1196],{"class":166,"line":174},[164,1187,1188],{"class":212},"  -H",[164,1190,209],{"class":170},[164,1192,1193],{"class":212},"Authorization: Bearer your-jwt-token",[164,1195,184],{"class":170},[164,1197,1183],{"class":1182},[164,1199,1200,1202,1204,1207,1209],{"class":166,"line":197},[164,1201,1188],{"class":212},[164,1203,209],{"class":170},[164,1205,1206],{"class":212},"Content-Type: application/json",[164,1208,184],{"class":170},[164,1210,1183],{"class":1182},[164,1212,1213,1216,1219],{"class":166,"line":220},[164,1214,1215],{"class":212},"  -d",[164,1217,1218],{"class":170}," '",[164,1220,171],{"class":212},[164,1222,1223],{"class":166,"line":235},[164,1224,1225],{"class":212},"    \"amount\": 2999,\n",[164,1227,1228],{"class":166,"line":258},[164,1229,1230],{"class":212},"    \"currency\": \"usd\",\n",[164,1232,1233],{"class":166,"line":278},[164,1234,1235],{"class":212},"    \"metadata\": {\"orderId\": \"order_123\"}\n",[164,1237,1238,1241],{"class":166,"line":284},[164,1239,1240],{"class":212},"  }",[164,1242,1243],{"class":170},"'\n",[150,1245,1247],{"id":1246},"create-a-lemonsqueezy-payment","Create a LemonSqueezy Payment",[155,1249,1251],{"className":819,"code":1250,"language":821,"meta":160,"style":160},"curl -X POST http://localhost:3000/payments/create-intent \\\n  -H \"Authorization: Bearer your-jwt-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"amount\": 2999,\n    \"currency\": \"usd\",\n    \"metadata\": {\"variantId\": \"78901\", \"orderId\": \"order_456\"}\n  }'\n",[134,1252,1253,1265,1277,1289,1297,1301,1305,1310],{"__ignoreMap":160},[164,1254,1255,1257,1259,1261,1263],{"class":166,"line":167},[164,1256,1170],{"class":241},[164,1258,1173],{"class":212},[164,1260,1176],{"class":212},[164,1262,1179],{"class":212},[164,1264,1183],{"class":1182},[164,1266,1267,1269,1271,1273,1275],{"class":166,"line":174},[164,1268,1188],{"class":212},[164,1270,209],{"class":170},[164,1272,1193],{"class":212},[164,1274,184],{"class":170},[164,1276,1183],{"class":1182},[164,1278,1279,1281,1283,1285,1287],{"class":166,"line":197},[164,1280,1188],{"class":212},[164,1282,209],{"class":170},[164,1284,1206],{"class":212},[164,1286,184],{"class":170},[164,1288,1183],{"class":1182},[164,1290,1291,1293,1295],{"class":166,"line":220},[164,1292,1215],{"class":212},[164,1294,1218],{"class":170},[164,1296,171],{"class":212},[164,1298,1299],{"class":166,"line":235},[164,1300,1225],{"class":212},[164,1302,1303],{"class":166,"line":258},[164,1304,1230],{"class":212},[164,1306,1307],{"class":166,"line":278},[164,1308,1309],{"class":212},"    \"metadata\": {\"variantId\": \"78901\", \"orderId\": \"order_456\"}\n",[164,1311,1312,1314],{"class":166,"line":284},[164,1313,1240],{"class":212},[164,1315,1243],{"class":170},[150,1317,1319],{"id":1318},"check-payment-status","Check Payment Status",[155,1321,1323],{"className":819,"code":1322,"language":821,"meta":160,"style":160},"curl -X GET http://localhost:3000/payments/status/pi_3abc... \\\n  -H \"Authorization: Bearer your-jwt-token\"\n",[134,1324,1325,1339],{"__ignoreMap":160},[164,1326,1327,1329,1331,1334,1337],{"class":166,"line":167},[164,1328,1170],{"class":241},[164,1330,1173],{"class":212},[164,1332,1333],{"class":212}," GET",[164,1335,1336],{"class":212}," http://localhost:3000/payments/status/pi_3abc...",[164,1338,1183],{"class":1182},[164,1340,1341,1343,1345,1347],{"class":166,"line":174},[164,1342,1188],{"class":212},[164,1344,209],{"class":170},[164,1346,1193],{"class":212},[164,1348,275],{"class":170},[150,1350,1352],{"id":1351},"refund-a-payment","Refund a Payment",[155,1354,1356],{"className":819,"code":1355,"language":821,"meta":160,"style":160},"curl -X POST http://localhost:3000/payments/refund \\\n  -H \"Authorization: Bearer your-jwt-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"paymentId\": \"pi_3abc...\"}'\n",[134,1357,1358,1371,1383,1395],{"__ignoreMap":160},[164,1359,1360,1362,1364,1366,1369],{"class":166,"line":167},[164,1361,1170],{"class":241},[164,1363,1173],{"class":212},[164,1365,1176],{"class":212},[164,1367,1368],{"class":212}," http://localhost:3000/payments/refund",[164,1370,1183],{"class":1182},[164,1372,1373,1375,1377,1379,1381],{"class":166,"line":174},[164,1374,1188],{"class":212},[164,1376,209],{"class":170},[164,1378,1193],{"class":212},[164,1380,184],{"class":170},[164,1382,1183],{"class":1182},[164,1384,1385,1387,1389,1391,1393],{"class":166,"line":197},[164,1386,1188],{"class":212},[164,1388,209],{"class":170},[164,1390,1206],{"class":212},[164,1392,184],{"class":170},[164,1394,1183],{"class":1182},[164,1396,1397,1399,1401,1404],{"class":166,"line":220},[164,1398,1215],{"class":212},[164,1400,1218],{"class":170},[164,1402,1403],{"class":212},"{\"paymentId\": \"pi_3abc...\"}",[164,1405,1243],{"class":170},[629,1407],{},[125,1409,1411],{"id":1410},"what-comes-next","What Comes Next",[294,1413,1414,1422],{},[297,1415,1416,1421],{},[145,1417,1418],{},[1419,1420,100],"a",{"href":101}," — Handle payment confirmations and events",[297,1423,1424,1428],{},[145,1425,1426],{},[1419,1427,115],{"href":116}," — Copy-paste examples for common scenarios",[1430,1431,1432],"style",{},"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}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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":160,"searchDepth":174,"depth":174,"links":1434},[1435,1440,1444,1448,1454,1460],{"id":127,"depth":174,"text":128,"children":1436},[1437,1438,1439],{"id":152,"depth":197,"text":153},{"id":343,"depth":197,"text":344},{"id":492,"depth":197,"text":493},{"id":633,"depth":174,"text":634,"children":1441},[1442,1443],{"id":644,"depth":197,"text":153},{"id":708,"depth":197,"text":709},{"id":805,"depth":174,"text":806,"children":1445},[1446,1447],{"id":816,"depth":197,"text":153},{"id":837,"depth":197,"text":709},{"id":1015,"depth":174,"text":1016,"children":1449},[1450,1451,1452,1453],{"id":1036,"depth":197,"text":1037},{"id":1051,"depth":197,"text":1052},{"id":1103,"depth":197,"text":709},{"id":1143,"depth":197,"text":1144},{"id":1155,"depth":174,"text":1156,"children":1455},[1456,1457,1458,1459],{"id":1159,"depth":197,"text":1160},{"id":1246,"depth":197,"text":1247},{"id":1318,"depth":197,"text":1319},{"id":1351,"depth":197,"text":1352},{"id":1410,"depth":174,"text":1411},"Complete reference for all 4 payment endpoints with request and response examples.","md",null,{},{"icon":98},{"title":1467,"description":1468,"keywords":1469},"Payment API Endpoints","Reference guide for Charcole payment endpoints with Stripe and LemonSqueezy examples.",[1470,1471,1472,1473,1474,1475],"api endpoints","payment endpoints","create payment","refund payment","payment status","webhook endpoint","qgzEdH2ODEHap04lpyAGnTkuxDe4ee-ddKXmht23Dt4",[1478,1480],{"title":90,"path":91,"stem":92,"description":1479,"icon":93,"children":-1},"Configure your payment provider credentials for Stripe or LemonSqueezy.",{"title":100,"path":101,"stem":102,"description":1481,"icon":103,"children":-1},"Handle payment events reliably with webhook processing, deduplication, and testing.",1777986766079]