PayWay Link
PayWay Link generates a QR through the ABA payment-link URL configured in the dashboard. The API key determines the link; callers cannot provide or override a target URL. Every QR expires exactly 180 seconds after it is issued.
Generate QR
POST /payway-link/generate-qr
curl -X POST 'https://phka-pay.rikrey.com/payway-link/generate-qr' \
-H 'content-type: application/json' \
-H 'x-auth-type: api-payway-link' \
-H 'x-api-key: pl_YOUR_KEY' \
-d '{
"amount": 1000,
"currency": 116,
"meta": { "orderId": "ORDER-001" }
}'amount must be positive and currency must equal the configured currency (116 for KHR or 840 for USD). expiredAfter is not configurable; legacy clients may send exactly 180000.
{
"transactionId": "PL_5a03...",
"expiredAt": "2026-08-23T12:03:00.000Z",
"status": "PENDING",
"requestData": {
"amount": 1000,
"currency": 116,
"meta": { "orderId": "ORDER-001" }
},
"data": {
"qr": "000201...",
"clientId": "upstream-client-id"
}
}The returned transactionId belongs to PhkaPay and remains stable even if ABA uses different request identifiers while polling.
Check local status
POST /payway-link/check reads the locally monitored state. It does not open a browser or contact PayWay. Only the API key that generated the QR can query it.
curl -X POST 'https://phka-pay.rikrey.com/payway-link/check' \
-H 'content-type: application/json' \
-H 'x-auth-type: api-payway-link' \
-H 'x-api-key: pl_YOUR_KEY' \
-d '{"transactionId":"PL_5a03..."}'Actions map to public statuses as follows:
| Action | Status |
|---|---|
request_qr | PENDING |
scanned | PENDING |
approved | SUCCESS |
| hard 180-second timeout | EXPIRED |
| unrecoverable automation error | FAILED |
Approved responses include receiptUrl when ABA provides one.
Webhook events
PayWay Link supports payment.created, payment.scanned, payment.completed, payment.failed, payment.expired, and transaction.updated. Deliveries use the same x-timestamp and x-signature HMAC headers documented in the webhook guide.
