Skip to main content

concinno-skills-commerce

Commerce agent skills for Concinno — Shopify + Stripe + QuickBooks Online. Commerce agents need three systems-of-record (storefront, payments, accounting) end-to-end; this package lands all three as a single plugin, fourth in the concinno-skills-* ecosystem after concinno-skills-chat, concinno-skills-google, and concinno-skills-crm.

Status

MVP (0.1.0) — five tools, three ecosystems:

Tool class Platform Underlying SDK SDK licence
ShopifyOrder Shopify ShopifyAPI MIT
ShopifyProduct Shopify ShopifyAPI MIT
StripePayment Stripe stripe MIT
StripeCustomer Stripe stripe MIT
QuickBooksInvoice QuickBooks intuit-oauth + httpx Apache-2.0 + BSD

python-quickbooks was considered for QuickBooks but it ships under OSL-3.0 (copyleft); we depend on the permissive intuit-oauth auth SDK plus a thin httpx REST wrapper instead so downstream users are never forced into OSL-3.0 terms.

WooCommerce / BigCommerce / Xero are deferred to 0.2.x.

Install

pip install concinno-skills-commerce

All three SDKs plus httpx are hard dependencies and pulled in automatically.

Credentials

Tokens live under well-known keys in the Concinno CredentialStore, which reads (in order):

  1. Runtime overrides via CredentialStore.set(...).
  2. Env var CONCINNO_CRED_<UPPER_KEY>.
  3. ~/.concinno/credentials.json.

Shopify

Key Env var
shopify_shop_url CONCINNO_CRED_SHOPIFY_SHOP_URL
shopify_access_token CONCINNO_CRED_SHOPIFY_ACCESS_TOKEN

shopify_shop_url takes the my-store.myshopify.com form. Produce the Admin API access token via Shopify admin → Settings → Apps and sales channels → Develop apps → Custom app → API credentials (or an OAuth install for a public app).

Stripe

Key Env var
stripe_api_key CONCINNO_CRED_STRIPE_API_KEY

Use a secret key (sk_live_... for production, sk_test_... for the Stripe test mode). Publishable keys (pk_...) are not accepted — all five Stripe actions in the MVP require the secret key scope.

QuickBooks Online

Key Env var
quickbooks_access_token CONCINNO_CRED_QUICKBOOKS_ACCESS_TOKEN
quickbooks_realm_id CONCINNO_CRED_QUICKBOOKS_REALM_ID
quickbooks_environment CONCINNO_CRED_QUICKBOOKS_ENVIRONMENT

quickbooks_environment is "sandbox" (default) or "production". An OAuth2 access token is required; token refresh is intentionally out-of-scope for the MVP — run your token mint / refresh flow in a separate process and push the current access token into the CredentialStore. A dedicated concinno-quickbooks-auth CLI will land when enough users ask for it.

Example ~/.concinno/credentials.json:

{
  "shopify_shop_url": "my-store.myshopify.com",
  "shopify_access_token": "shpat_...",
  "stripe_api_key": "sk_test_...",
  "quickbooks_access_token": "eyJ...",
  "quickbooks_realm_id": "9341454...",
  "quickbooks_environment": "sandbox"
}

Missing credentials return {"error": "no <service> credentials — set via CredentialStore / env ..."} rather than crashing.

Usage via Concinno ToolRegistry

When the consumer sets CONCINNO_LOAD_PLUGINS=1, the default registry auto-mounts every commerce tool:

import os
os.environ["CONCINNO_LOAD_PLUGINS"] = "1"

from concinno.tools.registry import get_default_registry

reg = get_default_registry()
assert {
    "ShopifyOrder",
    "ShopifyProduct",
    "StripePayment",
    "StripeCustomer",
    "QuickBooksInvoice",
} <= set(reg.list_deferred())

Direct Python usage

from concinno_skills_commerce import (
    ShopifyOrder,
    ShopifyProduct,
    StripePayment,
    StripeCustomer,
    QuickBooksInvoice,
)

ShopifyOrder().call(action="list", limit=20, filters={"status": "open"})
ShopifyOrder().call(action="fulfill", order_id=123456789,
                    tracking_number="1Z999",
                    tracking_company="UPS")

ShopifyProduct().call(action="create",
                      data={"title": "New product", "vendor": "Acme"})

StripePayment().call(
    action="create",
    amount=5000,        # 5000 cents = USD $50
    currency="usd",
    customer="cus_...",
    description="Order #1001",
)
StripePayment().call(
    action="refund",
    payment_intent_id="pi_...",
    refund_amount=5000,  # partial; omit for full refund
)

StripeCustomer().call(action="create",
                      email="a@b.com",
                      name="A. Customer")

QuickBooksInvoice().call(
    action="create",
    CustomerRef={"value": "1"},
    Line=[
        {
            "Amount": 100.0,
            "DetailType": "SalesItemLineDetail",
            "SalesItemLineDetail": {"ItemRef": {"value": "1"}},
        }
    ],
    TxnDate="2026-04-22",
)
QuickBooksInvoice().call(
    action="query",
    query="SELECT * FROM Invoice WHERE TxnDate > '2026-01-01'",
)

All tools return {"ok": True, ...} (or {"results": [...]} for list) on success and {"error": "..."} on failure — same shape as every other Concinno built-in tool. No exceptions escape call().

Concurrency

All five tools set is_concurrency_safe = False. Two reasons:

  • ShopifyShopifyAPI uses a thread-local session singleton (shopify.ShopifyResource.activate_session); parallel calls from the same process would corrupt that state.
  • Stripe — the stripe module stores the API key on a module- level global (stripe.api_key); mixing keys across threads is unsafe.
  • QuickBooks — each call mints its own short-lived httpx.Client, which is thread-safe in isolation, but QBO's per-realm bucket rate limiter benefits from serial access while the token is rotating.

Safety notes

  • Stripe create warn-logs when amount exceeds 1_000_000 cents (~USD $10 000). A mis-typed amount is the single largest foot-gun on payment APIs.
  • Stripe refund always warn-logs because the refund is irreversible once Stripe processes it.
  • list actions cap page size at 250 (Shopify) / 100 (Stripe) / 1000 (QuickBooks). Cursor-based list_all pagination lands in 0.2.x.
  • QuickBooks writes target whichever environment the CredentialStore holds. The default is "sandbox", so a freshly- installed CLI cannot accidentally hit production until the operator flips the value explicitly.

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

concinno_skills_commerce-0.1.0.tar.gz (50.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

concinno_skills_commerce-0.1.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file concinno_skills_commerce-0.1.0.tar.gz.

File metadata

  • Download URL: concinno_skills_commerce-0.1.0.tar.gz
  • Upload date:
  • Size: 50.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for concinno_skills_commerce-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6256792cf279aff58c5b6907d520bae75774109c02974e82ab797478a1d1fdd6
MD5 ddbefb7f70d028ba79dfd7f0438bcc55
BLAKE2b-256 98fdfbf1604312a48fa12c7c3906331dd47e46edf8af02f48ef0e292bd5f7318

See more details on using hashes here.

File details

Details for the file concinno_skills_commerce-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for concinno_skills_commerce-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afd02e74f6f1740735282b055528b1a25a44380fc031a60a2adbccc4eb59474c
MD5 a5899ddb8d6913824388ea1986c5ef2c
BLAKE2b-256 5cf1b3146e67c278d3d68aa77b1732c0a12e5ad1b6e9948d61ab475c2542bb51

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page