Skip to content

Commit 42ceac2

Browse files
author
Your Name
committed
docs: Fix critical README errors and clarify payment flow
- Fix class names: AgentGatePayClient → AgentGatePay (both SDKs) - Fix config parameter: baseUrl → apiUrl - Fix method names: submitPayment → submitTxHash, submit_payment → submit_tx_hash - Fix response property: mandate.token → mandate.mandateToken - Clarify budget tracking: USD equivalent across stablecoins - Clarify payment flow: clients pay in USDC/USDT/DAI on-chain - Update package descriptions: secure multi-chain cryptocurrency payment gateway - Add inline comments explaining stablecoin payment model
1 parent 7c1778a commit 42ceac2

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed

README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AgentGatePay SDKs
22

3-
Official JavaScript/TypeScript and Python SDKs for [AgentGatePay](https://api.agentgatepay.com) - Payment gateway for the agent economy.
3+
Official JavaScript/TypeScript and Python SDKs for [AgentGatePay](https://api.agentgatepay.com) - Secure multi-chain cryptocurrency payment gateway for AI agents and autonomous systems.
44

55
[![npm version](https://badge.fury.io/js/agentgatepay-sdk.svg)](https://www.npmjs.com/package/agentgatepay-sdk)
66
[![PyPI version](https://badge.fury.io/py/agentgatepay-sdk.svg)](https://pypi.org/project/agentgatepay-sdk/)
@@ -31,28 +31,29 @@ npm install agentgatepay-sdk
3131

3232
**Quick Start:**
3333
```typescript
34-
import { AgentGatePayClient } from 'agentgatepay-sdk';
34+
import { AgentGatePay } from 'agentgatepay-sdk';
3535

36-
const client = new AgentGatePayClient({
36+
const client = new AgentGatePay({
3737
apiKey: 'pk_live_...',
38-
baseUrl: 'https://api.agentgatepay.com'
38+
apiUrl: 'https://api.agentgatepay.com'
3939
});
4040

41-
// Issue a mandate
42-
const mandate = await client.mandates.issue({
43-
subject: 'my-agent-123',
44-
budget_usd: 100.0,
45-
scope: 'resource.read,payment.execute',
46-
ttl_minutes: 1440
47-
});
48-
49-
// Make a payment
50-
const payment = await client.payments.submitPayment({
51-
mandate_token: mandate.token,
52-
tx_hash: '0x...',
53-
chain: 'base',
54-
token: 'USDC'
55-
});
41+
// Issue a mandate (budget tracks spending in USD equivalent)
42+
const mandate = await client.mandates.issue(
43+
'my-agent-123', // subject
44+
100.0, // budget in USD (tracks value across USDC/USDT/DAI)
45+
'resource.read,payment.execute', // scope
46+
1440 // ttl_minutes
47+
);
48+
49+
// Make a payment (client pays in stablecoins: USDC, USDT, or DAI)
50+
const payment = await client.payments.submitTxHash(
51+
mandate.mandateToken, // mandate token
52+
'0x...', // blockchain tx_hash (client sends USDC/USDT/DAI)
53+
undefined, // tx_hash_commission (optional)
54+
'base', // chain (ethereum, base, polygon, arbitrum)
55+
'USDC' // token (USDC, USDT, or DAI)
56+
);
5657
```
5758

5859
📚 **[Full JavaScript Documentation](./javascript/README.md)**
@@ -68,27 +69,27 @@ pip install agentgatepay-sdk
6869

6970
**Quick Start:**
7071
```python
71-
from agentgatepay_sdk import AgentGatePayClient
72+
from agentgatepay_sdk import AgentGatePay
7273

73-
client = AgentGatePayClient(
74+
client = AgentGatePay(
7475
api_key='pk_live_...',
75-
base_url='https://api.agentgatepay.com'
76+
api_url='https://api.agentgatepay.com'
7677
)
7778

78-
# Issue a mandate
79+
# Issue a mandate (budget tracks spending in USD equivalent)
7980
mandate = client.mandates.issue(
8081
subject='my-agent-123',
81-
budget_usd=100.0,
82+
budget=100.0, # budget in USD (tracks value across USDC/USDT/DAI)
8283
scope='resource.read,payment.execute',
8384
ttl_minutes=1440
8485
)
8586

86-
# Make a payment
87-
payment = client.payments.submit_payment(
88-
mandate_token=mandate['token'],
89-
tx_hash='0x...',
90-
chain='base',
91-
token='USDC'
87+
# Make a payment (client pays in stablecoins: USDC, USDT, or DAI)
88+
payment = client.payments.submit_tx_hash(
89+
mandate=mandate['mandateToken'], # mandate token
90+
tx_hash='0x...', # blockchain tx_hash (client sends USDC/USDT/DAI)
91+
chain='base', # chain (ethereum, base, polygon, arbitrum)
92+
token='USDC' # token (USDC, USDT, or DAI)
9293
)
9394
```
9495

javascript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# agentgatepay-sdk
22

3-
Official JavaScript/TypeScript SDK for [AgentGatePay](https://agentgatepay.io) - Payment gateway for AI agents.
3+
Official JavaScript/TypeScript SDK for [AgentGatePay](https://agentgatepay.io) - Secure multi-chain cryptocurrency payment gateway for AI agents and autonomous systems.
44

55
[![npm version](https://img.shields.io/npm/v/agentgatepay-sdk.svg)](https://www.npmjs.com/package/agentgatepay-sdk)
66
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)

python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# agentgatepay-sdk
22

3-
Official Python SDK for [AgentGatePay](https://agentgatepay.io) - Payment gateway for AI agents.
3+
Official Python SDK for [AgentGatePay](https://agentgatepay.io) - Secure multi-chain cryptocurrency payment gateway for AI agents and autonomous systems.
44

55
[![PyPI version](https://img.shields.io/pypi/v/agentgatepay-sdk.svg)](https://pypi.org/project/agentgatepay-sdk/)
66
[![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/)

0 commit comments

Comments
 (0)