Complete API testing collection for AgentGatePay with all endpoints and example requests.
Download: AgentGatePay.postman_collection.json
Import to Postman:
- Open Postman
- Click "Import" button
- Drag and drop the JSON file
- Collection appears in left sidebar
Create a new environment with these variables:
| Variable | Description | Example Value |
|---|---|---|
api_url |
Base API URL | https://api.agentgatepay.com |
api_key |
Your API key | pk_live_abc123... |
mandate_token |
Current mandate token | eyJhbGc... |
wallet_address |
Your wallet address | 0xYour... |
Setup:
- Click "Environments" in Postman
- Click "+" to create new environment
- Add variables above
- Click "Save"
- Select environment from dropdown
Quick Test:
- Select "AgentGatePay" collection
- Click "Run" button
- Select requests to test
- Click "Run AgentGatePay"
Manual Testing:
- Open any request in collection
- Update variables if needed
- Click "Send"
- View response
GET /health- System health checkGET /x402/resource- Protected resource access
POST /mandates/issue- Issue AP2 mandatePOST /mandates/verify- Verify mandate token
POST /v1/users/signup- Create accountGET /v1/users/me- Get profilePOST /v1/users/wallets/add- Add wallet
POST /v1/api-keys/create- Create API keyGET /v1/api-keys/list- List API keysPOST /v1/api-keys/revoke- Revoke API key
GET /v1/payments/verify/{tx_hash}- Verify paymentGET /v1/payments/status/{tx_hash}- Payment statusGET /v1/payments/list- Payment history
POST /v1/webhooks/configure- Configure webhookGET /v1/webhooks/list- List webhooksPOST /v1/webhooks/test- Test webhookDELETE /v1/webhooks/{webhook_id}- Delete webhook
GET /v1/analytics/public- Public analyticsGET /v1/analytics/me- User analyticsGET /v1/merchant/revenue- Revenue analytics
GET /audit/logs- List audit logsGET /audit/stats- Audit statisticsGET /audit/logs/transaction/{tx_hash}- Transaction logs
POST https://mcp.agentgatepay.com/- Unified MCP endpoint
Step 1: Create Account
Request: POST /v1/users/signup
Body: {
"email": "test@example.com",
"password": "SecurePass123",
"account_type": "agent"
}
Response: Save api_key to environment variable
Step 2: Issue Mandate
Request: POST /mandates/issue
Headers: x-api-key: {{api_key}}
Body: {
"subject": "{{wallet_address}}",
"budget_usd": "10.00",
"scope": "research",
"ttl_minutes": 1440
}
Response: Save mandate_token to environment variable
Step 3: Verify Mandate
Request: POST /mandates/verify
Body: {
"mandate_token": "{{mandate_token}}"
}
Response: Check budget_remaining
Step 4: Request Resource (Get Payment Details)
Request: GET /x402/resource
Headers:
x-agent-id: test-agent
x-mandate: {{mandate_token}}
Query: ?chain=base&token=USDC
Response: Save receiver_address, amount_tokens
Step 5: Submit Payment
(Send blockchain transaction first using ethers.js/web3.py)
Request: GET /x402/resource
Headers:
x-agent-id: test-agent
x-mandate: {{mandate_token}}
x-payment: {"tx_hash":"0xYourTxHash","chain":"base","token":"USDC"}
Response: Access granted with resource data
Some requests have pre-request scripts that:
- Generate timestamps
- Create signatures
- Format payloads
- Update environment variables
Example - Auto-generate email:
pm.environment.set("test_email", `test-${Date.now()}@example.com`);Each request includes tests to validate responses:
// Status code test
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
// Response body test
pm.test("Response has mandate_token", function () {
var jsonData = pm.response.json();
pm.expect(jsonData).to.have.property('mandate_token');
});
// Save to environment
pm.test("Save mandate_token", function () {
var jsonData = pm.response.json();
pm.environment.set("mandate_token", jsonData.mandate_token);
});View test results:
- Click "Test Results" tab after running request
- Green checkmarks = passed tests
- Red X = failed tests
Run entire collection or specific folders:
Setup:
- Click "Runner" button (top right)
- Select "AgentGatePay" collection
- Select environment
- Configure iterations (default: 1)
- Add delay between requests (optional)
Run specific flow:
- Select folder (e.g., "Core Endpoints")
- Click "Run"
- View summary report
Export results:
- After run completes
- Click "Export Results"
- Save JSON report
Cause: Environment variable not set Solution:
- Run
/v1/users/signuprequest - Copy
api_keyfrom response - Add to environment variables
- Rerun request
Cause: Haven't issued mandate yet Solution:
- Run
/mandates/issuerequest - Copy
mandate_tokenfrom response - Auto-saved to environment variable
- Rerun request
Cause: Missing or invalid API key Solution:
- Check
api_keyenvironment variable - Ensure it starts with
pk_live_ - Run signup if you don't have a key
Cause: Rate limit exceeded Solution:
- Wait 60 seconds
- Reduce request frequency
- Create account for higher limits (100/min vs 20/min)
Use {{variable_name}} syntax:
URL: {{api_url}}/v1/users/me
Header: x-api-key: {{api_key}}
Body: {"mandate_token": "{{mandate_token}}"}
Use JavaScript in pre-request scripts:
// Generate random email
pm.environment.set("random_email", `user-${Math.random().toString(36).substring(7)}@example.com`);
// Generate timestamp
pm.environment.set("timestamp", Math.floor(Date.now() / 1000));
// Generate UUID
pm.environment.set("request_id", pm.variables.replaceIn('{{$guid}}'));Use tests to save data for next request:
pm.test("Save values for next request", function () {
var jsonData = pm.response.json();
// Save mandate token
pm.environment.set("mandate_token", jsonData.mandate_token);
// Save mandate ID
pm.environment.set("mandate_id", jsonData.mandate_id);
});Rate limits are enforced per-endpoint (all users get the same limits):
| Endpoint | Rate Limit |
|---|---|
/mandates/issue |
20 req/min |
/mandates/verify |
100 req/min |
/x402/resource |
60 req/min |
| Other endpoints | 60 req/min |
Check remaining: View response headers:
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1702345678
- 📖 API Documentation: ../api/endpoints-reference.md
- 💬 GitHub Issues: Report bugs
- 📧 Email: support@agentgatepay.com
Last Updated: December 2025 Collection Version: 1.0.0 Total Requests: 25+