Skip to main content

forjio-serront

Typed Python client for the serront.com services-storefront REST API.

pip install forjio-serront
from forjio_serront import SerrontClient

# Bearer token from token= or the SERRONT_TOKEN env var — use an
# sk_live_... API key from Dashboard -> Settings -> API keys.
client = SerrontClient(token="sk_live_xxx")

# Storefront — the seller's public profile
settings = client.storefront.get()  # None until the first put
client.storefront.put(
    slug="studio-renata",
    display_name="Studio Renata",
    bio="Brand & logo design studio.",
    whatsapp_number="+628120000000",
    manual_bank_accounts=[
        {"bankName": "BCA", "accountNumber": "1234567890", "accountHolder": "Renata"}
    ],
    published=True,
)

# Services — the catalog (fixed / hourly / package pricing)
services = client.services.list()
svc = client.services.create(
    slug="logo-design",
    name="Logo design",
    pricing_type="package",
    packages=[
        {"name": "Basic", "priceIdr": 500_000},
        {"name": "Full identity", "priceIdr": 2_500_000},
    ],
)
client.services.update(svc["id"], sort_order=1)

# Orders — the order desk
page = client.orders.list(status="requested", payment_status="payment_claimed", q="wedding")
order = client.orders.get(page["orders"][0]["id"])  # + full thread
client.orders.reply(order["id"], body="On it!", is_internal=False)
client.orders.update(order["id"], status="confirmed", quoted_price_idr=750_000)
client.orders.confirm_payment(order["id"])
proof = client.orders.download_proof(order["id"])  # {"data": bytes, "contentType"}

# Modules — Payment (Plugipay) / Marketing (Ripllo) integrations
modules = client.modules.get()
client.modules.set(payment=True)

# Ledger + payouts (Plugipay-held; Payment module required)
balance = client.ledger.balance()
entries = client.ledger.entries(limit=20)
payouts = client.payouts.list(status="pending")
payout = client.payouts.create(amount=1_000_000)
client.payouts.cancel(payout["id"])

# API keys + webhook subscriptions
keys = client.api_keys.list()
created = client.api_keys.create(name="ci")  # created["key"] shown ONCE
hook = client.webhook_subscriptions.create(
    url="https://example.com/serront-hook",
    events=["serront.order.created.v1"],
)  # hook["secret"] shown ONCE

# Billing — current plan + upgrade checkout (tiers: free / starter / growth / business)
info = client.billing.get()
out = client.billing.checkout("starter")  # redirect the browser to out["hostedUrl"]

# Public (buyer) surface — no token required
view = client.public.get_storefront("studio-renata")
placed = client.public.create_order(
    "studio-renata",
    service_slug="logo-design",
    package_name="Basic",
    buyer_name="Budi",
    buyer_email="budi@example.com",
    discount_code="WELCOME10",  # Marketing module
)
check = client.public.validate_discount("studio-renata", code="WELCOME10", price_idr=500_000)
my_order = client.public.get_order(placed["accessToken"])
client.public.reply_order(placed["accessToken"], body="Any update?")
with open("transfer.png", "rb") as f:
    client.public.upload_proof(placed["accessToken"], data=f.read(), content_type="image/png")
client.public.claim_payment(placed["accessToken"])  # "I have transferred"
pay = client.public.pay(placed["accessToken"])  # Payment module -> hostedUrl

Endpoints covered

Namespace Methods
storefront get, put (slug / display / bio / WhatsApp / bank accounts / branding / publish)
services list, create (403 LIMIT_REACHED past the tier's service limit), get, update, delete (409 while orders reference it)
orders list (status / payment_status / service_id / q / limit / cursor + per-status counts), get, update (status and/or quoted_price_idr), reply (with is_internal), confirm_payment, download_proof
modules get, set (payment / marketing toggles; first enable provisions the partner workspace)
ledger balance, entries (cursor-paged; 409 PAYMENT_MODULE_DISABLED when off)
payouts list, create, cancel, balance, get_bank_account, update_bank_account, mark_in_transit, mark_paid, mark_failed
api_keys list, create (plaintext returned once), delete
webhook_subscriptions list, create (secret returned once), update (active), delete
billing get (subscription + effectiveTier + tier table), checkout(tier) -> hosted checkout URL
public get_storefront, create_order, validate_discount, get_order, reply_order, claim_payment, pay, upload_proof (no token)

Errors raise SerrontError carrying the API envelope's error.code (NOT_FOUND, VALIDATION_ERROR, LIMIT_REACHED, UPGRADE_REQUIRED, INVALID_TRANSITION, ...), the HTTP status, and the meta.requestId.

Family

Sister to:

Metadata

Release files for forjio-serront 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forjio-serront 0.1.0
File Size Uploaded
forjio_serront-0.1.0.tar.gz 10.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forjio-serront 0.1.0
File Interpreter ABI Platform
forjio_serront-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / forjio_serront-0.1.0.tar.gz

Download URL forjio_serront-0.1.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1647ad0ade712218c22a65cdce76d20e6c3b0853f9589c344b5e0d5330c14d41
BLAKE2b-256 checksum
How to use checksums
224010a91724a85b8998be2293c0d0a3658964bf75a22568884027438dc49839
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / forjio_serront-0.1.0-py3-none-any.whl

Download URL forjio_serront-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b7448ea31f47e327b32338c87e84d09ae8abcf201fe88c1ebff3ccef25e78b6
BLAKE2b-256 checksum
How to use checksums
e0d11ea66dc8c7a186267c84fcf844a65108d2501ba82136b01cae5609a492fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page