Developer Center
Build AI-native payment infrastructure into your autonomous agents. Full API access, sandbox testing, and production-ready endpoints.
Quick Start
1. Get Your Sandbox API Key
Start by registering in our sandbox environment. Sandbox API operates independently from production and uses simulated data.
POST /sandbox/auth/register2. Create Your First Card
Generate a virtual card with custom limits for your AI agent. Card numbers are shown once for security.
POST /v1/cards3. Process Payments
Charge the card to pay for services. Real-time balance updates and webhook notifications.
POST /v1/payments4. Go Live
Switch from sandbox to production endpoints. Contact us for production API access.
https://api.newgen.hk/v1Code Examples
Quick Start - Create a Card
# 1. Login to get your token
curl -X POST https://api.newgen.hk/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"your@email.com","password":"yourpassword"}'
# 2. Use the token to create a card
curl -X POST https://api.newgen.hk/v1/cards \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"currency":"USD","limit":1000,"description":"AI Agent Card"}'Process a Payment
curl -X POST https://api.newgen.hk/v1/payments \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"cardId": "card_uuid_here",
"amount": 50.00,
"currency": "USD",
"merchantName": "AWS Services",
"merchantCategory": "cloud_computing"
}'Webhook Setup
# Create a webhook to receive payment notifications
curl -X POST https://api.newgen.hk/v1/webhooks \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/webhooks/newgen",
"events": ["payment.success", "payment.failed"]
}'SDKs & Libraries
Official SDKs for easy integration. All SDKs support both sandbox and production environments.
Python
Coming SoonNode.js
Coming SoonGo
Coming SoonJava
Coming SoonRuby
Coming SoonPHP
Coming SoonAPI Base URLs
Production
Livehttps://api.newgen.hk/v1Process real payments. Requires approved API keys.
Sandbox
Testinghttps://sandbox.newgen.hk/v1Test with simulated data. No real transactions.