Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install uv
uses: astral-sh/[email protected]
with:
version: "0.12.20"
version: "0.12.22"

- name: Set up Python
run: uv python install 3.12
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Install uv
uses: astral-sh/[email protected]
with:
version: "0.12.20"
version: "0.12.22"

- name: Set up Python
run: uv python install ${{ matrix.python }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: astral-sh/[email protected]
with:
version: "0.12.20"
version: "0.12.22"

- name: Set version from tag
run: sed -i "s/^version = .*/version = \"${GITHUB_REF_NAME#v}\"/" pyproject.toml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: useblacksmith/checkout@v1
- uses: astral-sh/[email protected]
with:
version: "0.12.20"
version: "0.12.22"
- uses: actions/setup-python@v7
with:
python-version: "3.13"
Expand Down
2 changes: 1 addition & 1 deletion agentscore_commerce/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
``agentscore-py`` here. Don't add ``agentscore-py`` as a separate dep; the two can
drift versions and cause subtle type mismatches.

Use this for: programmatic API calls (sessions, credentials, reputation) and the
Use this for: programmatic API calls (assess, sessions, credentials) and the
test-mode address fixtures for integration tests.
"""

Expand Down
2 changes: 1 addition & 1 deletion agentscore_commerce/identity/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_gate_quota_info(request: HttpRequest) -> GateQuotaInfo | None:


class AgentScoreMiddleware:
"""Django middleware that gates requests based on AgentScore wallet reputation.
"""Django middleware that gates requests on an AgentScore identity and compliance assessment.

Usage in settings.py::

Expand Down
2 changes: 1 addition & 1 deletion agentscore_commerce/identity/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def _default_aip_on_denied(_request: Request, body: AipErrorBody) -> JSONR


class AgentScoreGate:
"""ASGI middleware that gates requests based on AgentScore wallet reputation.
"""ASGI middleware that gates requests on an AgentScore identity and compliance assessment.

Usage with Starlette / FastAPI::

Expand Down
5 changes: 0 additions & 5 deletions agentscore_commerce/identity/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
# doesn't re-shape them into local dataclasses, same as policy_result / account_verification.
from agentscore.types import AipProvenance, AipSignatureMaterial

# Reputation-API types (Activity, Classification, Identity, Reputation, ScoreDetail,
# Grade, ScoreStatus) live in agentscore-py — not re-exported here. Commerce SDK is
# scoped to gate + payment + 402 + discovery; reputation lookups belong to the
# AgentScore SDK. Import via `from agentscore import Activity, Classification, ...`.

DenialCode = Literal[
"wallet_not_trusted",
"missing_identity",
Expand Down
2 changes: 1 addition & 1 deletion agentscore_commerce/stripe_multichain/payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _create_multichain_payment_intent_once(
params: dict[str, Any] = {
"amount": amount,
"currency": currency,
"payment_method_types": ["crypto"],
"allowed_payment_method_types": ["crypto"],
"payment_method_data": {"type": "crypto"},
"payment_method_options": {
"crypto": {"mode": "deposit", "deposit_options": {"networks": resolved_networks}},
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ build-backend = "hatchling.build"

[project]
name = "agentscore-commerce"
version = "2.11.0"
version = "2.12.0"
description = "Agentic commerce SDK for Python: identity middleware (FastAPI, Flask, Django, AIOHTTP, Sanic, ASGI) + payment helpers + 402 builders + discovery + Stripe multichain. The full merchant-side toolkit for AgentScore-powered agentic commerce."
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
keywords = ["agentscore", "agent-commerce", "agentic-payments", "402", "x402", "mpp", "machine-payments-protocol", "fastapi", "starlette", "flask", "django", "aiohttp", "sanic", "middleware", "trust", "reputation", "kyc", "identity", "stripe", "tempo", "solana", "base", "ai-agent"]
keywords = ["agentscore", "agentic-commerce", "agentic-payments", "402", "x402", "mpp", "machine-payments-protocol", "fastapi", "starlette", "flask", "django", "aiohttp", "sanic", "middleware", "kyc", "identity", "stripe", "tempo", "solana", "base", "ai-agent"]
dependencies = [
"httpx>=0.25.0,<1.0.0",
"agentscore-py>=2.6.11",
"agentscore-py>=2.7.0",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
13 changes: 13 additions & 0 deletions tests/test_stripe_multichain.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ def test_create_multichain_payment_intent_extracts_addresses():
assert api.last_params["amount"] == 10000


# Stripe's 2026-09-30.preview API rejects payment_method_types ("no longer supported");
# allowed_payment_method_types is accepted on that version and on the earlier previews.
def test_create_multichain_payment_intent_restricts_to_crypto_with_allowed_types():
response = {
"id": "pi_types",
"next_action": {"crypto_display_details": {"deposit_addresses": {"base": {"address": "0xb"}}}},
}
api = _FakeAPI(response)
create_multichain_payment_intent(stripe=_FakeClient(api), amount=100)
assert api.last_params["allowed_payment_method_types"] == ["crypto"]
assert "payment_method_types" not in api.last_params


def test_create_multichain_payment_intent_raises_when_no_addresses():
from agentscore_commerce.errors import CheckoutValidationError

Expand Down
Loading
Loading