[{"data":1,"prerenderedAt":1138},["ShallowReactive",2],{"navigation_docs":3,"-guides-analytics":132,"-guides-analytics-surround":1133},[4,30,47,128],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,13,17,21,25],{"title":10,"path":11,"stem":12},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":14,"path":15,"stem":16},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart",{"title":18,"path":19,"stem":20},"Authentication","\u002Fgetting-started\u002Fauthentication","1.getting-started\u002F3.authentication",{"title":22,"path":23,"stem":24},"Self-Hosting","\u002Fgetting-started\u002Fself-hosting","1.getting-started\u002F4.self-hosting",{"title":26,"path":27,"stem":28},"Build an Integration","\u002Fgetting-started\u002Fbuild-an-integration","1.getting-started\u002F5.build-an-integration",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Sdks","\u002Fsdks","2.sdks",[35,39,43],{"title":36,"path":37,"stem":38},"TypeScript SDK","\u002Fsdks\u002Ftypescript","2.sdks\u002F1.typescript",{"title":40,"path":41,"stem":42},"Python SDK","\u002Fsdks\u002Fpython","2.sdks\u002F2.python",{"title":44,"path":45,"stem":46},"PHP SDK","\u002Fsdks\u002Fphp","2.sdks\u002F3.php",{"title":48,"path":49,"stem":50,"children":51,"page":29},"Guides","\u002Fguides","3.guides",[52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124],{"title":53,"path":54,"stem":55},"Customers","\u002Fguides\u002Fcustomers","3.guides\u002F1.customers",{"title":57,"path":58,"stem":59},"Usage-Based Billing","\u002Fguides\u002Fusage-billing","3.guides\u002F10.usage-billing",{"title":61,"path":62,"stem":63},"Wallets","\u002Fguides\u002Fwallets","3.guides\u002F11.wallets",{"title":65,"path":66,"stem":67},"Coupons, Add-ons and Credit Notes","\u002Fguides\u002Fcoupons-add-ons-credit-notes","3.guides\u002F12.coupons-add-ons-credit-notes",{"title":69,"path":70,"stem":71},"Taxes","\u002Fguides\u002Ftaxes","3.guides\u002F13.taxes",{"title":73,"path":74,"stem":75},"Customer Portal","\u002Fguides\u002Fcustomer-portal","3.guides\u002F14.customer-portal",{"title":77,"path":78,"stem":79},"Ledger","\u002Fguides\u002Fledger","3.guides\u002F15.ledger",{"title":81,"path":82,"stem":83},"Plan Limits and Access","\u002Fguides\u002Fplan-limits-and-access","3.guides\u002F16.plan-limits-and-access",{"title":85,"path":86,"stem":87},"Currencies and Exchange Rates","\u002Fguides\u002Fcurrencies","3.guides\u002F17.currencies",{"title":89,"path":90,"stem":91},"Charge a Customer","\u002Fguides\u002Fcharge-a-customer","3.guides\u002F18.charge-a-customer",{"title":93,"path":94,"stem":95},"One-time Products & Partial Payments","\u002Fguides\u002Fone-time-products-and-partial-payments","3.guides\u002F19.one-time-products-and-partial-payments",{"title":97,"path":98,"stem":99},"Plans & Pricing","\u002Fguides\u002Fplans-and-pricing","3.guides\u002F2.plans-and-pricing",{"title":101,"path":102,"stem":103},"Subscriptions","\u002Fguides\u002Fsubscriptions","3.guides\u002F3.subscriptions",{"title":105,"path":106,"stem":107},"Invoices & Payments","\u002Fguides\u002Finvoices-and-payments","3.guides\u002F4.invoices-and-payments",{"title":109,"path":110,"stem":111},"Payment Providers","\u002Fguides\u002Fpayment-providers","3.guides\u002F5.payment-providers",{"title":113,"path":114,"stem":115},"Analytics","\u002Fguides\u002Fanalytics","3.guides\u002F6.analytics",{"title":117,"path":118,"stem":119},"Webhooks","\u002Fguides\u002Fwebhooks","3.guides\u002F7.webhooks",{"title":121,"path":122,"stem":123},"Sandbox","\u002Fguides\u002Fsandbox","3.guides\u002F8.sandbox",{"title":125,"path":126,"stem":127},"Money Movement","\u002Fguides\u002Fmoney-movement","3.guides\u002F9.money-movement",{"title":129,"path":130,"stem":131},"API Reference","\u002Fapi-reference","4.api-reference",{"id":133,"title":113,"body":134,"description":1127,"extension":1128,"links":1129,"meta":1130,"navigation":292,"path":114,"seo":1131,"stem":115,"__hash__":1132},"docs\u002F3.guides\u002F6.analytics.md",{"type":135,"value":136,"toc":1120},"minimark",[137,141,146,153,181,190,193,197,573,577,778,782,934,938,1116],[138,139,140],"p",{},"PimaBill provides built-in analytics endpoints to track revenue, subscriptions, customers, and payment performance.",[142,143,145],"h2",{"id":144},"in-the-dashboard","In the dashboard",[138,147,148,152],{},[149,150,151],"strong",{},"Overview"," is the first page you see:",[154,155,156,163,169,175],"ul",{},[157,158,159,162],"li",{},[149,160,161],{},"Get set up:"," the steps left before you can bill, such as taking payments (your own provider, or managed payments on the cloud), a plan, a customer, an API key and a webhook address. It disappears once every step is done.",[157,164,165,168],{},[149,166,167],{},"Your numbers:"," monthly recurring revenue, active subscriptions, customers and payment success rate.",[157,170,171,174],{},[149,172,173],{},"Payments:"," the status of managed payments and your own providers.",[157,176,177,180],{},[149,178,179],{},"Plan usage:"," on the cloud, how much of your plan you are using.",[138,182,183,185,186,189],{},[149,184,113],{}," has four tabs: Revenue, Subscriptions, Customers and Payments. Amounts there are in US dollars, converted from each currency you bill in. ",[149,187,188],{},"Export CSV"," downloads the last six months of revenue.",[138,191,192],{},"The endpoints below return the same figures for your own reports.",[142,194,196],{"id":195},"revenue-analytics","Revenue Analytics",[198,199,201,250,523],"code-group",{"sync":200},"lang",[202,203,209],"pre",{"className":204,"code":205,"filename":206,"language":207,"meta":208,"style":208},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl \"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Frevenue?dateFrom=2025-01-01&dateTo=2025-01-31&currency=UGX\" \\\n  -H \"Authorization: Bearer sk_live_a1b2c3d4...\"\n","cURL","bash","",[210,211,212,236],"code",{"__ignoreMap":208},[213,214,217,221,225,229,232],"span",{"class":215,"line":216},"line",1,[213,218,220],{"class":219},"sBMFI","curl",[213,222,224],{"class":223},"sMK4o"," \"",[213,226,228],{"class":227},"sfazB","http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Frevenue?dateFrom=2025-01-01&dateTo=2025-01-31&currency=UGX",[213,230,231],{"class":223},"\"",[213,233,235],{"class":234},"sTEyZ"," \\\n",[213,237,239,242,244,247],{"class":215,"line":238},2,[213,240,241],{"class":227},"  -H",[213,243,224],{"class":223},[213,245,246],{"class":227},"Authorization: Bearer sk_live_a1b2c3d4...",[213,248,249],{"class":223},"\"\n",[202,251,256],{"className":252,"code":253,"filename":254,"language":255,"meta":208,"style":208},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { PimaBillClient } from 'pimabill';\n\nconst client = new PimaBillClient({ token: 'sk_live_a1b2c3d4...' });\n\nconst revenue = await client.analytics.getRevenue({\n  dateFrom: '2025-01-01',\n  dateTo: '2025-01-31',\n  currency: 'UGX',\n});\n\nconsole.log(revenue.totalRevenue); \u002F\u002F Paid in the period\nconsole.log(revenue.invoiceCount); \u002F\u002F Invoices paid\nconsole.log(revenue.mrr, revenue.arr); \u002F\u002F Recurring revenue, monthly and yearly\n","TypeScript","typescript",[210,257,258,288,294,340,345,377,395,412,429,439,444,470,491],{"__ignoreMap":208},[213,259,260,264,267,270,273,276,279,282,285],{"class":215,"line":216},[213,261,263],{"class":262},"s7zQu","import",[213,265,266],{"class":223}," {",[213,268,269],{"class":234}," PimaBillClient",[213,271,272],{"class":223}," }",[213,274,275],{"class":262}," from",[213,277,278],{"class":223}," '",[213,280,281],{"class":227},"pimabill",[213,283,284],{"class":223},"'",[213,286,287],{"class":223},";\n",[213,289,290],{"class":215,"line":238},[213,291,293],{"emptyLinePlaceholder":292},true,"\n",[213,295,297,301,304,307,310,313,316,319,323,326,328,331,333,335,338],{"class":215,"line":296},3,[213,298,300],{"class":299},"spNyl","const",[213,302,303],{"class":234}," client ",[213,305,306],{"class":223},"=",[213,308,309],{"class":223}," new",[213,311,269],{"class":312},"s2Zo4",[213,314,315],{"class":234},"(",[213,317,318],{"class":223},"{",[213,320,322],{"class":321},"swJcz"," token",[213,324,325],{"class":223},":",[213,327,278],{"class":223},[213,329,330],{"class":227},"sk_live_a1b2c3d4...",[213,332,284],{"class":223},[213,334,272],{"class":223},[213,336,337],{"class":234},")",[213,339,287],{"class":223},[213,341,343],{"class":215,"line":342},4,[213,344,293],{"emptyLinePlaceholder":292},[213,346,348,350,353,355,358,361,364,367,369,372,374],{"class":215,"line":347},5,[213,349,300],{"class":299},[213,351,352],{"class":234}," revenue ",[213,354,306],{"class":223},[213,356,357],{"class":262}," await",[213,359,360],{"class":234}," client",[213,362,363],{"class":223},".",[213,365,366],{"class":234},"analytics",[213,368,363],{"class":223},[213,370,371],{"class":312},"getRevenue",[213,373,315],{"class":234},[213,375,376],{"class":223},"{\n",[213,378,380,383,385,387,390,392],{"class":215,"line":379},6,[213,381,382],{"class":321},"  dateFrom",[213,384,325],{"class":223},[213,386,278],{"class":223},[213,388,389],{"class":227},"2025-01-01",[213,391,284],{"class":223},[213,393,394],{"class":223},",\n",[213,396,398,401,403,405,408,410],{"class":215,"line":397},7,[213,399,400],{"class":321},"  dateTo",[213,402,325],{"class":223},[213,404,278],{"class":223},[213,406,407],{"class":227},"2025-01-31",[213,409,284],{"class":223},[213,411,394],{"class":223},[213,413,415,418,420,422,425,427],{"class":215,"line":414},8,[213,416,417],{"class":321},"  currency",[213,419,325],{"class":223},[213,421,278],{"class":223},[213,423,424],{"class":227},"UGX",[213,426,284],{"class":223},[213,428,394],{"class":223},[213,430,432,435,437],{"class":215,"line":431},9,[213,433,434],{"class":223},"}",[213,436,337],{"class":234},[213,438,287],{"class":223},[213,440,442],{"class":215,"line":441},10,[213,443,293],{"emptyLinePlaceholder":292},[213,445,447,450,452,455,458,460,463,466],{"class":215,"line":446},11,[213,448,449],{"class":234},"console",[213,451,363],{"class":223},[213,453,454],{"class":312},"log",[213,456,457],{"class":234},"(revenue",[213,459,363],{"class":223},[213,461,462],{"class":234},"totalRevenue)",[213,464,465],{"class":223},";",[213,467,469],{"class":468},"sHwdD"," \u002F\u002F Paid in the period\n",[213,471,473,475,477,479,481,483,486,488],{"class":215,"line":472},12,[213,474,449],{"class":234},[213,476,363],{"class":223},[213,478,454],{"class":312},[213,480,457],{"class":234},[213,482,363],{"class":223},[213,484,485],{"class":234},"invoiceCount)",[213,487,465],{"class":223},[213,489,490],{"class":468}," \u002F\u002F Invoices paid\n",[213,492,494,496,498,500,502,504,507,510,513,515,518,520],{"class":215,"line":493},13,[213,495,449],{"class":234},[213,497,363],{"class":223},[213,499,454],{"class":312},[213,501,457],{"class":234},[213,503,363],{"class":223},[213,505,506],{"class":234},"mrr",[213,508,509],{"class":223},",",[213,511,512],{"class":234}," revenue",[213,514,363],{"class":223},[213,516,517],{"class":234},"arr)",[213,519,465],{"class":223},[213,521,522],{"class":468}," \u002F\u002F Recurring revenue, monthly and yearly\n",[202,524,529],{"className":525,"code":526,"filename":527,"language":528,"meta":208,"style":208},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from pimabill import PimaBillClient\n\nclient = PimaBillClient(token=\"sk_live_a1b2c3d4...\")\n\nrevenue = client.analytics.get_revenue(date_from=\"2025-01-01\", date_to=\"2025-01-31\", currency=\"UGX\")\n\nprint(revenue.total_revenue)\nprint(revenue.invoice_count)\nprint(revenue.mrr, revenue.arr)\n","Python","python",[210,530,531,536,540,545,549,554,558,563,568],{"__ignoreMap":208},[213,532,533],{"class":215,"line":216},[213,534,535],{},"from pimabill import PimaBillClient\n",[213,537,538],{"class":215,"line":238},[213,539,293],{"emptyLinePlaceholder":292},[213,541,542],{"class":215,"line":296},[213,543,544],{},"client = PimaBillClient(token=\"sk_live_a1b2c3d4...\")\n",[213,546,547],{"class":215,"line":342},[213,548,293],{"emptyLinePlaceholder":292},[213,550,551],{"class":215,"line":347},[213,552,553],{},"revenue = client.analytics.get_revenue(date_from=\"2025-01-01\", date_to=\"2025-01-31\", currency=\"UGX\")\n",[213,555,556],{"class":215,"line":379},[213,557,293],{"emptyLinePlaceholder":292},[213,559,560],{"class":215,"line":397},[213,561,562],{},"print(revenue.total_revenue)\n",[213,564,565],{"class":215,"line":414},[213,566,567],{},"print(revenue.invoice_count)\n",[213,569,570],{"class":215,"line":431},[213,571,572],{},"print(revenue.mrr, revenue.arr)\n",[142,574,576],{"id":575},"subscription-metrics","Subscription Metrics",[198,578,579,607,749],{"sync":200},[202,580,582],{"className":204,"code":581,"filename":206,"language":207,"meta":208,"style":208},"curl \"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Fsubscriptions\" \\\n  -H \"Authorization: Bearer sk_live_a1b2c3d4...\"\n",[210,583,584,597],{"__ignoreMap":208},[213,585,586,588,590,593,595],{"class":215,"line":216},[213,587,220],{"class":219},[213,589,224],{"class":223},[213,591,592],{"class":227},"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Fsubscriptions",[213,594,231],{"class":223},[213,596,235],{"class":234},[213,598,599,601,603,605],{"class":215,"line":238},[213,600,241],{"class":227},[213,602,224],{"class":223},[213,604,246],{"class":227},[213,606,249],{"class":223},[202,608,610],{"className":252,"code":609,"filename":254,"language":255,"meta":208,"style":208},"const metrics = await client.analytics.getSubscriptions();\n\nconsole.log(metrics.total); \u002F\u002F All subscriptions\nconsole.log(metrics.active, metrics.trialing, metrics.paused);\nconsole.log(metrics.canceled); \u002F\u002F Canceled in the period\nconsole.log(metrics.churnRate, metrics.retentionRate); \u002F\u002F Percentages\n",[210,611,612,639,643,664,700,720],{"__ignoreMap":208},[213,613,614,616,619,621,623,625,627,629,631,634,637],{"class":215,"line":216},[213,615,300],{"class":299},[213,617,618],{"class":234}," metrics ",[213,620,306],{"class":223},[213,622,357],{"class":262},[213,624,360],{"class":234},[213,626,363],{"class":223},[213,628,366],{"class":234},[213,630,363],{"class":223},[213,632,633],{"class":312},"getSubscriptions",[213,635,636],{"class":234},"()",[213,638,287],{"class":223},[213,640,641],{"class":215,"line":238},[213,642,293],{"emptyLinePlaceholder":292},[213,644,645,647,649,651,654,656,659,661],{"class":215,"line":296},[213,646,449],{"class":234},[213,648,363],{"class":223},[213,650,454],{"class":312},[213,652,653],{"class":234},"(metrics",[213,655,363],{"class":223},[213,657,658],{"class":234},"total)",[213,660,465],{"class":223},[213,662,663],{"class":468}," \u002F\u002F All subscriptions\n",[213,665,666,668,670,672,674,676,679,681,684,686,689,691,693,695,698],{"class":215,"line":342},[213,667,449],{"class":234},[213,669,363],{"class":223},[213,671,454],{"class":312},[213,673,653],{"class":234},[213,675,363],{"class":223},[213,677,678],{"class":234},"active",[213,680,509],{"class":223},[213,682,683],{"class":234}," metrics",[213,685,363],{"class":223},[213,687,688],{"class":234},"trialing",[213,690,509],{"class":223},[213,692,683],{"class":234},[213,694,363],{"class":223},[213,696,697],{"class":234},"paused)",[213,699,287],{"class":223},[213,701,702,704,706,708,710,712,715,717],{"class":215,"line":347},[213,703,449],{"class":234},[213,705,363],{"class":223},[213,707,454],{"class":312},[213,709,653],{"class":234},[213,711,363],{"class":223},[213,713,714],{"class":234},"canceled)",[213,716,465],{"class":223},[213,718,719],{"class":468}," \u002F\u002F Canceled in the period\n",[213,721,722,724,726,728,730,732,735,737,739,741,744,746],{"class":215,"line":379},[213,723,449],{"class":234},[213,725,363],{"class":223},[213,727,454],{"class":312},[213,729,653],{"class":234},[213,731,363],{"class":223},[213,733,734],{"class":234},"churnRate",[213,736,509],{"class":223},[213,738,683],{"class":234},[213,740,363],{"class":223},[213,742,743],{"class":234},"retentionRate)",[213,745,465],{"class":223},[213,747,748],{"class":468}," \u002F\u002F Percentages\n",[202,750,752],{"className":525,"code":751,"filename":527,"language":528,"meta":208,"style":208},"metrics = client.analytics.get_subscriptions()\n\nprint(metrics.total)\nprint(metrics.active, metrics.trialing, metrics.paused)\nprint(metrics.churn_rate, metrics.retention_rate)\n",[210,753,754,759,763,768,773],{"__ignoreMap":208},[213,755,756],{"class":215,"line":216},[213,757,758],{},"metrics = client.analytics.get_subscriptions()\n",[213,760,761],{"class":215,"line":238},[213,762,293],{"emptyLinePlaceholder":292},[213,764,765],{"class":215,"line":296},[213,766,767],{},"print(metrics.total)\n",[213,769,770],{"class":215,"line":342},[213,771,772],{},"print(metrics.active, metrics.trialing, metrics.paused)\n",[213,774,775],{"class":215,"line":347},[213,776,777],{},"print(metrics.churn_rate, metrics.retention_rate)\n",[142,779,781],{"id":780},"customer-metrics","Customer Metrics",[198,783,784,812,905],{"sync":200},[202,785,787],{"className":204,"code":786,"filename":206,"language":207,"meta":208,"style":208},"curl \"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Fcustomers\" \\\n  -H \"Authorization: Bearer sk_live_a1b2c3d4...\"\n",[210,788,789,802],{"__ignoreMap":208},[213,790,791,793,795,798,800],{"class":215,"line":216},[213,792,220],{"class":219},[213,794,224],{"class":223},[213,796,797],{"class":227},"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Fcustomers",[213,799,231],{"class":223},[213,801,235],{"class":234},[213,803,804,806,808,810],{"class":215,"line":238},[213,805,241],{"class":227},[213,807,224],{"class":223},[213,809,246],{"class":227},[213,811,249],{"class":223},[202,813,815],{"className":252,"code":814,"filename":254,"language":255,"meta":208,"style":208},"const customers = await client.analytics.getCustomers();\n\nconsole.log(customers.totalCustomers);\nconsole.log(customers.newCustomers); \u002F\u002F New in the period\nconsole.log(customers.arpu); \u002F\u002F Average revenue per customer\n",[210,816,817,843,847,865,885],{"__ignoreMap":208},[213,818,819,821,824,826,828,830,832,834,836,839,841],{"class":215,"line":216},[213,820,300],{"class":299},[213,822,823],{"class":234}," customers ",[213,825,306],{"class":223},[213,827,357],{"class":262},[213,829,360],{"class":234},[213,831,363],{"class":223},[213,833,366],{"class":234},[213,835,363],{"class":223},[213,837,838],{"class":312},"getCustomers",[213,840,636],{"class":234},[213,842,287],{"class":223},[213,844,845],{"class":215,"line":238},[213,846,293],{"emptyLinePlaceholder":292},[213,848,849,851,853,855,858,860,863],{"class":215,"line":296},[213,850,449],{"class":234},[213,852,363],{"class":223},[213,854,454],{"class":312},[213,856,857],{"class":234},"(customers",[213,859,363],{"class":223},[213,861,862],{"class":234},"totalCustomers)",[213,864,287],{"class":223},[213,866,867,869,871,873,875,877,880,882],{"class":215,"line":342},[213,868,449],{"class":234},[213,870,363],{"class":223},[213,872,454],{"class":312},[213,874,857],{"class":234},[213,876,363],{"class":223},[213,878,879],{"class":234},"newCustomers)",[213,881,465],{"class":223},[213,883,884],{"class":468}," \u002F\u002F New in the period\n",[213,886,887,889,891,893,895,897,900,902],{"class":215,"line":347},[213,888,449],{"class":234},[213,890,363],{"class":223},[213,892,454],{"class":312},[213,894,857],{"class":234},[213,896,363],{"class":223},[213,898,899],{"class":234},"arpu)",[213,901,465],{"class":223},[213,903,904],{"class":468}," \u002F\u002F Average revenue per customer\n",[202,906,908],{"className":525,"code":907,"filename":527,"language":528,"meta":208,"style":208},"customers = client.analytics.get_customers()\n\nprint(customers.total_customers)\nprint(customers.new_customers)\nprint(customers.arpu)\n",[210,909,910,915,919,924,929],{"__ignoreMap":208},[213,911,912],{"class":215,"line":216},[213,913,914],{},"customers = client.analytics.get_customers()\n",[213,916,917],{"class":215,"line":238},[213,918,293],{"emptyLinePlaceholder":292},[213,920,921],{"class":215,"line":296},[213,922,923],{},"print(customers.total_customers)\n",[213,925,926],{"class":215,"line":342},[213,927,928],{},"print(customers.new_customers)\n",[213,930,931],{"class":215,"line":347},[213,932,933],{},"print(customers.arpu)\n",[142,935,937],{"id":936},"payment-analytics","Payment Analytics",[198,939,940,968,1092],{"sync":200},[202,941,943],{"className":204,"code":942,"filename":206,"language":207,"meta":208,"style":208},"curl \"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Fpayments?provider=STRIPE\" \\\n  -H \"Authorization: Bearer sk_live_a1b2c3d4...\"\n",[210,944,945,958],{"__ignoreMap":208},[213,946,947,949,951,954,956],{"class":215,"line":216},[213,948,220],{"class":219},[213,950,224],{"class":223},[213,952,953],{"class":227},"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fanalytics\u002Fpayments?provider=STRIPE",[213,955,231],{"class":223},[213,957,235],{"class":234},[213,959,960,962,964,966],{"class":215,"line":238},[213,961,241],{"class":227},[213,963,224],{"class":223},[213,965,246],{"class":227},[213,967,249],{"class":223},[202,969,971],{"className":252,"code":970,"filename":254,"language":255,"meta":208,"style":208},"const payments = await client.analytics.getPayments({\n  provider: 'STRIPE'\n});\n\nconsole.log(payments.successRate); \u002F\u002F Percentage\nconsole.log(payments.totalPayments, payments.succeeded, payments.failed, payments.pending);\n",[210,972,973,999,1014,1022,1026,1047],{"__ignoreMap":208},[213,974,975,977,980,982,984,986,988,990,992,995,997],{"class":215,"line":216},[213,976,300],{"class":299},[213,978,979],{"class":234}," payments ",[213,981,306],{"class":223},[213,983,357],{"class":262},[213,985,360],{"class":234},[213,987,363],{"class":223},[213,989,366],{"class":234},[213,991,363],{"class":223},[213,993,994],{"class":312},"getPayments",[213,996,315],{"class":234},[213,998,376],{"class":223},[213,1000,1001,1004,1006,1008,1011],{"class":215,"line":238},[213,1002,1003],{"class":321},"  provider",[213,1005,325],{"class":223},[213,1007,278],{"class":223},[213,1009,1010],{"class":227},"STRIPE",[213,1012,1013],{"class":223},"'\n",[213,1015,1016,1018,1020],{"class":215,"line":296},[213,1017,434],{"class":223},[213,1019,337],{"class":234},[213,1021,287],{"class":223},[213,1023,1024],{"class":215,"line":342},[213,1025,293],{"emptyLinePlaceholder":292},[213,1027,1028,1030,1032,1034,1037,1039,1042,1044],{"class":215,"line":347},[213,1029,449],{"class":234},[213,1031,363],{"class":223},[213,1033,454],{"class":312},[213,1035,1036],{"class":234},"(payments",[213,1038,363],{"class":223},[213,1040,1041],{"class":234},"successRate)",[213,1043,465],{"class":223},[213,1045,1046],{"class":468}," \u002F\u002F Percentage\n",[213,1048,1049,1051,1053,1055,1057,1059,1062,1064,1067,1069,1072,1074,1076,1078,1081,1083,1085,1087,1090],{"class":215,"line":379},[213,1050,449],{"class":234},[213,1052,363],{"class":223},[213,1054,454],{"class":312},[213,1056,1036],{"class":234},[213,1058,363],{"class":223},[213,1060,1061],{"class":234},"totalPayments",[213,1063,509],{"class":223},[213,1065,1066],{"class":234}," payments",[213,1068,363],{"class":223},[213,1070,1071],{"class":234},"succeeded",[213,1073,509],{"class":223},[213,1075,1066],{"class":234},[213,1077,363],{"class":223},[213,1079,1080],{"class":234},"failed",[213,1082,509],{"class":223},[213,1084,1066],{"class":234},[213,1086,363],{"class":223},[213,1088,1089],{"class":234},"pending)",[213,1091,287],{"class":223},[202,1093,1095],{"className":525,"code":1094,"filename":527,"language":528,"meta":208,"style":208},"payments = client.analytics.get_payments(provider=\"STRIPE\")\n\nprint(payments.success_rate)\nprint(payments.total_payments, payments.succeeded, payments.failed)\n",[210,1096,1097,1102,1106,1111],{"__ignoreMap":208},[213,1098,1099],{"class":215,"line":216},[213,1100,1101],{},"payments = client.analytics.get_payments(provider=\"STRIPE\")\n",[213,1103,1104],{"class":215,"line":238},[213,1105,293],{"emptyLinePlaceholder":292},[213,1107,1108],{"class":215,"line":296},[213,1109,1110],{},"print(payments.success_rate)\n",[213,1112,1113],{"class":215,"line":342},[213,1114,1115],{},"print(payments.total_payments, payments.succeeded, payments.failed)\n",[1117,1118,1119],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":208,"searchDepth":238,"depth":238,"links":1121},[1122,1123,1124,1125,1126],{"id":144,"depth":238,"text":145},{"id":195,"depth":238,"text":196},{"id":575,"depth":238,"text":576},{"id":780,"depth":238,"text":781},{"id":936,"depth":238,"text":937},"Track revenue, subscriptions, customers, and payment performance with built-in analytics.","md",null,{},{"title":113,"description":1127},"lDPuozKs5Xr-Rfhy7JM7Rcad2iYPtAZWUzis51rQNFo",[1134,1136],{"title":109,"path":110,"stem":111,"description":1135,"children":-1},"Configure global and African payment providers to process payments for your tenants.",{"title":117,"path":118,"stem":119,"description":1137,"children":-1},"Set up real-time webhook notifications for billing events.",1793401242783]