Getting Started
Get up and running with Demo Gateway QR code payments in minutes. This guide will walk you through account setup, API key generation, and generating your first QR code.
Account Setup
Sign up for a Demo Gateway account to get started. You'll receive access to both test and production environments.
- Merchant dashboard access
- Test API keys for development
- Production API keys (after approval)
- Access to documentation and support
Get Your API Keys
API keys are used to authenticate your requests. You'll find them in your merchant dashboard under Settings → API Keys.
Security Best Practice:
Never expose your Secret Key (sk_...) in client-side code. Always use it on your backend server only.
Make Your First API Call
Let's generate a test QR code to verify your integration is working correctly.
curl https://api.demo-gateway.com/v1/qr-codes \
-X POST \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "THB",
"reference": "ORDER-12345",
"client_name": "John Doe",
"client_bank_name": "Bangkok Bank",
"client_bank_account": "1234567890",
"metadata": {
"client_id": "CLIENT-12345"
}
}'Note:
This will generate a QR code that you can display to customers. When they scan it with their PromptPay-enabled banking app, the payment will be processed automatically. Learn more about QR codes.
Testing QR Codes
Use our test environment to generate QR codes and test the payment flow without processing real payments.
Test Mode:In test mode, QR codes are generated but payments won't be processed through real banks. You can simulate payment completion via the dashboard.
QR Code Expiry:Test QR codes expire after 15 minutes by default. You can adjust this when generating QR codes.
Payment Simulation:Use the merchant dashboard to simulate successful or failed payments for testing webhooks.
Going Live Checklist
Before processing real payments, ensure you've completed these steps:
Account Approval
Complete KYC verification and get production access
Webhook Configuration
Set up webhooks to receive payment notifications
Error Handling
Implement proper error handling for all API calls
Idempotency Keys
Use idempotency keys to prevent duplicate charges
Security Review
Ensure API keys are stored securely and never exposed