A complete REST API for integrating KHQR, mobile deeplinks, and digital payments into your web and mobile apps — backed by Cambodia's leading bank.
Every endpoint you need to integrate Canadia Bank payments into any web, mobile, or POS application.
Authenticate with your credentials to receive a JWT token required for all API access.
/api/authenticateInitiate KHQR Landing Page, Mobile Deeplink, or QR Image flows — all via a single endpoint.
/tps/api/payment/init/tps/api/payment/generate-qr-imageFull or partial refunds using the bank's transaction ID. Valid for Canadia Bank transactions only.
/tps/api/payment/refundVerify real-time payment status via externalId. Returns PENDING, SUCCESS, FAILED, or CANCELLED.
/tps/api/payment/statusReceive real-time server-side notifications when a payment is completed by the customer.
/your-callback-urlFigma design specs — spacing, color, typography, responsive layouts, and form validation standards.
Interactive Figma Spec →From credentials to a live KHQR transaction — the fastest path through the integration.
Contact Canadia Bank to receive your merchant username and password for API access.
Exchange your credentials for a JWT token used in all subsequent API requests.
/api/authenticateChoose your flow — KHQR Landing Page, Mobile Deeplink, or QR Image — and submit a request.
/tps/api/payment/initPoll the status endpoint or configure a webhook to receive instant payment success callbacks.
/tps/api/payment/statusOpen-source GitHub repos for every platform — hashing & signature logic and full payment flow demos built in.
Kotlin — hashing & signature, deeproute, and KHQR Landing Page.
View on GitHubSwift & Objective-C — hashing & signature, deeproute, and KHQR Landing Page.
View on GitHubFull web app demonstrating KHQR Landing Page integration for browser-based experiences.
View on GitHubCross-platform mobile — iOS and Android in a single Flutter codebase.
View on GitHubSecurity library SDKs also available for iOS (Swift/Obj-C), Android (Kotlin), and Java — covering hashing & signature methods.
Every error returns a structured JSON response with a code, message, and errorCode string for easy logging and debugging.
| Status | Error Code | Description |
|---|---|---|
| 401 | PG_UNAUTHORIZED | Not authorized. Check your JWT token. |
| 200 | PG_INVALID_REQUEST | Request parameters are invalid or missing. |
| 200 | PG_EXTERNAL_ID_EXIST | The externalId provided already exists. |
| 200 | PYM_NOT_FOUND | Payment not found. |
| 200 | PG_GET_STATUS_FAILED | The KHQR payment has expired. |
| 200 | PG_GENERATE_DEEPLINK_FAILED | Failed to generate a mobile deeplink URL. |
| 200 | PG_MERCHANT_INACTIVE | The merchant account is inactive. |
| 200 | PG_MERCHANT_NOT_EXIST | The merchant does not exist. |
| 200 | PG_MERCHANT_UNAUTHORIZED | The merchant is unauthorized for this operation. |
| 200 | PG_SYSTEM_UNDER_MAINTENANCE | System under maintenance — retry after a short delay. |
Open the Developer Suite and start with authentication — your first API call takes minutes.