Skip to content

Get Transaction ​

Returns a transaction and its challenge key by transaction_id. Use it when the Firebase push carrying the challenge key did not arrive.

Endpoint ​

http
POST /api/v1/saas-sotp/get-transaction
Content-Type: application/json
json
{
  "partner_id": "{{partner_id}}",
  "partner_key": "{{partner_key}}",
  "token": "{{token}}",
  "app_id": "{{app_id}}",
  "transaction_id": "{{transaction_id}}"
}

Parameters:

ParamTypeRequiredDefaultDescription
partner_idstringYes—The partner id.
partner_keystringYes—The partner key.
tokenstringYes—The registration token generated by Register.
app_idstringYes—The app name the transaction was created under.
transaction_idstringYes—The unique transaction id on the partner side.

Returns: GetTransactionResponse

Sample Request ​

bash
curl --location --request POST '<BASE_URL>/saas-sotp/get-transaction' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data-raw '{
    "partner_id": "{{partner_id}}",
    "partner_key": "{{partner_key}}",
    "token": "{{token}}",
    "app_id": "{{app_id}}",
    "transaction_id": "{{transaction_id}}"
  }'

Response ​

json
{
  "success": true,
  "code": 1,
  "message": "Success",
  "challenge_key": "fake_challenge_key",
  "transaction": {
    "app_id": "app_00000001",
    "transaction_id": "txn_00000001",
    "transaction_desc": "Bank transfer",
    "transaction_amount": "1000000",
    "receiver_account": "190xxxxxxx",
    "sender_account": "190xxxxxxx",
    "currency": "VND",
    "type": "transfer",
    "transaction_date": "2022-10-04 12:00:00",
    "created_at": "2023-03-03T10:49:50+07:00",
    "transaction_metadata": "{\"test\":\"abc\"}"
  }
}
FieldTypeDescription
successboolRequest status.
codeintThe status code — 1 on success.
messagestringThe status or error message.
challenge_keystringThe challenge key used to generate an advance OTP.
transaction.app_idstringThe app name the transaction was created under.
transaction.transaction_idstringThe unique transaction id on the partner side.
transaction.transaction_descstringThe transaction description.
transaction.transaction_amountstringThe transaction amount.
transaction.transaction_datestringThe date the transaction was created.
transaction.receiver_accountstringThe receiver account id.
transaction.sender_accountstringThe sender account id.
transaction.currencystringThe currency used to perform the transaction.
transaction.typestringThe type of transaction, defined on the partner side.
transaction.created_atstringThe time the transaction was stored in the database.
transaction.transaction_metadatastringAdditional transaction information.

Errors ​

CodeDescription
3Parameter invalid
103Thông tin Partner không chính xác — Partner details are incorrect.
126Có lỗi xảy ra vui lòng thử lại — An error occurred, please retry.
129Token không hợp lệ — Invalid token.
190108Tài khoản chưa hoạt động — Account not activated.
190203Không tìm thấy transaction — Transaction not found.

Next Steps ​

Developers