Commit 2c7a0e6
fix: Correct API field names for mandate issuance (v1.1.4)
CRITICAL BUG FIX - Mandate budget defaulting to $1.0 instead of user value
Root Cause:
- Python SDK v1.1.3 sent: {"budget": 100, "ttlMinutes": 10080}
- JavaScript SDK v1.1.3 sent: {"budget": 100, "ttlMinutes": 10080}
- Lambda expects: {"budget_usd": 100, "ttl_minutes": 10080}
- Result: Lambda defaulted budget_usd to 1.0, causing all ≥$1 payments to fail
Changes:
- Python SDK: Changed "budget" → "budget_usd", "ttlMinutes" → "ttl_minutes"
- JavaScript SDK: Changed request fields to match Lambda API expectations
- TypeScript types: Updated IssueMandateRequest interface
- Version bumped: 1.1.3 → 1.1.4 (both SDKs)
Impact:
- Fixes mandate budget tracking for LangChain, AutoGPT, and all SDK users
- Enables payments ≥$1.0 (previously rejected with "insufficient budget")
- Backward compatible: Lambda accepts both old and new field names
Files Changed:
- python/agentgatepay_sdk/modules/mandates.py (lines 36, 38)
- python/setup.py (version 1.1.4)
- python/pyproject.toml (version 1.1.4)
- javascript/src/modules/mandates.ts (lines 46-48, 70)
- javascript/src/types/index.ts (lines 121, 123)
- javascript/package.json (version 1.1.4)
Testing:
- Will test after GitHub Actions publishes to PyPI/npm
- Verify mandate with $100 budget creates correctly
- Verify ≥$1 payments succeed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent dce56af commit 2c7a0e6
6 files changed
Lines changed: 11 additions & 11 deletions
File tree
- javascript
- src
- modules
- types
- python
- agentgatepay_sdk/modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments