{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial","tabs","tab","code-snippet"]},"type":"markdown"},"seo":{"title":"Bill premiums and apply payments"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"bill-premiums-and-apply-payments","__idx":0},"children":["Bill premiums and apply payments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This playbook is for finance and billing teams that want to automate the monthly premium cycle. You generate a group's premium invoice, check its totals, and import a bank payment file (CSV) that creates the payments and posts them to the invoice, without keying payments by hand."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Who this is for"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Premium billing and finance teams, and the developers who automate their bank files"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Time to run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["About 15 minutes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Writes data?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes. Try it in a non-production database first if you have one. \"Try it\" calls in the API reference are real production calls."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operations used"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["9, linked in each step"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"This changes production data"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["VBAPI clients connect to production, so the write calls on this page create or change real records in the database you name in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["vbasoftware-database"]},". Try the steps in a non-production database first if VBA has given you one, use clearly fake values while you test, and keep the \"Check it worked\" calls, which only read data. \"Try it\" in the API reference also calls production."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-you-start","__idx":1},"children":["Before you start"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You have completed the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/get-started/quick-start"},"children":["quick start"]}," and your environment variables are set."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A test group with enrolled subscribers, premium rates, and a billing cycle already exists. The samples use the fake group ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DOCS-GRP1"]},"; replace it at the top of each sample."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The group is not set up for self-admin billing. Self-admin groups use a different set of operations that this playbook does not cover."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You know the payor and account that payments should be recorded against. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/payor-accounts/listpayoraccount"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /payor-accounts"]}]}," lists each payor with its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_Key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A premium payment file format is set up in VBASoftware."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your API user has rights to premium billing and premium payments."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-it-fits-together","__idx":2},"children":["How it fits together"]},{"$$mdtype":"Tag","name":"Diagram","attributes":{"data-language":"mermaid","diagramType":"mermaid","diagramSource":"sequenceDiagram\n  participant App as Your system\n  participant API as VBAPI\n  App->>API: GET /groups/{groupID}, GET /billing-cycles/{billingCycleID}\n  App->>API: POST /generate-group-invoice\n  API-->>App: invoice_Key\n  App->>API: GET /premium-invoices/{invoiceKey}/summary\n  App->>API: GET /premium-payment-file-formats\n  App->>API: POST /process-payment-file (base64 CSV)\n  API-->>App: payment and invoice counts\n  App->>API: GET /premium-invoice-payments-ext/{invoiceKey}\n","diagramHtml":"<svg id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" style=\"max-width: 736px;\" viewBox=\"-50 -10 736 539\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><style>\n    #diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 foreignObject {\n      overflow: visible;\n    }\n  </style><g><rect x=\"486\" y=\"453\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"561\" y=\"485.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"561\" dy=\"0\">VBAPI</tspan></text></g><g><rect x=\"0\" y=\"453\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"75\" y=\"485.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">Your system</tspan></text></g><g><line id=\"actor1\" x1=\"561\" y1=\"65\" x2=\"561\" y2=\"453\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"API\" data-et=\"life-line\" data-id=\"API\"></line><g id=\"root-1\" data-et=\"participant\" data-type=\"participant\" data-id=\"API\"><rect x=\"486\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"561\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"561\" dy=\"0\">VBAPI</tspan></text></g></g><g><line id=\"actor0\" x1=\"75\" y1=\"65\" x2=\"75\" y2=\"453\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"App\" data-et=\"life-line\" data-id=\"App\"></line><g id=\"root-0\" data-et=\"participant\" data-type=\"participant\" data-id=\"App\"><rect x=\"0\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"75\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">Your system</tspan></text></g></g><style>#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2{font-family:\"Redocly Mermaid Sans\",Arial,\"Liberation Sans\",Arimo,Helvetica,\"Redocly Mermaid CJK\",sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .error-icon{fill:#552222;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .error-text{fill:#552222;stroke:#552222;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-thickness-normal{stroke-width:1px;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-thickness-thick{stroke-width:3.5px;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-pattern-solid{stroke-dasharray:0;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-thickness-invisible{stroke-width:0;fill:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-pattern-dashed{stroke-dasharray:3;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .edge-pattern-dotted{stroke-dasharray:2;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .marker{fill:#333333;stroke:#333333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .marker.cross{stroke:#333333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 svg{font-family:\"Redocly Mermaid Sans\",Arial,\"Liberation Sans\",Arimo,Helvetica,\"Redocly Mermaid CJK\",sans-serif;font-size:16px;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 p{margin:0;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .actor{stroke:#9370DB;fill:#ECECFF;stroke-width:1;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 rect.actor.outer-path[data-look=\"neo\"]{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 rect.note[data-look=\"neo\"]{stroke:#aaaa33;fill:#fff5ad;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 text.actor&gt;tspan{fill:black;stroke:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .actor-line{stroke:#9370DB;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [id$=\"-arrowhead\"] path{fill:#333;stroke:#333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .sequenceNumber{fill:white;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [id$=\"-sequencenumber\"]{fill:#333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [id$=\"-crosshead\"] path{fill:#333;stroke:#333;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .messageText{fill:#333;stroke:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .labelBox{stroke:#9370DB;fill:#ECECFF;filter:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .labelText,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .labelText&gt;tspan{fill:black;stroke:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .loopText,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .loopText&gt;tspan{fill:black;stroke:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .sectionTitle,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .sectionTitle&gt;tspan{fill:black;stroke:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#9370DB;fill:#9370DB;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .note{stroke:#aaaa33;fill:#fff5ad;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .noteText,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .noteText&gt;tspan{fill:black;stroke:none;font-weight:normal;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .activation0{fill:#f4f4f4;stroke:#666;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .activation1{fill:#f4f4f4;stroke:#666;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .activation2{fill:#f4f4f4;stroke:#666;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .actorPopupMenu{position:absolute;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .actor-man circle,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 line{fill:#ECECFF;stroke-width:2px;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 g rect.rect{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));stroke:#9370DB;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 .node .neo-node{stroke:#9370DB;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node rect,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].cluster rect,#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node polygon{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].swimlane.cluster rect{filter:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node path{stroke:#9370DB;stroke-width:1px;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node .outer-path{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node .neo-line path{stroke:#9370DB;filter:none;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node circle{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].node circle .state-start{fill:#000000;}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].icon-shape .icon{fill:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 [data-look=\"neo\"].icon-shape .icon-neo path{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2 :root{--mermaid-font-family:\"Redocly Mermaid Sans\",Arial,\"Liberation Sans\",Arimo,Helvetica,\"Redocly Mermaid CJK\",sans-serif;}</style><g></g><defs><symbol id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-solidTopArrowHead\" refX=\"7.9\" refY=\"7.25\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 8 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-solidBottomArrowHead\" refX=\"7.9\" refY=\"0.75\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 0 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-stickTopArrowHead\" refX=\"7.5\" refY=\"7\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 7 7\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><defs><marker id=\"diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-stickBottomArrowHead\" refX=\"7.5\" refY=\"0\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 7 L 7 0\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><text x=\"317\" y=\"80\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /groups/{groupID}, GET /billing-cycles/{billingCycleID}</text><line x1=\"76\" y1=\"111\" x2=\"557\" y2=\"111\" class=\"messageLine0\" data-et=\"message\" data-id=\"i0\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"fill: none;\"></line><text x=\"317\" y=\"126\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">POST /generate-group-invoice</text><line x1=\"76\" y1=\"157\" x2=\"557\" y2=\"157\" class=\"messageLine0\" data-et=\"message\" data-id=\"i1\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"fill: none;\"></line><text x=\"320\" y=\"172\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">invoice_Key</text><line x1=\"560\" y1=\"203\" x2=\"79\" y2=\"203\" class=\"messageLine1\" data-et=\"message\" data-id=\"i2\" data-from=\"API\" data-to=\"App\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"317\" y=\"218\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /premium-invoices/{invoiceKey}/summary</text><line x1=\"76\" y1=\"249\" x2=\"557\" y2=\"249\" class=\"messageLine0\" data-et=\"message\" data-id=\"i3\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"fill: none;\"></line><text x=\"317\" y=\"264\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /premium-payment-file-formats</text><line x1=\"76\" y1=\"295\" x2=\"557\" y2=\"295\" class=\"messageLine0\" data-et=\"message\" data-id=\"i4\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"fill: none;\"></line><text x=\"317\" y=\"310\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">POST /process-payment-file (base64 CSV)</text><line x1=\"76\" y1=\"341\" x2=\"557\" y2=\"341\" class=\"messageLine0\" data-et=\"message\" data-id=\"i5\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"fill: none;\"></line><text x=\"320\" y=\"356\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">payment and invoice counts</text><line x1=\"560\" y1=\"387\" x2=\"79\" y2=\"387\" class=\"messageLine1\" data-et=\"message\" data-id=\"i6\" data-from=\"API\" data-to=\"App\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"317\" y=\"402\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /premium-invoice-payments-ext/{invoiceKey}</text><line x1=\"76\" y1=\"433\" x2=\"557\" y2=\"433\" class=\"messageLine0\" data-et=\"message\" data-id=\"i7\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-6a048b2f23a1faa602d013d3b2c207e08c76e59b9f5e32e5f537c70b24ca1df2-arrowhead)\" style=\"fill: none;\"></line></svg>","diagramHtmlDark":"<svg id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" style=\"max-width: 736px;\" viewBox=\"-50 -10 736 539\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><style>\n    #diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 foreignObject {\n      overflow: visible;\n    }\n  </style><g><rect x=\"486\" y=\"453\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"561\" y=\"485.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"561\" dy=\"0\">VBAPI</tspan></text></g><g><rect x=\"0\" y=\"453\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"75\" y=\"485.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">Your system</tspan></text></g><g><line id=\"actor1\" x1=\"561\" y1=\"65\" x2=\"561\" y2=\"453\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"API\" data-et=\"life-line\" data-id=\"API\"></line><g id=\"root-1\" data-et=\"participant\" data-type=\"participant\" data-id=\"API\"><rect x=\"486\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"561\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"561\" dy=\"0\">VBAPI</tspan></text></g></g><g><line id=\"actor0\" x1=\"75\" y1=\"65\" x2=\"75\" y2=\"453\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"App\" data-et=\"life-line\" data-id=\"App\"></line><g id=\"root-0\" data-et=\"participant\" data-type=\"participant\" data-id=\"App\"><rect x=\"0\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"75\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">Your system</tspan></text></g></g><style>#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4{font-family:\"Redocly Mermaid Sans\",Arial,\"Liberation Sans\",Arimo,Helvetica,\"Redocly Mermaid CJK\",sans-serif;font-size:16px;fill:#ccc;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .error-icon{fill:#a44141;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .error-text{fill:#ddd;stroke:#ddd;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-thickness-normal{stroke-width:1px;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-thickness-thick{stroke-width:3.5px;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-pattern-solid{stroke-dasharray:0;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-thickness-invisible{stroke-width:0;fill:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-pattern-dashed{stroke-dasharray:3;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .edge-pattern-dotted{stroke-dasharray:2;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .marker{fill:lightgrey;stroke:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .marker.cross{stroke:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 svg{font-family:\"Redocly Mermaid Sans\",Arial,\"Liberation Sans\",Arimo,Helvetica,\"Redocly Mermaid CJK\",sans-serif;font-size:16px;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 p{margin:0;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .actor{stroke:#ccc;fill:#1f2020;stroke-width:1;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 rect.actor.outer-path[data-look=\"neo\"]{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 rect.note[data-look=\"neo\"]{stroke:hsl(180, 0%, 18.3529411765%);fill:hsl(180, 1.5873015873%, 28.3529411765%);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 text.actor&gt;tspan{fill:lightgrey;stroke:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .actor-line{stroke:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [id$=\"-arrowhead\"] path{fill:lightgrey;stroke:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .sequenceNumber{fill:black;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [id$=\"-sequencenumber\"]{fill:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [id$=\"-crosshead\"] path{fill:lightgrey;stroke:lightgrey;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .messageText{fill:lightgrey;stroke:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .labelBox{stroke:#ccc;fill:#1f2020;filter:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .labelText,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .labelText&gt;tspan{fill:lightgrey;stroke:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .loopText,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .loopText&gt;tspan{fill:lightgrey;stroke:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .sectionTitle,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .sectionTitle&gt;tspan{fill:lightgrey;stroke:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#ccc;fill:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .note{stroke:hsl(180, 0%, 18.3529411765%);fill:hsl(180, 1.5873015873%, 28.3529411765%);}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .noteText,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .noteText&gt;tspan{fill:rgb(183.8476190475, 181.5523809523, 181.5523809523);stroke:none;font-weight:normal;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .activation0{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .activation1{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .activation2{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .actorPopupMenu{position:absolute;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .actorPopupMenuPanel{position:absolute;fill:#1f2020;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .actor-man circle,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 line{fill:#1f2020;stroke-width:2px;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 g rect.rect{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));stroke:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 .node .neo-node{stroke:#ccc;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node rect,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].cluster rect,#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node polygon{stroke:url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].swimlane.cluster rect{filter:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node path{stroke:url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-gradient);stroke-width:1px;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node .neo-line path{stroke:#ccc;filter:none;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node circle{stroke:url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].node circle .state-start{fill:#000000;}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].icon-shape .icon{fill:url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 [data-look=\"neo\"].icon-shape .icon-neo path{stroke:url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4 :root{--mermaid-font-family:\"Redocly Mermaid Sans\",Arial,\"Liberation Sans\",Arimo,Helvetica,\"Redocly Mermaid CJK\",sans-serif;}</style><g></g><defs><symbol id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-solidTopArrowHead\" refX=\"7.9\" refY=\"7.25\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 8 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-solidBottomArrowHead\" refX=\"7.9\" refY=\"0.75\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 0 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-stickTopArrowHead\" refX=\"7.5\" refY=\"7\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 7 7\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><defs><marker id=\"diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-stickBottomArrowHead\" refX=\"7.5\" refY=\"0\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 7 L 7 0\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><text x=\"317\" y=\"80\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /groups/{groupID}, GET /billing-cycles/{billingCycleID}</text><line x1=\"76\" y1=\"111\" x2=\"557\" y2=\"111\" class=\"messageLine0\" data-et=\"message\" data-id=\"i0\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"fill: none;\"></line><text x=\"317\" y=\"126\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">POST /generate-group-invoice</text><line x1=\"76\" y1=\"157\" x2=\"557\" y2=\"157\" class=\"messageLine0\" data-et=\"message\" data-id=\"i1\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"fill: none;\"></line><text x=\"320\" y=\"172\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">invoice_Key</text><line x1=\"560\" y1=\"203\" x2=\"79\" y2=\"203\" class=\"messageLine1\" data-et=\"message\" data-id=\"i2\" data-from=\"API\" data-to=\"App\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"317\" y=\"218\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /premium-invoices/{invoiceKey}/summary</text><line x1=\"76\" y1=\"249\" x2=\"557\" y2=\"249\" class=\"messageLine0\" data-et=\"message\" data-id=\"i3\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"fill: none;\"></line><text x=\"317\" y=\"264\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /premium-payment-file-formats</text><line x1=\"76\" y1=\"295\" x2=\"557\" y2=\"295\" class=\"messageLine0\" data-et=\"message\" data-id=\"i4\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"fill: none;\"></line><text x=\"317\" y=\"310\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">POST /process-payment-file (base64 CSV)</text><line x1=\"76\" y1=\"341\" x2=\"557\" y2=\"341\" class=\"messageLine0\" data-et=\"message\" data-id=\"i5\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"fill: none;\"></line><text x=\"320\" y=\"356\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">payment and invoice counts</text><line x1=\"560\" y1=\"387\" x2=\"79\" y2=\"387\" class=\"messageLine1\" data-et=\"message\" data-id=\"i6\" data-from=\"API\" data-to=\"App\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"317\" y=\"402\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, Arial, &quot;Liberation Sans&quot;, Arimo, Helvetica, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">GET /premium-invoice-payments-ext/{invoiceKey}</text><line x1=\"76\" y1=\"433\" x2=\"557\" y2=\"433\" class=\"messageLine0\" data-et=\"message\" data-id=\"i7\" data-from=\"App\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-45f3ec69de1fab8044f4eabec70bc03f3bf6f25f8e41740573c090369f9e67d4-arrowhead)\" style=\"fill: none;\"></line></svg>"},"children":["sequenceDiagram\n  participant App as Your system\n  participant API as VBAPI\n  App->>API: GET /groups/{groupID}, GET /billing-cycles/{billingCycleID}\n  App->>API: POST /generate-group-invoice\n  API-->>App: invoice_Key\n  App->>API: GET /premium-invoices/{invoiceKey}/summary\n  App->>API: GET /premium-payment-file-formats\n  App->>API: POST /process-payment-file (base64 CSV)\n  API-->>App: payment and invoice counts\n  App->>API: GET /premium-invoice-payments-ext/{invoiceKey}\n"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"steps","__idx":3},"children":["Steps"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-confirm-the-groups-billing-cycle","__idx":4},"children":["1. Confirm the group's billing cycle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/groups/getgroups"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /groups/{groupID}"]}]},", then ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/billing-cycles/getbillingcycle"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /billing-cycles/{billingCycleID}"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The group record says which billing cycle its invoices use (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billing_Cycle_ID"]},") and whether it is a self-admin group (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["self_Admin"]},"). The billing cycle tells you how often the group is billed, so you can pick the right billing period in step 2. To see every cycle, use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/billing-cycles/listbillingcycle"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /billing-cycles"]}]},". Both calls only read data."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        var group = (await api.GetAsync($\"/groups/{GroupId}\")).Data!;\n        if (group[\"self_Admin\"]?.GetValue<bool>() == true)\n            throw new InvalidOperationException($\"{GroupId} uses self-admin billing, which this playbook does not cover.\");\n        var cycle = (await api.GetAsync($\"/billing-cycles/{group[\"billing_Cycle_ID\"]}\")).Data!;\n        Console.WriteLine($\"Billing cycle: {cycle[\"billing_Cycle_ID\"]} {cycle[\"description\"]}\");\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    group = api.get(f\"/groups/{GROUP_ID}\").data\n    if group[\"self_Admin\"]:\n        raise SystemExit(f\"{GROUP_ID} uses self-admin billing, which this playbook does not cover.\")\n    cycle = api.get(f\"/billing-cycles/{group['billing_Cycle_ID']}\").data\n    print(\"Billing cycle:\", cycle[\"billing_Cycle_ID\"], cycle[\"description\"])\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  const group = (await api.get(`/groups/${GROUP_ID}`)).data;\n  if (group.self_Admin) throw new Error(`${GROUP_ID} uses self-admin billing, which this playbook does not cover.`);\n  const cycle = (await api.get(`/billing-cycles/${group.billing_Cycle_ID}`)).data;\n  console.log(\"Billing cycle:\", cycle.billing_Cycle_ID, cycle.description);\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-generate-the-group-invoice","__idx":5},"children":["2. Generate the group invoice"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/generatepreminvoicegroup"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /generate-group-invoice"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This builds one premium invoice for the group for the billing period you give it, and returns it. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GeneratePremInvoice"]}," schema marks no field as required, but the API source (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FABilling/Services/BillingService.cs"]},") rejects a request with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," unless ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group_ID"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bill_From"]}," are set, and requires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["division_ID"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriber_ID"]}," to be empty for a group invoice. The minimal body:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"group_ID\": \"DOCS-GRP1\",\n  \"bill_From\": \"2030-02-01T00:00:00\",\n  \"bill_Thru\": \"2030-02-28T00:00:00\",\n  \"invoice_Date\": \"2030-01-15T00:00:00\",\n  \"due_Date\": \"2030-02-01T00:00:00\",\n  \"regenerate\": false\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Do not send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_ID"]},": VBAPI sets it to the API user. Use the billing period you actually bill; the 2030 dates are placeholders."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        var invoice = (await api.PostAsync(\"/generate-group-invoice\", new\n        {\n            group_ID = GroupId,\n            bill_From = \"2030-02-01T00:00:00\",\n            bill_Thru = \"2030-02-28T00:00:00\",\n            invoice_Date = \"2030-01-15T00:00:00\",\n            due_Date = \"2030-02-01T00:00:00\",\n            regenerate = false,\n        })).Data!;\n        var invoiceKey = invoice[\"invoice_Key\"]!.GetValue<int>();\n        Console.WriteLine($\"Invoice {invoiceKey} number {invoice[\"invoice_Number\"]} status {invoice[\"invoice_Status\"]}\");\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    invoice = api.post(\"/generate-group-invoice\", {\n        \"group_ID\": GROUP_ID,\n        \"bill_From\": \"2030-02-01T00:00:00\",\n        \"bill_Thru\": \"2030-02-28T00:00:00\",\n        \"invoice_Date\": \"2030-01-15T00:00:00\",\n        \"due_Date\": \"2030-02-01T00:00:00\",\n        \"regenerate\": False,\n    }).data\n    invoice_key = invoice[\"invoice_Key\"]\n    print(\"Invoice\", invoice_key, \"number\", invoice[\"invoice_Number\"], \"status\", invoice[\"invoice_Status\"])\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  const invoice = (\n    await api.post(\"/generate-group-invoice\", {\n      group_ID: GROUP_ID,\n      bill_From: \"2030-02-01T00:00:00\",\n      bill_Thru: \"2030-02-28T00:00:00\",\n      invoice_Date: \"2030-01-15T00:00:00\",\n      due_Date: \"2030-02-01T00:00:00\",\n      regenerate: false,\n    })\n  ).data;\n  const invoiceKey: number = invoice.invoice_Key;\n  console.log(\"Invoice\", invoiceKey, \"number\", invoice.invoice_Number, \"status\", invoice.invoice_Status);\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example response (illustrative; field values are fake, and some fields are left out):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"invoice_Key\": 900001,\n    \"invoice_Number\": \"DOCS-900001\",\n    \"invoice_Level\": \"G\",\n    \"invoice_Status\": \"OPEN\",\n    \"billing_Cycle_ID\": \"MO\",\n    \"billing_From\": \"2030-02-01T00:00:00\",\n    \"billing_Thru\": \"2030-02-28T00:00:00\",\n    \"invoice_Date\": \"2030-01-15T00:00:00\",\n    \"due_Date\": \"2030-02-01T00:00:00\",\n    \"bill_Name\": \"Sample Employer Group\",\n    \"finalized\": false\n  },\n  \"error\": null,\n  \"debug\": { \"activityID\": \"00000000-0000-0000-0000-000000000000\" }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save from the response:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.invoice_Key"]}," (the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoiceKey"]}," path parameter, and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invoice_Key"]}," column in the payment file)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Running it again:"]}," each call with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["regenerate"]}," set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," takes a new invoice key, so a second call creates a second invoice for the same period. To rebuild an existing invoice, use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/regenerateinvoice"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /invoice-regenerate/{invoiceKey}"]}]},", which deletes the invoice and its attached adjustments and payments and rebuilds it under the same key. With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["regenerate"]}," set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", this operation reuses the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoice_Key"]}," you send instead of taking a new one."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-review-the-invoice","__idx":6},"children":["3. Review the invoice"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoices/getpreminvoicesummary"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoices/{invoiceKey}/summary"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The summary totals the invoice: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premium"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premiumReceived"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postedPayment"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unpostedAmount"]},", the adjustment totals, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountDue"]},", and subscriber and member counts. Check that the counts and premium match what you expect before you send the invoice or apply money to it. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoices/getpreminvoice"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoices/{invoiceKey}"]}]}," returns the invoice header. Both calls only read data."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        var summary = (await api.GetAsync($\"/premium-invoices/{invoiceKey}/summary\")).Data!;\n        Console.WriteLine($\"Premium: {summary[\"premium\"]} Amount due: {summary[\"amountDue\"]} Subscribers: {summary[\"subscriberCount\"]}\");\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    summary = api.get(f\"/premium-invoices/{invoice_key}/summary\").data\n    print(\"Premium:\", summary[\"premium\"], \"Amount due:\", summary[\"amountDue\"], \"Subscribers:\", summary[\"subscriberCount\"])\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  const summary = (await api.get(`/premium-invoices/${invoiceKey}/summary`)).data;\n  console.log(\"Premium:\", summary.premium, \"Amount due:\", summary.amountDue, \"Subscribers:\", summary.subscriberCount);\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"4-find-the-payment-file-format","__idx":7},"children":["4. Find the payment file format"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-payment-file-formats/listprempaymentfileformat"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-payment-file-formats"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payment file request needs a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_File_Format_Key"]},". List the formats and use the one your administrator set up for bank files. The samples print every format and use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DOCS_PAYMENT_FILE_FORMAT_KEY"]}," if it is set, otherwise the first one."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        var formats = (await api.GetAsync(\"/premium-payment-file-formats\")).Data?.AsArray() ?? new JsonArray();\n        foreach (var f in formats)\n            Console.WriteLine($\"File format {f?[\"payment_File_Format_Key\"]} {f?[\"description\"]}\");\n        var formatKey = int.TryParse(Environment.GetEnvironmentVariable(\"DOCS_PAYMENT_FILE_FORMAT_KEY\"), out var configured)\n            ? configured\n            : formats[0]![\"payment_File_Format_Key\"]!.GetValue<int>();\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    formats = api.get(\"/premium-payment-file-formats\").data or []\n    for f in formats:\n        print(\"File format\", f[\"payment_File_Format_Key\"], f[\"description\"])\n    format_key = int(os.environ.get(\"DOCS_PAYMENT_FILE_FORMAT_KEY\") or formats[0][\"payment_File_Format_Key\"])\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  const formats: any[] = (await api.get(\"/premium-payment-file-formats\")).data ?? [];\n  for (const f of formats) console.log(\"File format\", f.payment_File_Format_Key, f.description);\n  const formatKey = Number(process.env.DOCS_PAYMENT_FILE_FORMAT_KEY ?? formats[0].payment_File_Format_Key);\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save from the response:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_File_Format_Key"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"5-prepare-the-payment-file","__idx":8},"children":["5. Prepare the payment file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payment file is a CSV with a header row. These are the columns from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VBA_ProcessPaymentFile"]}," schema:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Column"},"children":["Column"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Account"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of the paying account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your unique ID for the payment, for example the bank reference"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment date, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount of the payment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of the payer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payor_ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payor for the payment; the request's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payor_ID"]}," overrides it"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Account_Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account for the payment; the request's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_Key"]}," overrides it when above ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A value from the premium payment types table"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Batch"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Batch_Seq"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Batch and sequence from your source system"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Group_ID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Division_ID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Subscriber_ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Who the payment is from"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invoice_Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invoice to post the payment to"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PremRate_Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rate to apply the payment to"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PremPayment_Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Existing payment to apply the payment to"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This sample file has two fake payments: one for the invoice from step 2 and one with no invoice. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{INVOICE_KEY}}"]}," placeholder is replaced with the real invoice key before the file is sent; a file with the placeholder still in it is rejected."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/payments-sample.csv","language":"csv","header":{"controls":{"copy":{}}},"lang":"csv","source":"Payment_Type,Payment_Batch,Payment_Batch_Seq,Payment_Account,Payment_ID,Payment_Date,Payment_Amount,Payment_Name,Group_ID,Division_ID,Subscriber_ID,Payor_ID,Account_Key,Invoice_Key,PremRate_Key,PremPayment_Key\n,DOCS-BATCH-1,1,DOCS Sample Bank Account,DOCS-PAY-0001,2030-02-01,250.00,Sample Employer Group,DOCS-GRP1,,,DOCS-PAYOR,0,{{INVOICE_KEY}},,\n,DOCS-BATCH-1,2,DOCS Sample Bank Account,DOCS-PAY-0002,2030-02-01,75.00,Sample Employer Group,DOCS-GRP1,,,DOCS-PAYOR,0,,,\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The request sends the file as a base64-encoded string in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_File"]},":"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        var csvText = File.ReadAllText(SamplePath(\"payments-sample.csv\"))\n            .Replace(\"{{INVOICE_KEY}}\", invoiceKey.ToString());\n        var paymentFile = Convert.ToBase64String(Encoding.UTF8.GetBytes(csvText));\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    csv_text = (SAMPLE_DIR / \"payments-sample.csv\").read_text(encoding=\"utf-8\")\n    csv_text = csv_text.replace(\"{{INVOICE_KEY}}\", str(invoice_key))\n    payment_file = base64.b64encode(csv_text.encode(\"utf-8\")).decode(\"ascii\")\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  const csvText = readFileSync(new URL(\"./payments-sample.csv\", import.meta.url), \"utf8\")\n    .replace(\"{{INVOICE_KEY}}\", String(invoiceKey));\n  const paymentFile = Buffer.from(csvText, \"utf8\").toString(\"base64\");\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"6-import-the-payment-file","__idx":9},"children":["6. Import the payment file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/processpaymentfile"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /process-payment-file"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This creates one premium payment for every row in the file and, depending on four options, posts the payments to invoices, applies them, and closes invoices. It returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," when it has finished. As with step 2, do not send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_ID"]},"; VBAPI sets it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["What the four options do, from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BillingService.ProcessPaymentFile"]}," in the API source:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When true"},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create_Invoice_Payments"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["For each row with an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invoice_Key"]},", posts the row's full ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_Amount"]}," to that invoice. Rows without an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invoice_Key"]}," only create a payment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apply_Payments"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Runs auto-apply on each invoice in the file, the same as ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/preminvoiceautoapply"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /premium-invoices/{invoiceKey}/auto-apply"]}]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["close_Invoices"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recalculates the amount due on each invoice in the file. An invoice with nothing due is closed. An overpaid invoice goes through the invoice tolerance process and stays open. For an invoice that still has a balance, see the next row."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["only_Close_Satisfied_Invoices"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Leaves invoices that still have a balance open. When this is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["close_Invoices"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", VBAPI posts an adjustment for the remaining balance and closes the invoice anyway, so the unpaid amount is written off."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A safe first run:"]}," create the payments and post them to invoices, but do not apply them or close anything. This is what the samples send:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"payment_File_Format_Key\": 1,\n  \"payment_File\": \"UGF5bWVudF9UeXBlLFBheW1lbnRfQmF0Y2gs...\",\n  \"payor_ID\": \"DOCS-PAYOR\",\n  \"account_Key\": 0,\n  \"create_Invoice_Payments\": true,\n  \"apply_Payments\": false,\n  \"close_Invoices\": false,\n  \"only_Close_Satisfied_Invoices\": true\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After you have checked the result (step 7), apply the payments with auto-apply. Once you trust the file and the invoices, you can let the import apply and close in one run by setting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apply_Payments"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["close_Invoices"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},". Keep ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["only_Close_Satisfied_Invoices"]}," set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," unless your finance team wants unpaid balances written off."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        var result = (await api.PostAsync(\"/process-payment-file\", new\n        {\n            payment_File_Format_Key = formatKey,\n            payment_File = paymentFile,\n            payor_ID = PayorId,\n            account_Key = AccountKey,\n            create_Invoice_Payments = true,\n            apply_Payments = false,\n            close_Invoices = false,\n            only_Close_Satisfied_Invoices = true,\n        })).Data!;\n        Console.WriteLine($\"Payments created: {result[\"payment_Created_Count\"]}\");\n        Console.WriteLine($\"Invoice payments posted: {result[\"invoice_Payment_Posted_Count\"]}\");\n        Console.WriteLine($\"Invoices closed: {result[\"invoice_Closed_Count\"]} left open: {result[\"invoice_Left_Open_Count\"]}\");\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    result = api.post(\"/process-payment-file\", {\n        \"payment_File_Format_Key\": format_key,\n        \"payment_File\": payment_file,\n        \"payor_ID\": PAYOR_ID,\n        \"account_Key\": ACCOUNT_KEY,\n        \"create_Invoice_Payments\": True,\n        \"apply_Payments\": False,\n        \"close_Invoices\": False,\n        \"only_Close_Satisfied_Invoices\": True,\n    }).data\n    print(\"Payments created:\", result[\"payment_Created_Count\"])\n    print(\"Invoice payments posted:\", result[\"invoice_Payment_Posted_Count\"])\n    print(\"Invoices closed:\", result[\"invoice_Closed_Count\"], \"left open:\", result[\"invoice_Left_Open_Count\"])\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  const result = (\n    await api.post(\"/process-payment-file\", {\n      payment_File_Format_Key: formatKey,\n      payment_File: paymentFile,\n      payor_ID: PAYOR_ID,\n      account_Key: ACCOUNT_KEY,\n      create_Invoice_Payments: true,\n      apply_Payments: false,\n      close_Invoices: false,\n      only_Close_Satisfied_Invoices: true,\n    })\n  ).data;\n  console.log(\"Payments created:\", result.payment_Created_Count);\n  console.log(\"Invoice payments posted:\", result.invoice_Payment_Posted_Count);\n  console.log(\"Invoices closed:\", result.invoice_Closed_Count, \"left open:\", result.invoice_Left_Open_Count);\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example response for the sample file and the safe first run (illustrative):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"payment_Created_Count\": 2,\n    \"invoice_Payment_Posted_Count\": 1,\n    \"invoice_Closed_Count\": 0,\n    \"invoice_Left_Open_Count\": 1\n  },\n  \"error\": null,\n  \"debug\": { \"activityID\": \"00000000-0000-0000-0000-000000000000\" }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["How to read the counts:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_Created_Count"]},": rows in the file. Every row creates a payment, whatever the options."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoice_Payment_Posted_Count"]},": rows posted to an invoice. Zero when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create_Invoice_Payments"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoice_Closed_Count"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoice_Left_Open_Count"]},": the outcome for each row that has an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invoice_Key"]},". With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["close_Invoices"]}," set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", every such row counts as left open."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Invoices left open:"]}," compare ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountDue"]}," in the invoice summary (step 7). A short payment needs follow-up with the group, or an adjustment if your finance team approves one. An overpayment has been through the tolerance process; check the invoice in VBASoftware."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"7-apply-and-check-the-payments","__idx":10},"children":["7. Apply and check the payments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/preminvoiceautoapply"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /premium-invoices/{invoiceKey}/auto-apply"]}]},", then ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoice-payments/listpreminvoicepaymentext"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoice-payments-ext/{invoiceKey}"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Auto-apply spreads the payments posted to the invoice across its premium lines. It returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]}," and runs in the background, so wait a moment before you check. The samples only call it when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DOCS_APPLY_PAYMENTS"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The extended invoice payment list shows each payment posted to the invoice with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentPosted"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentApplied"]},", and the summary shows the new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postedPayment"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountDue"]},". Both calls only read data."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        if (Environment.GetEnvironmentVariable(\"DOCS_APPLY_PAYMENTS\") == \"true\")\n        {\n            var accepted = await api.PostAsync($\"/premium-invoices/{invoiceKey}/auto-apply\");\n            Console.WriteLine($\"Auto-apply accepted: {(int)accepted.Status}\"); // 202; it runs in the background\n        }\n        "},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/PremiumBillingPlaybook.cs","language":"csharp","header":{"controls":{"copy":{}}},"lang":"csharp","source":"        await foreach (var p in api.GetAllAsync($\"/premium-invoice-payments-ext/{invoiceKey}\"))\n            Console.WriteLine($\"Payment {p?[\"paymentId\"]} amount {p?[\"paymentAmount\"]} posted {p?[\"paymentPosted\"]} applied {p?[\"paymentApplied\"]}\");\n        var after = (await api.GetAsync($\"/premium-invoices/{invoiceKey}/summary\")).Data!;\n        Console.WriteLine($\"Posted payment: {after[\"postedPayment\"]} Amount due: {after[\"amountDue\"]}\");\n        "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    if os.environ.get(\"DOCS_APPLY_PAYMENTS\") == \"true\":\n        accepted = api.post(f\"/premium-invoices/{invoice_key}/auto-apply\")\n        print(\"Auto-apply accepted:\", accepted.status)  # 202; it runs in the background\n    "},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premium_billing.py","language":"python","header":{"controls":{"copy":{}}},"lang":"python","source":"    for p in api.iter_pages(f\"/premium-invoice-payments-ext/{invoice_key}\"):\n        print(\"Payment\", p[\"paymentId\"], \"amount\", p[\"paymentAmount\"], \"posted\", p[\"paymentPosted\"], \"applied\", p[\"paymentApplied\"])\n    summary = api.get(f\"/premium-invoices/{invoice_key}/summary\").data\n    print(\"Posted payment:\", summary[\"postedPayment\"], \"Amount due:\", summary[\"amountDue\"])\n    "},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  if (process.env.DOCS_APPLY_PAYMENTS === \"true\") {\n    const accepted = await api.post(`/premium-invoices/${invoiceKey}/auto-apply`);\n    console.log(\"Auto-apply accepted:\", accepted.status); // 202; it runs in the background\n  }\n  "},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../_samples/playbooks/premium-billing-and-payments/premiumBilling.ts","language":"typescript","header":{"controls":{"copy":{}}},"lang":"typescript","source":"  for await (const p of api.getAll(`/premium-invoice-payments-ext/${invoiceKey}`)) {\n    console.log(\"Payment\", p.paymentId, \"amount\", p.paymentAmount, \"posted\", p.paymentPosted, \"applied\", p.paymentApplied);\n  }\n  const after = (await api.get(`/premium-invoices/${invoiceKey}/summary`)).data;\n  console.log(\"Posted payment:\", after.postedPayment, \"Amount due:\", after.amountDue);\n  "},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verify-the-result","__idx":11},"children":["Verify the result"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These calls only read data:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoices/getpreminvoicesummary"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoices/{invoiceKey}/summary"]}]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postedPayment"]}," includes the posted amount, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amountDue"]}," has gone down once payments are applied."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoice-payments/listpreminvoicepaymentext"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoice-payments-ext/{invoiceKey}"]}]},": one entry per payment posted to the invoice, with its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premPaymentKey"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-payments/getprempayment"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-payments/{premPaymentKey}"]}]},": the payment record, with the payor and account it was recorded against."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-payments/listprempayment"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-payments"]}]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoice-payments/listpreminvoicepayment"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoice-payments"]}]}," list every payment and invoice payment in the database. They have no filter parameters, so use the per-invoice list above where you can, and page through these when you need a payment that was not posted to an invoice."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"clean-up","__idx":12},"children":["Clean up"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Remove a payment from the invoices it was posted to with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/undopremiumpayment"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /undo-premium-payment/{premPaymentKey}"]}]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]},"). It recalculates the received amounts on each affected invoice, and returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," if the payment was not posted to any invoice."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Delete a test payment with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-payments/deleteprempayment"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE /premium-payments/{premPaymentKey}"]}]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204"]},"). Undo it first if it was posted to an invoice."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Delete a test invoice with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/fulldeleteinvoice"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /invoice-full-delete/{invoiceKey}"]}]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]},"). It requires the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deleteAdditionalInvoices"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keepManualAdjustments"]}," query parameters."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-errors","__idx":13},"children":["Common errors"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Symptom"},"children":["Symptom"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Likely cause"},"children":["Likely cause"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fix"},"children":["Fix"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," \"You must pass in a valid Group ID\" or \"valid Bill From\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group_ID"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bill_From"]}," is missing"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Send both"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," \"the Division ID must be blank\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["division_ID"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriber_ID"]}," was sent to the group invoice operation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Leave them out, or use the division variation below"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," \"PremInvoice not found\" from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /generate-group-invoice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nothing was billable for the period, so no invoice was created. A division copied with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["copyPremiums"]}," does not bring the template's group-level premium rates"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the group's rates with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /included-premium-rates?groupId=..."]}," and the enrollment dates"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An error from the invoice summary"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The invoice has no subscriber or self-admin lines, for example because nobody was enrolled for the period"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the billing period and the group's enrollment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," \"Invalid payment file\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_File"]}," is empty, is not base64, or has no data rows"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Base64-encode the whole CSV, header row included"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An error when the file is processed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A column has the wrong type, for example the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{INVOICE_KEY}}"]}," placeholder was not replaced"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fix the row; numbers and dates must parse"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payments created twice"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The same file was imported twice"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Each import creates a payment per row; undo and delete the duplicates"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{\"message\":\"Forbidden\"}"]}," on every call"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-api-key"]}," header is missing or wrong"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/concepts/errors"},"children":["errors"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Contacting support"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send VBA support:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["debug.activityID"]}," from the response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the date and time of the call, with time zone"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the method and path, for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /claim-batches"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the full ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," object from the response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the request body, with passwords, tokens, and personal data removed"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Never send your password, API key, or tokens. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/help/support"},"children":["Support and escalation"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"variations","__idx":14},"children":["Variations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Group and division invoices together:"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/adv.-billing/generatepreminvoicegroupdivision"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /generate-group-division-invoice"]}]}," takes the same body. It creates the group invoice for divisions billed at group level and a separate invoice for each division billed at division level. It returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]}," with no body, so find the new invoices afterwards with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/vbasoftware/vbasoftware.api/premium-invoices/listpreminvoiceslim"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /premium-invoices-slim"]}]}," and its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoiceYear"]}," filters."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Safe to re-run?"]}," No. Generating again creates another invoice, and importing the same file again creates the payments again. Keep track of the invoice keys and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payment_ID"]}," values you have already sent."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"download","__idx":15},"children":["Download"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The complete runnable samples are in the documentation repository under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_samples/playbooks/premium-billing-and-payments/"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PremiumBillingPlaybook.cs"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premium_billing.py"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["premiumBilling.ts"]},", and the sample payment file ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payments-sample.csv"]},", which each sample reads from its own folder. Each sample uses the shared helper for its language described in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/get-started/quick-start"},"children":["quick start"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":16},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Concepts: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/concepts/data-model"},"children":["data model"]},", ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/concepts/requests-and-responses"},"children":["requests and responses"]},", ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/concepts/pagination-and-sorting"},"children":["pagination"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Previous playbook: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-portal/playbooks/claims-intake-and-adjudication"},"children":["Enter claims and adjudicate them"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ask the AI: \"Using the Bill premiums and apply payments playbook, write a C# function that turns our bank's lockbox file into the VBAPI payment file and imports it without closing invoices.\""]}]}]},"headings":[{"value":"Bill premiums and apply payments","id":"bill-premiums-and-apply-payments","depth":1},{"value":"Before you start","id":"before-you-start","depth":2},{"value":"How it fits together","id":"how-it-fits-together","depth":2},{"value":"Steps","id":"steps","depth":2},{"value":"1. Confirm the group's billing cycle","id":"1-confirm-the-groups-billing-cycle","depth":3},{"value":"2. Generate the group invoice","id":"2-generate-the-group-invoice","depth":3},{"value":"3. Review the invoice","id":"3-review-the-invoice","depth":3},{"value":"4. Find the payment file format","id":"4-find-the-payment-file-format","depth":3},{"value":"5. Prepare the payment file","id":"5-prepare-the-payment-file","depth":3},{"value":"6. Import the payment file","id":"6-import-the-payment-file","depth":3},{"value":"7. Apply and check the payments","id":"7-apply-and-check-the-payments","depth":3},{"value":"Verify the result","id":"verify-the-result","depth":2},{"value":"Clean up","id":"clean-up","depth":2},{"value":"Common errors","id":"common-errors","depth":2},{"value":"Variations","id":"variations","depth":2},{"value":"Download","id":"download","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"title":"Bill premiums and apply payments","description":"Generate a group premium invoice with VBAPI, review it, and import a bank payment file that creates payments and posts them to invoices.","seo":{"title":"Bill premiums and apply payments"}},"lastModified":"2026-10-26T21:09:33.694Z","pagePropGetterError":{"message":"","name":""}},"slug":"/developer-portal/playbooks/premium-billing-and-payments","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}