Transaction API (Webhook)#

API webhook cho he thong giao dich.

Base URL: https://app.socialking.vn/api/v1


1. Clear Cache theo User#

POST /transaction/clear-cache-by-user #

Auth: API Key

Rate Limit: 10 req/sec

Request Body:

{
  "userId": "uuid-user-id"
}
FieldTypeRequiredValidation
userIdUUIDYesUser ID

Response (200):

{
  "success": true,
  "message": "Cache cleared successfully",
  "clearedKeys": 5
}

2. Xu ly Nap tien tu Ngan hang (Webhook)#

POST /transaction/process-bank #

Auth: Webhook (khong can auth)

Rate Limit: 30 req/sec

Request Body:

{
  "bankName": "MB Bank",
  "senderName": "NGUYEN VAN A",
  "senderAccount": "0123456789",
  "amount": 500000,
  "memo": "SK123456 nap tien",
  "timestamp": "2026-03-30T10:00:00Z"
}
FieldTypeRequiredMo ta
bankNamestringYesTen ngan hang
senderNamestringYesTen nguoi gui
senderAccountstringYesSo tai khoan gui
amountnumberYesSo tien (VND)
memostringYesNoi dung chuyen khoan (chua wallet code)
timestampstringYesThoi gian giao dich

Luu y: He thong tu dong nhan dien walletCode trong memo de nap tien vao tai khoan tuong ung.

Response (200):

{
  "success": true,
  "message": "Bank deposit processed",
  "data": {
    "transactionId": "uuid-string",
    "userId": "uuid-string",
    "amount": 500000,
    "newBalance": 1500000
  }
}