Phase 1 — VietQR + NAPAS APG đã sẵn sàng

VietQR & đối soát
cho merchant Việt Nam

DailyPay sinh QR động, lắng nghe callback NAPAS, match đơn rồi đẩy webhookorder.paidvề server của bạn. Tiền vào thẳng tài khoản — DailyPay không giữ.

  • BYOB — tiền vào TK của bạn
  • Idempotency-Key support
  • HMAC sign request
  • Rate limit + audit log
POST /v1/orders
curl -X POST https://api.dailypay.vn/v1/orders \
  -H "Authorization: Bearer dp_live_a1b2c3d4e5f6..." \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: order_42" \
  -d '{
    "order_code": "ORD-2026-001",
    "amount": 250000,
    "description": "Áo thun cotton size M"
  }'
201 Created
{
  "status": "success",
  "data": {
    "id": "ab12...",
    "order_code": "ORD-2026-001",
    "payment_code": "DP823649",
    "amount": "250000",
    "status": "pending",
    "qr_string": "00020101021238540010A0000007...",
    "qr_image_url": "data:image/png;base64,iVBORw0K...",
    "expires_at": "2026-05-11T07:45:00.000Z"
  }
}

40+

Banks (NAPAS BIN)

8 lần / Fibonacci

Webhook retry

99.95%

API uptime mục tiêu

< 5s

P95 đối soát

Tính năng

Mọi thứ một payment platform Việt cần

Tích hợp NAPAS APG ở phase 1, sẵn sàng mở rộng SePay / BankHub ở phase 2. Toàn bộ theo chuẩn ISO + EMV.

VietQR động

Sinh mã QR EMV chuẩn NAPAS Part VII cho mọi đơn hàng — có embed payment code DPxxxxxx để đối soát chính xác.

Đối soát thời gian thực

NAPAS APG đẩy về, DailyPay match đơn theo payment_code + amount, emit webhook order.paid trong vài giây.

Webhook ký HMAC

Xác thực bằng X-DailyPay-Signature, retry Fibonacci, replay tay khi cần. Audit đầy đủ.

API key + HMAC

Bearer dp_live_… cho server-to-server, kèm signature cho mutation. Last-used-IP track sẵn.

Hỗ trợ có SLA

Ticket CSKH có ma trận SLA theo tier × priority, thread tin nhắn merchant ↔ staff, internal notes.

SSE stream realtime

Subscribe /v1/transactions/stream để thấy giao dịch ngay khi NAPAS callback. Không cần polling.

Luồng thanh toán

4 bước, từ QR đến webhook

  1. 01Đăng ký merchant + tài khoản nhận

    KYC + khai báo tài khoản BIDV/VCB/MB… DailyPay gọi NAPAS đăng ký ĐVCNTT.

  2. 02Tạo đơn → DailyPay sinh QR

    POST /v1/orders trả về qr_string + qr_image_url. Hiển thị cho khách.

  3. 03Khách chuyển khoản

    Memo của QR chứa payment_code (DPxxxxxx). Tiền vào thẳng TK merchant.

  4. 04NAPAS → DailyPay → webhook

    DailyPay match đơn, đẩy event order.paid kèm HMAC signature trong vài giây.

webhook.received
POST https://shop-a.vn/dailypay/webhook
X-DailyPay-Signature: sha256=<hex>
X-DailyPay-Event-Type: order.paid

{
  "event_id": "7a8b9c0d...",
  "event_type": "order.paid",
  "data": {
    "order": { "id": "ab12...", "status": "paid", "paid_at": "..." },
    "transaction": { "id": "49682", "amount": "250000", "reference_code": "FT26050001234" }
  }
}

API

REST API, sản phẩm-first

Mọi endpoint trả envelope { status, data, meta }. BIGINT (VND) trả về string để an toàn JavaScript. Idempotency-Key cho POST.

  • POST /v1/auth/loginJWT bearer cho dashboard
  • POST /v1/api-keysSinh API key + HMAC secret
  • POST /v1/ordersTạo đơn + VietQR
  • GET /v1/transactionsLiệt kê giao dịch + filter
  • GET /v1/transactions/streamSSE realtime
  • POST /v1/support-ticketsMở ticket CSKH
src/dailypay-client.ts
import axios from 'axios';
import crypto from 'node:crypto';

const apiKey = process.env.DAILYPAY_KEY!;
const secret = process.env.DAILYPAY_SECRET!;

export async function createOrder(amount: number, code: string) {
  const ts = Math.floor(Date.now() / 1000);
  const body = JSON.stringify({ order_code: code, amount });
  const canonical = `${ts}.POST./v1/orders.${body}`;
  const sig = crypto.createHmac('sha256', secret).update(canonical).digest('hex');

  const { data } = await axios.post(
    'https://api.dailypay.vn/v1/orders',
    body,
    {
      headers: {
        'Authorization': `Bearer ${apiKey}`,
        'X-DailyPay-Signature': `sha256=${sig}`,
        'X-DailyPay-Timestamp': ts.toString(),
        'X-Idempotency-Key': `order_${code}`,
        'Content-Type': 'application/json',
      },
    }
  );
  return data.data; // { id, payment_code, qr_image_url, ... }
}

Bảng giá

Trả theo từng đơn — không có phí cố định

Phase 1 đang free cho merchant pilot. Phase 2 sẽ áp dụng phí flat trên mỗi đơn thành công, gửi hoá đơn hằng tháng.

Standard

0₫

SLA 24h CSKH normal

  • Đơn không giới hạn
  • 1 tài khoản nhận
  • Webhook + API

Premium

Liên hệ

SLA 8h, account manager

  • Multi-account (Phase 2)
  • Webhook multi-endpoint
  • Báo cáo nâng cao

Enterprise

Liên hệ

SLA 1h, dedicated infra

  • On-prem option
  • Custom contract
  • Audit + SOC2

Tích hợp trong một ngày

Đăng ký merchant, khai báo tài khoản, sinh API key — bạn có thể chấp nhận VietQR ngay trong sandbox trong vòng vài phút.