Skip to content

Lấy giao dịch ​

Đọc trạng thái hiện tại của một giao dịch theo user_id và ref_id.

Endpoint ​

http
POST /v1/get_transaction
Content-Type: application/json
json
{
  "user_id": "user_00000001",
  "ref_id": "ref_00000001"
}

Tham số:

Tham sốKiểuBắt buộcMặc địnhMô tả
user_idstringCó—ID của user.
ref_idstringCó—ID tham chiếu giao dịch.

Trả về: GetTransactionResponse

Ví dụ request ​

bash
curl --location '<BASE_URL>/v1/get_transaction' \
  --header 'Authorization: ATV <ACCESS_ID>:<SIGNATURE>' \
  --header 'X-TV-Timestamp: <TIMESTAMP>' \
  --header 'Content-Type: application/json' \
  --data '{
    "user_id": "user_00000001",
    "ref_id": "ref_00000001"
  }'

Response ​

json
{
  "data": {
    "id": "69306e8a-68e3-43f6-97ae-02b8e7c356f7",
    "ref_id": "ref_00000001",
    "user_id": "user_00000001",
    "status": "VERIFIED"
  },
  "errors": []
}
TrườngKiểuMô tả
data.idstringID duy nhất của giao dịch.
data.ref_idstringID tham chiếu giao dịch.
data.user_idstringID của user.
data.statusstringNOT_VERIFIED, VERIFIED hoặc EXPIRED.
errorsarrayChi tiết từng lỗi. Rỗng khi thành công.

Lỗi ​

MãMô tả
access_id_not_foundAPI key không đúng.
transaction_invalid_requestRequest giao dịch không hợp lệ.
internal_server_errorXảy ra lỗi không mong đợi trong quá trình xử lý request.
MãMã lỗiMô tả
401access_denied_exceptionBạn không được phép thực hiện hành động này.
500internal_server_errorXảy ra lỗi không mong đợi trong quá trình xử lý request.

Bước tiếp theo ​

Developers