[{"data":1,"prerenderedAt":482},["ShallowReactive",2],{"navigation_docs":3,"-guides-charge-a-customer":132,"-guides-charge-a-customer-surround":477},[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":89,"body":134,"description":470,"extension":471,"links":472,"meta":473,"navigation":474,"path":90,"seo":475,"stem":91,"__hash__":476},"docs\u002F3.guides\u002F18.charge-a-customer.md",{"type":135,"value":136,"toc":462},"minimark",[137,150,155,166,206,210,214,222,337,352,366,373,377,380,433,446,450,458],[138,139,140,141,145,146,149],"p",{},"There are two ways to charge someone: ",[142,143,144],"strong",{},"once",", for an amount you choose, or ",[142,147,148],{},"on a plan",", every billing period. Either way, the customer gets an invoice and a payment link, and the invoice is marked paid as soon as the payment is confirmed.",[151,152,154],"h2",{"id":153},"in-the-dashboard","In the dashboard",[138,156,157,158,161,162,165],{},"Use ",[142,159,160],{},"Charge a customer"," on the Overview or the Invoices page, or ",[142,163,164],{},"Charge"," in a customer's menu on the Customers page:",[167,168,169,173,184],"ol",{},[170,171,172],"li",{},"Choose the customer.",[170,174,175,176,179,180,183],{},"Choose ",[142,177,178],{},"One-time amount"," (what it's for, the amount and the currency) or ",[142,181,182],{},"A plan"," (the plan, a currency it's priced in, and optional trial days).",[170,185,186,187],{},"Choose how they pay:\n",[188,189,190,200],"ul",{},[170,191,192,195,196,199],{},[142,193,194],{},"Send a payment link:"," you get a link to copy into WhatsApp, SMS or email, or ",[142,197,198],{},"Email it"," to the customer from PimaBill.",[170,201,202,205],{},[142,203,204],{},"Already paid:"," for cash, a bank transfer or a payment taken elsewhere. The invoice is recorded as paid, with the method.",[151,207,209],{"id":208},"with-the-api","With the API",[211,212,213],"h3",{"id":144},"Once",[138,215,216,217,221],{},"Create an invoice with ",[218,219,220],"code",{},"checkout"," to get the payment link in the same call:",[223,224,229],"pre",{"className":225,"code":226,"language":227,"meta":228,"style":228},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Finvoices \\\n  -H \"Authorization: Bearer sk_live_...\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"customerId\": \"cus_123\",\n    \"currency\": \"UGX\",\n    \"items\": [{ \"description\": \"Installation\", \"quantity\": 1, \"unitAmount\": 150000 }],\n    \"dueDate\": \"2026-11-02\",\n    \"checkout\": { \"callbackUrl\": \"https:\u002F\u002Fshop.example.com\u002Fpaid\" }\n  }'\n","bash","",[218,230,231,254,272,286,298,304,310,316,322,328],{"__ignoreMap":228},[232,233,236,240,244,247,250],"span",{"class":234,"line":235},"line",1,[232,237,239],{"class":238},"sBMFI","curl",[232,241,243],{"class":242},"sfazB"," -X",[232,245,246],{"class":242}," POST",[232,248,249],{"class":242}," https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Finvoices",[232,251,253],{"class":252},"sTEyZ"," \\\n",[232,255,257,260,264,267,270],{"class":234,"line":256},2,[232,258,259],{"class":242},"  -H",[232,261,263],{"class":262},"sMK4o"," \"",[232,265,266],{"class":242},"Authorization: Bearer sk_live_...",[232,268,269],{"class":262},"\"",[232,271,253],{"class":252},[232,273,275,277,279,282,284],{"class":234,"line":274},3,[232,276,259],{"class":242},[232,278,263],{"class":262},[232,280,281],{"class":242},"Content-Type: application\u002Fjson",[232,283,269],{"class":262},[232,285,253],{"class":252},[232,287,289,292,295],{"class":234,"line":288},4,[232,290,291],{"class":242},"  -d",[232,293,294],{"class":262}," '",[232,296,297],{"class":242},"{\n",[232,299,301],{"class":234,"line":300},5,[232,302,303],{"class":242},"    \"customerId\": \"cus_123\",\n",[232,305,307],{"class":234,"line":306},6,[232,308,309],{"class":242},"    \"currency\": \"UGX\",\n",[232,311,313],{"class":234,"line":312},7,[232,314,315],{"class":242},"    \"items\": [{ \"description\": \"Installation\", \"quantity\": 1, \"unitAmount\": 150000 }],\n",[232,317,319],{"class":234,"line":318},8,[232,320,321],{"class":242},"    \"dueDate\": \"2026-11-02\",\n",[232,323,325],{"class":234,"line":324},9,[232,326,327],{"class":242},"    \"checkout\": { \"callbackUrl\": \"https:\u002F\u002Fshop.example.com\u002Fpaid\" }\n",[232,329,331,334],{"class":234,"line":330},10,[232,332,333],{"class":242},"  }",[232,335,336],{"class":262},"'\n",[138,338,339,340,343,344,347,348,351],{},"The response is the invoice, plus ",[218,341,342],{},"checkout.checkoutUrl"," to send the customer. Pass ",[218,345,346],{},"checkout.providerName"," to use a specific provider; otherwise the highest-priority active one that can take the payment is used. The ",[218,349,350],{},"invoice.paid"," webhook tells you when it's paid.",[138,353,354,355,357,358,361,362,365],{},"Already paid? Create the invoice without ",[218,356,220],{},", then ",[218,359,360],{},"POST \u002Fapi\u002Finvoices\u002F{id}\u002Fmark-paid"," with ",[218,363,364],{},"{ \"paymentMethod\": \"cash\" }",".",[138,367,368,369,365],{},"Selling a product from your catalogue, or taking a deposit and the rest later? See ",[370,371,372],"a",{"href":94},"One-time products & partial payments",[211,374,376],{"id":375},"on-a-plan","On a plan",[138,378,379],{},"Subscribe the customer:",[223,381,383],{"className":225,"code":382,"language":227,"meta":228,"style":228},"curl -X POST https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Fsubscriptions \\\n  -H \"Authorization: Bearer sk_live_...\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"customerId\": \"cus_123\", \"planId\": \"plan_home_20\", \"currency\": \"UGX\" }'\n",[218,384,385,398,410,422],{"__ignoreMap":228},[232,386,387,389,391,393,396],{"class":234,"line":235},[232,388,239],{"class":238},[232,390,243],{"class":242},[232,392,246],{"class":242},[232,394,395],{"class":242}," https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Fsubscriptions",[232,397,253],{"class":252},[232,399,400,402,404,406,408],{"class":234,"line":256},[232,401,259],{"class":242},[232,403,263],{"class":262},[232,405,266],{"class":242},[232,407,269],{"class":262},[232,409,253],{"class":252},[232,411,412,414,416,418,420],{"class":234,"line":274},[232,413,259],{"class":242},[232,415,263],{"class":262},[232,417,281],{"class":242},[232,419,269],{"class":262},[232,421,253],{"class":252},[232,423,424,426,428,431],{"class":234,"line":288},[232,425,291],{"class":242},[232,427,294],{"class":262},[232,429,430],{"class":242},"{ \"customerId\": \"cus_123\", \"planId\": \"plan_home_20\", \"currency\": \"UGX\" }",[232,432,336],{"class":262},[138,434,435,436,439,440,443,444,365],{},"The first invoice is created within a few seconds (unless there's a trial). Find it with ",[218,437,438],{},"GET \u002Fapi\u002Finvoices?subscriptionId={id}",", and get its payment link with ",[218,441,442],{},"POST \u002Fapi\u002Finvoices\u002F{id}\u002Fcheckout",". Renewals are invoiced and emailed automatically every period, and failed payments are retried. See ",[370,445,101],{"href":102},[211,447,449],{"id":448},"without-an-invoice","Without an invoice",[138,451,452,453,457],{},"To take a payment that isn't a bill, such as a deposit or a top-up, use a ",[370,454,456],{"href":455},"\u002Fguides\u002Fmoney-movement#collect-a-payment","collection",": a mobile money PIN prompt or a hosted checkout, recorded in the ledger.",[459,460,461],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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":228,"searchDepth":256,"depth":256,"links":463},[464,465],{"id":153,"depth":256,"text":154},{"id":208,"depth":256,"text":209,"children":466},[467,468,469],{"id":144,"depth":274,"text":213},{"id":375,"depth":274,"text":376},{"id":448,"depth":274,"text":449},"Take a one-time payment or start a plan, and send the customer a link to pay by card or mobile money.","md",null,{},true,{"title":89,"description":470},"32fCSJL_LWTJRTgwaXfygFOAw28VIFwuP-so0LxZchQ",[478,480],{"title":85,"path":86,"stem":87,"description":479,"children":-1},"Bill in any ISO currency or one of your own, keep every balance in its own currency, and report in one currency at the rate of each payment's day.",{"title":93,"path":94,"stem":95,"description":481,"children":-1},"Sell bundles and courses that are paid once and never renew, and let customers pay with a deposit or in instalments.",1793401245579]