WP Admin Design System

Tokens, typography, and components for WordPress admin plugins.
Scope: .wads wrapper — Amber Bronze accent — Lora + Plus Jakarta Sans

Color Tokens

accent
accent-hover
accent-light
bg
surface
surface-alt
text
text-2
text-muted
success
warning
danger

Typography

Heading 1 — Lora Semibold

Heading 2 — Built for serious work

Heading 3 — Document engine ready

Heading 4 — Settings & Configuration

Heading 5 — Webhook events
Heading 6 — Meta information

Lead paragraph — This is a lead text that introduces a section with a slightly larger, relaxed line height for comfortable reading in an admin context.

Body text — Regular paragraph with anchor link, bold text, and italic copy. Designed for readability at small sizes in the WordPress admin environment.

Muted text — Used for secondary information, timestamps, and peripheral details that support the main content without competing with it.

Caption label — Table headers, section labels

Inline code: $order->get_meta('_bsale_document_id')

// PHP example
$payload = [
    'codeSii'     => 39,
    'referenceId' => 'woo_' . $order->get_id(),
    'dispatch'    => 1,
];
Blockquote — used for important notes, warnings, or quoted content that needs visual separation from the surrounding text.

Buttons

Badges

Default Accent Active Pending Failed Info
Processing Queued Error
Pro Issued Void

Notices

Document issued successfully Boleta #3421 was created in Bsale and attached to order #1055.
Stock sync incomplete 48 of 52 products were updated. 4 SKUs were not found in Bsale.
API connection failed Could not reach Bsale API. Check your token and sandbox setting.
Webhook registered Company ID 8849 was registered from the first incoming webhook.
This feature is only available in the Pro edition. Upgrade

Form Elements

API Configuration

Connect your Bsale account

Found in Bsale → Settings → API access.
This token format is not valid.

Tabs

General settings content — API token, document type, dispatch mode.
Offices & multi-office mapping for Pro edition.
Webhook secret, company ID, debug log.
DTE generation logs with filter by status and date.

Table

Order Document Type Status Attempts Actions
#1055 3421 / Folio 3421 Boleta Issued 1
#1054 Factura Pending 2
#1053 Boleta Failed 3
#1052 3418 Nota crédito Void 1

Settings Page Layout

Bsale DTE Settings

Configure your WooCommerce integration with Bsale electronic documents.

Pro

API Connection

Credentials and environment for the Bsale API.

Access Token Your Bsale API token. Keep it secret.
Sandbox Mode Use api.bsale.dev instead of api.bsale.cl.
Default Office Bsale office ID for document issuance.

Stat Cards & Progress

Documents Issued 1,284 +12% this month
Pending Retry 4 Next attempt in 15 min
Stock Synced 98.2% Last sync 2 min ago
Webhook Events 307 Today
Stock sync progress 482 / 520
DTE success rate 99.3%
Failed documents 3 / 50

Modal

Empty State & Spinner

No documents yet

Documents will appear here once orders are completed and DTEs are generated in Bsale.

Syncing stock from Bsale…

Accordion

When a DTE fails to generate, it's queued for automatic retry. The Pro edition retries up to 3 times with exponential backoff: 15 min, 1 hour, and 6 hours. After 3 attempts, the document is marked as permanently failed and an admin notice is shown.

The cpnId is Bsale's company identifier. The first valid webhook registers it automatically. All subsequent webhooks from a different company are rejected with HTTP 403 to prevent data mixing. To reset it, delete the bsale_dte_cpn_id option from the database.

Sandbox uses api.bsale.dev. Documents created there don't go to SII and don't generate real folios. Always test in sandbox before going live. Your sandbox token and production token are different — check your Bsale account.

Dropdown Menu

Search & Chips

All types Boleta Factura Issued Failed

Breadcrumbs & Pagination

Key-Value List & Timeline

Document details

Order ID
#1055
Bsale ID
3421
Type
Boleta (codeSii 39)
Status
Issued
Attempts
1
Created
2026-03-16 14:22:03

Activity timeline

Document issued 14:22:03
Boleta #3421 generated and sent to SII.
Retry attempt 2 12:08:15
API timeout. Queued for next attempt.
First attempt failed 11:05:42
Invalid token. Check API credentials.
Order completed 11:05:10
WooCommerce order #1055 marked as complete.

Callout & Steps

Before going live

Make sure to test your full order flow in sandbox mode first. Switch to production only when you've confirmed boletas and facturas generate correctly, stock decrements as expected, and webhook events are received.

Pro feature: Multi-office routing

Map WooCommerce shipping methods to different Bsale offices. Orders shipped via "Store Pickup" can generate documents from a different office than "Home Delivery" orders.

API Token
Test Connection
3
Office Setup
4
Go Live

Copy Block & API Reference

Copy
require "vendor/autoload.php";
use UserDOMP\WpAdminDS\Components;

add_action("admin_enqueue_scripts", function() {
    DesignSystem::enqueue(DesignSystem::assets_url(__FILE__));
});
Components::button()
Render a button. Variants: primary, secondary, ghost, danger.
Components::notice()
Alert/notice block. Types: success, warning, danger, info, neutral.
Components::settings_section()
Full settings section with header, rows, and save footer.
Components::card()
Card with optional header, body, and footer slots.
Components::form_group()
Label + control + hint + error wrapper.
Components::kv_list()
Key-value table for document details, order meta, etc.