[{"data":1,"prerenderedAt":417},["ShallowReactive",2],{"navigation_docs":3,"-guides-wallets":132,"-guides-wallets-surround":412},[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":61,"body":134,"description":405,"extension":406,"links":407,"meta":408,"navigation":409,"path":62,"seo":410,"stem":63,"__hash__":411},"docs\u002F3.guides\u002F11.wallets.md",{"type":135,"value":136,"toc":400},"minimark",[137,146,151,273,299,303,356,375,379,396],[138,139,140,141,145],"p",{},"A wallet holds prepaid credit for one customer in one currency. When an invoice is created, credit in the customer's wallets is used first (after coupons, add-ons and taxes), and the invoice shows it as ",[142,143,144],"strong",{},"Prepaid credits applied",". If the invoice is later voided, the credit goes back.",[147,148,150],"h2",{"id":149},"create-a-wallet","Create a wallet",[152,153,158],"pre",{"className":154,"code":155,"language":156,"meta":157,"style":157},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Fwallets \\\n  -H \"Authorization: Bearer sk_live_a1b2c3d4...\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"customerId\": \"cust_abc123\",\n    \"name\": \"Main wallet\",\n    \"currency\": \"UGX\",\n    \"rateAmount\": 1,\n    \"paidCredits\": 50000,\n    \"grantedCredits\": 5000\n  }'\n","bash","",[159,160,161,184,202,216,228,234,240,246,252,258,264],"code",{"__ignoreMap":157},[162,163,166,170,174,177,180],"span",{"class":164,"line":165},"line",1,[162,167,169],{"class":168},"sBMFI","curl",[162,171,173],{"class":172},"sfazB"," -X",[162,175,176],{"class":172}," POST",[162,178,179],{"class":172}," https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Fwallets",[162,181,183],{"class":182},"sTEyZ"," \\\n",[162,185,187,190,194,197,200],{"class":164,"line":186},2,[162,188,189],{"class":172},"  -H",[162,191,193],{"class":192},"sMK4o"," \"",[162,195,196],{"class":172},"Authorization: Bearer sk_live_a1b2c3d4...",[162,198,199],{"class":192},"\"",[162,201,183],{"class":182},[162,203,205,207,209,212,214],{"class":164,"line":204},3,[162,206,189],{"class":172},[162,208,193],{"class":192},[162,210,211],{"class":172},"Content-Type: application\u002Fjson",[162,213,199],{"class":192},[162,215,183],{"class":182},[162,217,219,222,225],{"class":164,"line":218},4,[162,220,221],{"class":172},"  -d",[162,223,224],{"class":192}," '",[162,226,227],{"class":172},"{\n",[162,229,231],{"class":164,"line":230},5,[162,232,233],{"class":172},"    \"customerId\": \"cust_abc123\",\n",[162,235,237],{"class":164,"line":236},6,[162,238,239],{"class":172},"    \"name\": \"Main wallet\",\n",[162,241,243],{"class":164,"line":242},7,[162,244,245],{"class":172},"    \"currency\": \"UGX\",\n",[162,247,249],{"class":164,"line":248},8,[162,250,251],{"class":172},"    \"rateAmount\": 1,\n",[162,253,255],{"class":164,"line":254},9,[162,256,257],{"class":172},"    \"paidCredits\": 50000,\n",[162,259,261],{"class":164,"line":260},10,[162,262,263],{"class":172},"    \"grantedCredits\": 5000\n",[162,265,267,270],{"class":164,"line":266},11,[162,268,269],{"class":172},"  }",[162,271,272],{"class":192},"'\n",[274,275,276,287,293],"ul",{},[277,278,279,282,283,286],"li",{},[142,280,281],{},"Paid credits"," are credit the customer bought; ",[142,284,285],{},"granted credits"," are free credit you give (a welcome bonus or compensation). Both are spent the same way; they are recorded separately for your accounts.",[277,288,289,292],{},[159,290,291],{},"rateAmount"," is what one credit is worth in the wallet's currency (1 credit = 1 UGX above).",[277,294,295,298],{},[159,296,297],{},"expirationAt"," (ISO 8601) ends the wallet on that date; remaining credit is voided.",[147,300,302],{"id":301},"top-up-grant-or-void","Top up, grant or void",[152,304,306],{"className":154,"code":305,"language":156,"meta":157,"style":157},"curl -X POST https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Fwallets\u002Ftransactions \\\n  -H \"Authorization: Bearer sk_live_a1b2c3d4...\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"walletId\": \"wal_123\", \"paidCredits\": 20000 }'\n",[159,307,308,321,333,345],{"__ignoreMap":157},[162,309,310,312,314,316,319],{"class":164,"line":165},[162,311,169],{"class":168},[162,313,173],{"class":172},[162,315,176],{"class":172},[162,317,318],{"class":172}," https:\u002F\u002Fapi.pimabill.com\u002Fapi\u002Fwallets\u002Ftransactions",[162,320,183],{"class":182},[162,322,323,325,327,329,331],{"class":164,"line":186},[162,324,189],{"class":172},[162,326,193],{"class":192},[162,328,196],{"class":172},[162,330,199],{"class":192},[162,332,183],{"class":182},[162,334,335,337,339,341,343],{"class":164,"line":204},[162,336,189],{"class":172},[162,338,193],{"class":192},[162,340,211],{"class":172},[162,342,199],{"class":192},[162,344,183],{"class":182},[162,346,347,349,351,354],{"class":164,"line":218},[162,348,221],{"class":172},[162,350,224],{"class":192},[162,352,353],{"class":172},"{ \"walletId\": \"wal_123\", \"paidCredits\": 20000 }",[162,355,272],{"class":192},[138,357,358,359,362,363,366,367,370,371,374],{},"Pass ",[159,360,361],{},"grantedCredits"," to give free credit, or ",[159,364,365],{},"voidedCredits"," to remove credit. ",[159,368,369],{},"GET \u002Fapi\u002Fwallets\u002F{id}\u002Ftransactions"," lists every movement, and ",[159,372,373],{},"DELETE \u002Fapi\u002Fwallets\u002F{id}"," terminates a wallet and voids what is left.",[147,376,378],{"id":377},"moving-money-between-wallets","Moving money between wallets",[138,380,381,386,387,391,392,395],{},[382,383,385],"a",{"href":384},"\u002Fguides\u002Fmoney-movement#move-money-between-wallets","Transfers"," move value between two customers' wallets in the same currency, and a ",[382,388,390],{"href":389},"\u002Fguides\u002Fmoney-movement#send-a-payout","payout"," can be paid from a wallet with ",[159,393,394],{},"walletId",".",[397,398,399],"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":157,"searchDepth":186,"depth":186,"links":401},[402,403,404],{"id":149,"depth":186,"text":150},{"id":301,"depth":186,"text":302},{"id":377,"depth":186,"text":378},"Prepaid credit that customers buy or you grant, used automatically on their invoices.","md",null,{},true,{"title":61,"description":405},"LLxkZBetv9Dj6qR3KoChBLTfcX3IPH-O7bQcdW8zA-U",[413,415],{"title":57,"path":58,"stem":59,"description":414,"children":-1},"Meter what customers use, price it on their plan, and bill it automatically.",{"title":65,"path":66,"stem":67,"description":416,"children":-1},"Discounts, one-time charges, and credits against invoices.",1793401244937]