{"id":265578,"date":"2025-12-28T12:47:58","date_gmt":"2025-12-28T12:47:58","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/peki-bokio-integration-for-woocommerce\/"},"modified":"2025-12-30T01:49:45","modified_gmt":"2025-12-30T01:49:45","slug":"peki-bokio-integration-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/tzm.wordpress.org\/plugins\/peki-bokio-integration-for-woocommerce\/","author":23341760,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.2","stable_tag":"trunk","tested":"6.8.5","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Peki \u2013 Bokio Integration for WooCommerce","header_author":"Peki","header_description":"Connect WooCommerce with Bokio to export orders and accounting data. Not affiliated with Bokio AB or WooCommerce\/Automattic.","assets_banners_color":"4c8fa1","last_updated":"2025-12-30 01:49:45","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/peki.no\/bokio","header_author_uri":"https:\/\/peki.no","rating":0,"author_block_rating":0,"active_installs":0,"downloads":203,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"peki","date":"2025-12-28 12:47:43"},"1.02":{"tag":"1.02","author":"peki","date":"2025-12-30 01:49:45"}},"upgrade_notice":{"1.0.1":"<p>Docs\/pricing refresh and clear steps for finding Bokio Company ID + API token. Update for the latest guidance.<\/p>"},"ratings":[],"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3428664,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3428670,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.02"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Connection \u2013 Demonstrates the secure flow that links WooCommerce to Bokio.","2":"Bank Account Mapping \u2013 Displays the mapping between WooCommerce payment methods and Bokio ledger accounts.","3":"Order Export Status \u2013 Indicates whether each WooCommerce order has been successfully exported to Bokio."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2526,252937,2525,16236,286],"plugin_category":[45],"plugin_contributors":[246420],"plugin_business_model":[],"class_list":["post-265578","plugin","type-plugin","status-publish","hentry","plugin_tags-accounting","plugin_tags-bokio","plugin_tags-bookkeeping","plugin_tags-invoices","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-peki","plugin_committers-peki"],"banners":{"banner":"https:\/\/ps.w.org\/peki-bokio-integration-for-woocommerce\/assets\/banner-772x250.jpg?rev=3428670","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/peki-bokio-integration-for-woocommerce\/assets\/icon.svg?rev=3428664","icon":"https:\/\/ps.w.org\/peki-bokio-integration-for-woocommerce\/assets\/icon.svg?rev=3428664","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Peki \u2013 Bokio Integration for WooCommerce automatically exports your WooCommerce orders to the Bokio accounting platform. When orders are completed the plugin sends structured order data to the secure Peki service, which creates the correct document type (invoice or cash sale), customer, VAT handling, and ledger entries inside Bokio. You keep full control of mapping rules directly in WordPress, while authentication and quotas are managed outside your store for better security.<\/p>\n\n<p>Visit <a href=\"https:\/\/peki.no\/integration\/bokio\">peki.no\/integration\/bokio<\/a> for more information.<\/p>\n\n<h4>How to connect (video)<\/h4>\n\n<p>Watch the step-by-step walkthrough here:<br \/>\nhttps:\/\/youtu.be\/tqICtvE3TjA<\/p>\n\n\n  \n\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li>Automatic order export to Bokio the moment orders are completed<\/li>\n<li>Force export action on each order for manual sync or retries<\/li>\n<li>Advanced bank account mapping per payment method, built together with senior accountants<\/li>\n<li>Automatic customer creation in Bokio when the WooCommerce customer is new<\/li>\n<li>Separate shipping handling with the right VAT codes and rounding protection<\/li>\n<li>VAT export rules for goods and services outside Sweden, including multi-currency orders<\/li>\n<li>Refund handling with credit notes that match requested gross amounts<\/li>\n<li>Optional automatic invoice PDF download to the Media Library (Growth plan)<\/li>\n<li>Multi-site support where several stores can share the same Bokio company quota<\/li>\n<li>WooCommerce HPOS compatibility and WordPress Multisite awareness<\/li>\n<li>GDPR friendly \u2013 only the required order fields are transmitted to Peki and Bokio over HTTPS<\/li>\n<li>Comprehensive logging with masked secrets plus admin notices when quotas are close to limits<\/li>\n<\/ul>\n\n<h4>Requirements<\/h4>\n\n<p>Before using this plugin, you need:<\/p>\n\n<ol>\n<li>An active Bokio account with rights to create invoices or cash sales<\/li>\n<li>At least one invoice or cash sale issued in Bokio so numbering sequences are initialized<\/li>\n<li>WooCommerce installed, activated, and configured with Swedish VAT codes<\/li>\n<li>Outbound HTTPS access from your WordPress host to <code>peki.no<\/code> and <code>bokio.com<\/code><\/li>\n<\/ol>\n\n<h4>Free Plan<\/h4>\n\n<p>The plugin includes 15 free transfers per month. Multiple WordPress sites connected to the same Bokio company share the monthly quota.<\/p>\n\n<h4>Pricing (monthly, ex. VAT)<\/h4>\n\n<ul>\n<li>Free: 15 transfers\/month \u2014 included<\/li>\n<li>Starter: 100 transfers\/month \u2014 $29<\/li>\n<li>Growth: 1,000 transfers\/month \u2014 $99<\/li>\n<li>Pro: 5,000 transfers\/month \u2014 $249<\/li>\n<li>Upgrades require connecting to Bokio first (secure flow in the plugin)<\/li>\n<\/ul>\n\n<h4>Plan Benefits<\/h4>\n\n<p>The plugin includes a free tier and three paid plans. Here\u2019s what you get with each:<\/p>\n\n<ul>\n<li>Free:\n\n<ul>\n<li>15 transfers\/month<\/li>\n<li>Core WooCommerce \u2192 Bokio export<\/li>\n<\/ul><\/li>\n<li><p>Starter:<\/p>\n\n<ul>\n<li>Everything in Free<\/li>\n<li>100 transfers\/month<\/li>\n<\/ul><\/li>\n<li><p>Growth:<\/p>\n\n<ul>\n<li>Everything in Starter<\/li>\n<li>1,000 transfers\/month<\/li>\n<\/ul><\/li>\n<li>Pro:\n\n<ul>\n<li>Everything in Growth<\/li>\n<li>Highest monthly transfer limit (5,000 transfers\/month)<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>Note: This is an independent third-party plugin. We are not affiliated with Bokio AB or WooCommerce\/Automattic.<\/p>\n\n<h3>External Services<\/h3>\n\n<p>This plugin connects to external services to function:<\/p>\n\n<ul>\n<li>Peki export service (<code>peki.no<\/code>) \u2013 Processes and forwards order data to the Bokio API<\/li>\n<li>Bokio API (<code>bokio.com<\/code>) \u2013 Creates accounting vouchers from order data<\/li>\n<\/ul>\n\n<p>By using this plugin, you agree to data processing on these external servers. Review their respective privacy policies for details.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin through WordPress or upload it to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Activate the plugin<\/li>\n<li>Issue at least one invoice or cash sale in Bokio to prime numbering, and ensure correct VAT codes exist<\/li>\n<li>Navigate to <code>Peki \u2192 Bokio<\/code> in WordPress admin and connect your Bokio account through the secure Peki flow<\/li>\n<li>Configure bank account mapping for your payment methods and review document type overrides<\/li>\n<li>Optionally enable Growth features such as automatic PDF downloads once your plan allows it<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='where%20do%20i%20find%20company%20id%20and%20api%20token%3F'><h3>Where do I find Company ID and API token?<\/h3><\/dt>\n<dd><p>Token: in Bokio go to Settings \u2192 API Tokens \u2192 Create token.<br \/>\nCompany ID: open the \u201cAPI Tokens \/ Private integrations\u201d page and copy the ID from the URL: <code>https:\/\/app.bokio.se\/&lt;companyId&gt;\/settings-r\/private-integrations<\/code><\/p><\/dd>\n<dt id='do%20i%20need%20a%20bokio%20account%3F'><h3>Do I need a Bokio account?<\/h3><\/dt>\n<dd><p>Yes, an active Bokio account with rights to create invoices or cash sales is required. The plugin relies on Bokio\u2019s API via the Peki service.<\/p><\/dd>\n<dt id='can%20i%20connect%20multiple%20stores%3F'><h3>Can I connect multiple stores?<\/h3><\/dt>\n<dd><p>Yes, unlimited WordPress sites can connect to the same Bokio company. All sites share the monthly transfer quota tied to that company.<\/p><\/dd>\n<dt id='is%20the%20plugin%20compatible%20with%20hpos%3F'><h3>Is the plugin compatible with HPOS?<\/h3><\/dt>\n<dd><p>Yes, the plugin is fully compatible with WooCommerce High-Performance Order Storage.<\/p><\/dd>\n<dt id='what%20data%20is%20sent%20to%20external%20services%3F'><h3>What data is sent to external services?<\/h3><\/dt>\n<dd><p>The plugin sends order data to <code>peki.no<\/code> (the export service) and <code>bokio.com<\/code> (the accounting platform) to create vouchers. Only the data needed to build the accounting document is transmitted. See the privacy policies on both domains for details.<\/p><\/dd>\n<dt id='is%20my%20data%20secure%3F'><h3>Is my data secure?<\/h3><\/dt>\n<dd><p>Yes. All communication happens over HTTPS, tokens are stored outside your WordPress database, and logs mask sensitive values.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Docs: Updated pricing, product link, and added embedded how-to video (nocookie) in readme.<\/li>\n<li>UI: Embedded \u201cHow to connect Bokio\u201d video in the settings side panel.<\/li>\n<li>Notice: Connection banner now trusts cached status\/flags to avoid false \u201cnot connected\u201d warnings.<\/li>\n<li>Meta: Version bump to 1.0.2.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Docs: Added clear steps to locate the Bokio Company ID and API token with direct URL pattern.<\/li>\n<li>Docs: Pricing section tightened with monthly ex-VAT labels.<\/li>\n<li>Meta: Version bump to 1.0.1.<\/li>\n<\/ul>\n\n<h4>1.0.18<\/h4>\n\n<ul>\n<li>Rebrand: UI copy, settings menus, documentation, and notices now refer to Bokio.<\/li>\n<li>Maintenance: Version bump and documentation sync.<\/li>\n<\/ul>\n\n<h4>1.0.17<\/h4>\n\n<ul>\n<li>UI: Advanced page grouped into \u201cExport rules\u201d and \u201cGrowth features\u201d with larger checkboxes and clearer descriptions.<\/li>\n<li>UI: GROWTH badge with hover tooltip on gated settings; portal link shown when not eligible.<\/li>\n<li>Enforcement: Per-payment document type overrides are Growth-gated in both UI and saving logic (server continues to enforce PDF feature).<\/li>\n<li>Multi-site: Added <code>company_slug<\/code> to portal\/checkout links so upgrades apply across all sites tied to the same Bokio company.<\/li>\n<li>Upgrade flow: If a subscription exists, \u201cChoose plan\u201d routes to the portal to upgrade instead of creating a second subscription.<\/li>\n<li>CSS: Added styles for Growth badge and larger checkboxes.<\/li>\n<li>Change: All plugin endpoints now use Bokio-specific paths for status and portal calls.<\/li>\n<li>Added: New Bokio status endpoint mirroring root behavior.<\/li>\n<li>Fix: Bokio customer portal include path corrected to load local <code>env.php<\/code>.<\/li>\n<li>Fix: Growth gating now reads the plan via the Bokio status endpoint using the current shop URL (immediate unlock after upgrade).<\/li>\n<li>UI\/Docs: Plan Benefits section and plan card bullets added; removed \u201cPriority support\u201d mention from Pro.<\/li>\n<\/ul>\n\n<h4>1.0.16<\/h4>\n\n<ul>\n<li>Enforcement: Automatic invoice PDF saving is Growth-only and gated server-side; local code edits cannot bypass the gate.<\/li>\n<li>UI: Advanced toggle for \u201cAutomatically save invoice PDFs to Media Library\u201d is disabled unless the current plan is Growth (based on cached server status).<\/li>\n<li>UI: Order notes now show a \u201cDownload PDF\u201d button for saved attachments.<\/li>\n<li>Dev: Added binary download helpers and 401 refresh to the legacy client; PDF endpoint added with plan check.<\/li>\n<li>Fix: Customer portal link reliability improved (includes <code>shop<\/code>, <code>shop_url<\/code>, <code>v=3<\/code>, <code>connection_id<\/code>).<\/li>\n<li>Fix: Partial credit notes refunded amounts match requested gross by scaling line quantities; fallback derives net from gross using VAT type.<\/li>\n<\/ul>\n\n<h4>1.0.15<\/h4>\n\n<ul>\n<li>Fix: Prevent duplicate customers in Bokio by reusing existing contact by email when available (server-side).<\/li>\n<li>Fix: Amount scaling guard \u2014 clamp minor unit factor to 100 (SEK) to avoid 1\/100 totals if decimals are misreported.<\/li>\n<li>Fix: Advanced \u201cDocument Type per Payment Method\u201d no longer resets when saving Bank Account Mapping; BACS override persists.<\/li>\n<li>Change: Default bank account fallback aligned with UI to 1920:10001 (Operating account). Previously defaulted to 1960.<\/li>\n<li>Dev\/Compat: Advanced saves keep existing per-gateway overrides when the cash map isn\u2019t posted.<\/li>\n<li>Added: Optional automatic invoice PDF download to Media Library with order attachment and \u201cDownload PDF\u201d button in order notes. Requires Growth subscription; enforced server-side.<\/li>\n<li>Added: Advanced setting toggle for invoice PDF saving (disabled unless on Growth based on server status cache).<\/li>\n<li>Fix: Customer portal button reliability \u2014 includes <code>shop<\/code>, <code>shop_url<\/code>, <code>v=3<\/code>, and <code>connection_id<\/code> to ensure correct account routing.<\/li>\n<li>Fix: Partial credit notes now match requested refund gross by proportionally scaling line quantity; fallback derives net from gross by VAT type (prevents over-crediting full line).<\/li>\n<li>Dev: Backend endpoint to fetch invoice PDF and binary client helpers; token refresh on 401 for binary requests too.<\/li>\n<\/ul>\n\n<h4>1.0.14<\/h4>\n\n<ul>\n<li>Fix: Per-payment \u201cDocument Type\u201d override is now always honored (bypasses master toggle). BACS set to Invoice now forces <code>cash=false<\/code>.<\/li>\n<li>Dev: Added filter <code>pekibokio_cash_flag<\/code> to allow programmatic override of the cash flag.<\/li>\n<li>UI: Support tab simplified to direct email link (petter@peki.no), web form removed.<\/li>\n<li>Docs: Added Screenshots section; updated links to <code>peki.no\/bokio<\/code>.<\/li>\n<li>Compliance: Additional translators comments\/escaping for PHPCS.<\/li>\n<\/ul>\n\n<h4>1.0.13<\/h4>\n\n<ul>\n<li>Added: Per-payment \u201cDocument Type\u201d control (Invoice vs CashSale) with Advanced-tab master toggle.<\/li>\n<li>Added: Live enable\/disable of per-gateway dropdowns when master toggle changes.<\/li>\n<li>Added: Orders list column shows Bokio export status with Woo dashicons (HPOS + legacy).<\/li>\n<li>Added: Admin \u201cOrder actions\u201d entry to force export to Bokio (overrides duplicate guard).<\/li>\n<li>Improved: Prevent auto-export on status change if already exported (idempotency).<\/li>\n<li>Improved: Amount scaling respects WooCommerce price decimals; server normalizes to \u00f6re.<\/li>\n<li>Fix: Server accepts <code>bankAccountCode<\/code> for both cash and invoice documents to satisfy the Bokio API.<\/li>\n<li>Compliance: PHPCS fixes (translators comments, placeholder ordering, escaping, prefixed globals).<\/li>\n<\/ul>\n\n<h4>1.0.12<\/h4>\n\n<ul>\n<li>Added: Order notes now show export status (success\/error) with invoice IDs.<\/li>\n<li>Added: Norwegian (Bokm\u00e5l) translation.<\/li>\n<li>Improved: Notifications now fetch quota from Peki server automatically.<\/li>\n<li>Improved: Dismiss notifications reset when usage values change.<\/li>\n<li>Fix: Removed unsupported API parameters causing 400 errors.<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Fix: Bank account mapping functionality improved.<\/li>\n<li>Fix: Admin notifications dismiss handling.<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>Fix: Free-plan \u201climit reached (15)\u201d notice now triggers only when remaining == 0 (or used &gt;= limit if remaining is unknown). Prevents premature hard-stop banners.<\/li>\n<li>Tweak: Soft warning shows at ~10\/15 only when usage can be derived (used or remaining known).<\/li>\n<li>Hardening: Safer parsing of quota options (treat empty\/false as unset) to avoid misreads.<\/li>\n<li>UX: Dismiss keys are period-scoped; notices respect monthly reset.<\/li>\n<li>Internals: Prefer fresh server quota; fall back to cached status only when necessary.<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Added: Support for VAT code 52.<\/li>\n<li>Improved: Stability of admin notices (dismiss handling and consistent display).<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Fix: Refund bugs resolved for better accuracy and compatibility.<\/li>\n<li>Fix: Account mapping improvements.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Improvement: Refund handling refined for better accuracy and compatibility.<\/li>\n<li>Feature: Added setting to disable VAT (MVA) when needed.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Fix: PHPCS warnings resolved for OAuth callback handling and webhook signature validation.<\/li>\n<li>Improvement: Enhanced installation instructions with mandatory Bokio API activation and first invoice creation.<\/li>\n<li>Docs: Clarified that Bokio invoice counter and customer counter must be initialized before the API integration works.<\/li>\n<li>Security: Proper sanitization and unslashing of server variables in webhook endpoint.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fix: Duplicate \u201cConnect to Bokio\u201d notice; render guarded to run once per request.<\/li>\n<li>Improvement: Quota notices now read from cached server status (shared per <code>company_slug<\/code>), with webhook\/cron refresh.<\/li>\n<li>Docs: Added Bokio API requirements and first-invoice note; clarified multi-site behavior and pricing plans.<\/li>\n<li>Meta: Bumped \u201cTested up to\u201d to 6.8; updated Stable tag.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Docs: English-only readme per WordPress.org requirements; improved SEO wording for WooCommerce\/Bokio integration.<\/li>\n<li>Product: Clarified free tier (15 transfers\/month) and option to upgrade to unlimited.<\/li>\n<li>Docs: Removed references to manual \u201cSend to Bokio\u201d actions and subscription support (not available).<\/li>\n<li>Link: Updated to https:\/\/peki.no\/bokio in the description.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Compliance: Neutralized upgrade\/plan wording; \u201cManage Subscription\u201d link only.<\/li>\n<li>Security: Reviewed nonce and capability checks in connect\/disconnect flows.<\/li>\n<li>Prefix: Migrated internal keys to <code>pekibokio_<\/code> with legacy fallbacks.<\/li>\n<li>API: Plan\/limits decided by remote service; plugin surfaces neutral errors.<\/li>\n<li>Docs: Expanded \u201cExternal services.\u201d<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Documentation updates and refund handling improvements.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First public release.<\/li>\n<\/ul>","raw_excerpt":"Connect WooCommerce to Bokio to export orders automatically and keep ledgers, VAT, and documentation in sync.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/265578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=265578"}],"author":[{"embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/peki"}],"wp:attachment":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=265578"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=265578"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=265578"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=265578"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=265578"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=265578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}