Jami
v0.3.0Jami creator payouts for your agent: ETB checkouts, orders, payouts, webhooks.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
jami_create_checkout Create checkout
Start a checkout and get back how the buyer pays — either for one of the organization's published products, or for ANY amount with no product ("charge this buyer 1,237 ETB for order #1042"). Buyers pay in ETB via Telebirr, M-Pesa or CBE Birr; nothing is added on top. In LIVE mode a "direct" checkout pushes a real payment prompt to the buyer's phone, so only call this when the user actually wants to charge someone. What to charge: - Product: product_id (p_… token or 24-char id, must be published). amount_minor only for flexible-price (pwyw) products. - Custom amount: omit product_id,…
| Parameter | Type | Description |
|---|---|---|
amount_minor | integer | Integer santim. Required for custom amounts (≥ 100) and pay-what-you-want products; ignored for fixed prices |
checkout_link | string | Checkout link token (cl_…) to attribute this session to |
collected_fields | object | Answers to the product's checkout fields, keyed by field id |
customer_email | string | Buyer email for the receipt. Required with gateway; optional for a payment link |
customer_external_id | string | Your own user id, stored on the customer record |
customer_name | string | |
customer_phone | string | Buyer phone, e.g. "251911223344" |
description | string | Custom amount only: what the buyer is paying for, e.g. "Order #1042" |
gateway | string | Payment method for paid products |
metadata | object | Your own key/values, returned on order webhooks (max 20 keys) |
product_id | string | Product token (p_…) or id. Omit for a custom-amount checkout. |
success_url | string | Where to send the buyer after paying |
jami_get_checkout_status Get checkout status
Check a checkout session once. The server reconciles with the payment provider on every call, so this resolves even when webhooks are late. Args: - session_id: from jami_create_checkout. Returns: { session_id, status: 'open' | 'completed' | 'expired', order_id, order_status, amount_minor, amount, expires_at, failure }. When status is 'expired', failure.code explains why: payment_rejected · payment_failed · payment_canceled · payment_timed_out · initiate_failed · session_expired. Use jami_wait_for_checkout instead if you want to block until the buyer finishes.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Checkout session id returned by jami_create_checkout, e.g. "6710c2e8b1a2f0012ab34cd9" |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_wait_for_checkout Wait for checkout
Poll a checkout session until it's paid or ends, up to timeout_seconds. Reports progress while it waits. If the buyer hasn't finished when the timeout hits, this returns status 'open' (not an error) — call it again to keep waiting. Sessions expire 30 minutes after creation. Args: - session_id: from jami_create_checkout. - timeout_seconds: 5–300 (default 90). - interval_seconds: 2–30 between polls (default 3). Returns the same shape as jami_get_checkout_status.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Checkout session id returned by jami_create_checkout, e.g. "6710c2e8b1a2f0012ab34cd9" |
interval_seconds | integer | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
timeout_seconds | integer |
jami_create_product Create product
Create a product the organization sells, and get its public Jami page (url) and p_… token. Published by default, so the page and checkouts work immediately. Pricing (can't be changed after creation; the amounts can): - fixed: amount_minor is the price, e.g. 250000 = 2,500.00 ETB. - pwyw (flexible): minimum_amount_minor; each checkout then sends its own amount. - free: no price. Subscription plans: product_type 'recurring' + pricing_model 'fixed' + billing_interval ('week' | 'month' | 'year') and optional interval_count (default 1; ≤ 52 weeks, ≤ 12 months, 1 year). amount_minor is…
| Parameter | Type | Description |
|---|---|---|
pricing_model * | string | |
title * | string | |
amount_minor | integer | Fixed price in santim |
billing_interval | string | Recurring only: how often the payer's wallet is charged |
description | string | |
interval_count | integer | Recurring only: periods per charge (default 1), e.g. 3 + month = every 3 months |
minimum_amount_minor | integer | Flexible price floor in santim |
product_type | string | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
status | string |
jami_update_product Update product
Change a product's title, description, status or price amount. The pricing model itself is locked. Args: product_id (p_… token or id), and any of: title, description, status ('published' | 'draft' | 'archived' — archived stops new sales), amount_minor (fixed price), minimum_amount_minor (flexible floor).
| Parameter | Type | Description |
|---|---|---|
product_id * | string | Product p_… token or id |
amount_minor | integer | |
description | string | |
minimum_amount_minor | integer | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
status | string | |
title | string |
jami_get_product Get product
Fetch one product by its p_… token or id: price, status, its public page url, and for a subscription plan its billing interval. Args: - product_id: p_… token or 24-character id. Returns: { product_id, token, url, title, status, pricing_model, product_type, billing_interval, interval_count, price }.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | Product p_… token or id |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_list_products List products
List the organization's products, newest first. Args: status ('published' | 'draft' | 'archived', optional), page (default 1), limit 1–100 (default 20). Returns: { products: [{ product_id, token, url, title, status, pricing_model, price }], total, page, limit, count, has_more, next_page }.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
page | integer | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
status | string |
jami_create_subscription_link Create subscription link
Create a hosted subscribe link for a recurring product (a plan made with jami_create_product product_type 'recurring'). Send the link to the payer. Nothing is charged by this call. An API key can only PROPOSE a subscription: the payer opens the link, signs in to Jami, reviews the plan, amount and cadence, and approves with their Jami wallet PIN. Only then is the first period charged from their Jami wallet; Jami renews it every period after that until either side cancels. The link is single use and valid 24 hours. Args: - product_id: the recurring product's p_… token or id (must be publis…
| Parameter | Type | Description |
|---|---|---|
product_id * | string | Recurring product p_… token or id |
cancel_url | string | |
customer_email | string | |
customer_external_id | string | |
metadata | object | Your own key/values, copied onto the subscription (max 20 keys) |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
success_url | string |
jami_list_subscriptions List subscriptions
List the organization's wallet subscriptions, newest first. Args: - status: 'active' | 'past_due' | 'canceled' (optional). past_due = a renewal failed and is being retried. - product_id: optional p_… token or id of the plan. - customer_external_id: optional, your own user id passed when the link was created. - page (default 1), limit 1–100 (default 20). Returns: { subscriptions: [{ subscription_id, status, product_title, amount_minor, cadence, next_charge_at, customer_email, … }], total, page, limit, count, has_more, next_page }.
| Parameter | Type | Description |
|---|---|---|
customer_external_id | string | |
limit | integer | |
page | integer | |
product_id | string | Recurring product p_… token or id |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
status | string |
jami_get_subscription Get subscription
Fetch one wallet subscription with its newest 24 charges (one per billing period) — use it to see why a renewal failed or when the next one runs. Args: - subscription_id: the sub_… id. Returns: { subscription: { subscription_id, status, amount_minor, cadence, current_period_end, next_charge_at, cancel_at_period_end, cancellation_reason, last_failure, … }, charges: [{ charge_id, sequence, status, amount_minor, failure, order_id, paid_at }] }. Failure codes: insufficient_funds, kyc_required, payer_unavailable, simulated_failure, internal_error.
| Parameter | Type | Description |
|---|---|---|
subscription_id * | string | Subscription id, e.g. "sub_9f2kQ…" from jami_list_subscriptions or a subscription.* webhook |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_cancel_subscription Cancel subscription
Cancel a wallet subscription so the payer is not charged again. Confirm with the user first — a cancel the payer didn't ask for loses a customer, and there are no refunds. Args: - subscription_id: the sub_… id. - at_period_end: default true — no more charges, and it ends at current_period_end (the payer keeps what they paid for). You can undo this kind of cancel before then with jami_resume_subscription. false ends it immediately (a past_due subscription always ends immediately). Returns the updated subscription: { subscription_id, status, cancel_at_period_end, ended_at, cancellati…
| Parameter | Type | Description |
|---|---|---|
subscription_id * | string | Subscription id, e.g. "sub_9f2kQ…" from jami_list_subscriptions or a subscription.* webhook |
at_period_end | boolean | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_resume_subscription Resume subscription
Undo a cancel that YOU scheduled (jami_cancel_subscription with at_period_end true), so the subscription keeps renewing at next_charge_at. Only works on a cancel the organization scheduled and while the subscription hasn't ended yet. A cancel the customer made can't be undone by the organization (the payer has to subscribe again), and an ended subscription can't be resumed — both return 409 not_allowed. Args: - subscription_id: the sub_… id. Returns the updated subscription: { subscription_id, status, cancel_at_period_end: false, next_charge_at, … }. Idempotent: resuming an already-…
| Parameter | Type | Description |
|---|---|---|
subscription_id * | string | Subscription id, e.g. "sub_9f2kQ…" from jami_list_subscriptions or a subscription.* webhook |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_simulate_subscription_renewal Simulate subscription renewal
Sandbox only: run a subscription's next renewal right now, succeeding or failing, to test subscription.renewed / subscription.payment_failed / subscription.canceled handling without waiting a billing period. No money moves. Refused with a live (jamidev_live_) token — live renewals only run on schedule. Args: - subscription_id: the sub_… id of a sandbox subscription. - outcome: 'success' (default) or 'failure'. Failures follow the real dunning schedule: retries at 1, 3 and 7 days, then the subscription is canceled with cancellation_reason payment_failed. Returns: { result: 'renewed'…
| Parameter | Type | Description |
|---|---|---|
subscription_id * | string | Subscription id, e.g. "sub_9f2kQ…" from jami_list_subscriptions or a subscription.* webhook |
outcome | string | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_list_orders List orders
List the organization's orders, newest first, one page at a time. Args: - status: 'paid' | 'pending' | 'failed' (optional filter). - page: 1-based page (default 1). - limit: 1–100 per page (default 20). Returns: { orders: [{ order_id, status, amount_minor, amount, product: { id, title }, customer: { id, email, name }, paid_at, created_at, metadata }], total, page, limit, count, has_more, next_page }. To total revenue or find a specific buyer, page through with next_page until has_more is false. Amounts are integer santim (100 = 1.00 ETB); this is what buyers paid, before any withdra…
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
page | integer | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
status | string |
jami_get_balance Get balance
Get the organization's withdrawable JamiDev earnings — the ceiling on what jami_create_withdrawal can pay out. Returns: { balance_minor, balance, eligible, currency }. eligible is false (and balance 0) when the org can't withdraw yet: it's a sandbox org, Developer Mode is off, or KYC isn't approved. The money itself sits in the owner's unified Jami wallet, so a withdrawal can still fail with 402 if that wallet was spent elsewhere.
| Parameter | Type | Description |
|---|---|---|
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_quote_withdrawal Quote withdrawal
Preview what reaches the destination for a withdrawal — offline, no API call, works without a token. The JamiDev usage fee (7% unless Jami set a custom rate on the account) and any government tax are cut FROM the amount: you withdraw amount, the account receives net. Rounding is round-half-up per component. The server is authoritative; the real breakdown comes back on the withdrawal. Args: - amount_minor: gross santim (min 10000 = 100.00 ETB). - fee_rate / tax_rate: optional overrides (0–1) if you know the account's real rates. Returns the breakdown plus whether the amount auto-pays…
| Parameter | Type | Description |
|---|---|---|
amount_minor * | integer | Gross amount in integer santim — the fee is cut from this. 10000 = 100.00 ETB (the minimum). |
fee_rate | number | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
tax_rate | number |
jami_get_withdrawal Get withdrawal
Fetch one withdrawal by id to track it from pending → processing → completed (or rejected). Args: - withdrawal_id: from jami_create_withdrawal or jami_list_withdrawals.
| Parameter | Type | Description |
|---|---|---|
withdrawal_id * | string | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
jami_list_withdrawals List withdrawals
List the organization's withdrawals, newest first. Args: - status: 'pending' | 'reviewing' | 'approved' | 'rejected' | 'processing' | 'completed' (optional). - page (default 1), limit 1–100 (default 20). Returns: { withdrawals: [...], total, page, limit, count, has_more, next_page }.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
page | integer | |
response_format | string | 'markdown' (default) for a readable summary, 'json' for the full structured payload |
status | string |
jami_verify_webhook Verify webhook
Check whether a webhook delivery is genuine — the same timing-safe HMAC check and replay guard the SDK runs. Use it to debug "signature mismatch" errors in a handler. Args: - payload: the RAW request body exactly as received (not re-serialized JSON — whitespace matters). - signature: the X-JamiDev-Signature header, "t=<unix>,v1=<hex>". - secret: the subscription's webhook secret (defaults to JAMI_WEBHOOK_SECRET). - tolerance_seconds: max age of the timestamp (default 300). Raise it to check an old captured delivery. Returns: { valid, reason, event_type, event_id, livemode }. An i…
| Parameter | Type | Description |
|---|---|---|
payload * | string | Raw request body |
signature * | string | X-JamiDev-Signature header value |
secret | string | |
tolerance_seconds | integer |
jami_create_test_webhook Create test webhook
Build a correctly signed JamiDev webhook delivery for testing a handler locally — no real event needed. Args: - type: 'order.created' | 'order.completed' | 'benefit.granted' | 'checkout.session.expired' | 'withdrawal.paid' | 'withdrawal.failed' | 'subscription.created' | 'subscription.renewed' | 'subscription.payment_failed' | 'subscription.updated' | 'subscription.canceled'. - secret: signing secret (defaults to JAMI_WEBHOOK_SECRET; any string works for a local test). - data: optional fields to merge over the realistic sample payload. - livemode: default false (sandbox). - target…
| Parameter | Type | Description |
|---|---|---|
type * | string | |
data | object | |
livemode | boolean | |
secret | string | |
target_url | string |
jami_search_docs Search Jami docs
Search the official JamiDev developer docs (https://dev.jami.bio/docs) — the source of truth for integrating Jami payments. Works without an API token. Use this before writing integration code: SDK usage, REST endpoints, webhooks and signature checks, sandbox magic numbers, Sign in with Jami (OAuth/OIDC), the wallet API, the browser storefront, fees and limits. Args: - query: what you need, e.g. "verify webhook signature express", "pay what you want amount", "withdrawal fee". - limit: 1–10 results (default 5). Returns: { results: [{ title, path, url, snippet }] }. Read a full page w…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer |
jami_read_doc Read Jami doc page
Read one JamiDev docs page as markdown, with every code sample intact. Args: - path: a docs path from jami_search_docs, e.g. "/docs/webhooks", "api/checkout", or a full URL. Use "/docs" for the overview. - offset: character offset for long pages (default 0); the result says where to continue. Returns: { title, url, markdown, offset, next_offset? }.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
offset | integer |