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.

1

Account Setup

Sign up for a Demo Gateway account to get started. You'll receive access to both test and production environments.

What You'll Get
  • Merchant dashboard access
  • Test API keys for development
  • Production API keys (after approval)
  • Access to documentation and support
2

Get Your API Keys

API keys are used to authenticate your requests. You'll find them in your merchant dashboard under Settings → API Keys.

Test Keys
Use test keys for development and testing. Test payments won't charge real money.
pk_test_...
Production Keys
Production keys are available after account approval. Use these for live transactions.
pk_live_...

Security Best Practice:

Never expose your Secret Key (sk_...) in client-side code. Always use it on your backend server only.

3

Make Your First API Call

Let's generate a test QR code to verify your integration is working correctly.

Example: Generate QR Code
Replace YOUR_SECRET_KEY with your actual secret key
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.

4

Testing QR Codes

Use our test environment to generate QR codes and test the payment flow without processing real payments.

Test QR Codes
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.

5

Going Live Checklist

Before processing real payments, ensure you've completed these steps:

Pre-Launch Checklist
  • 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

Next Steps