Logo

Payment Histories By Ref Id

Request Header

Data

Type

Description

Example

TokenStringprivate-keyJWT Format
MerchantStringMerchant Id1234
Content-TypeString-application/json

Request Example

curl --location 'http://mainnet-api.nakawallet.com/api/transaction/get-transaction-with-ref-id/6694a18330e7a74b1c3353041723628735564000795' \
--header 'token: ac20eb6f41******************************************************************************188c2fe511' \
--header 'merchant: ***************************************'

Ex. response json body

Case: HTTP status 200 OK body status: true in a case successfully.

{
  "status": true,
  "data": {
    "_id": "66bc7cc208c7e28e9f25991d",
    "fee": 1,
    "from_address": "TEDArb5hoqTWcxaNX712kT2FUPdYgqff46",
    "to_address": "TGT4XKfSYV5pmYp6ch96xr77NWPW7o4KVa",
    "ref_id": "6694a18330e7a74b1c3353041723628735564000795",
    "status": "success",
    "note": "test test",
    "transaction_history": [
      {
        "_id": "66bc7cc208c7e28e9f25991e",
        "message": "Create transaction deposit",
        "hash": null,
        "status": "createTransaction",
        "date": "2024-08-14T09:45:38.502Z"
      },
      {
        "_id": "66bc7d2908c7e28e9f259962",
        "message": "Check Amount Token transfer Tron chain Transaction Done prepare to increase smart contract",
        "hash": "e694a088514a29525ff7007a28d4f4be14ee560f3f87d957b4516ea14eec3c5b",
        "status": "transferBalanceToOwnerAddress",
        "date": "2024-08-14T09:47:21.653Z"
      },
      {
        "_id": "66bc7d3608c7e28e9f259977",
        "message": "Increase balance to smartcontract",
        "hash": "0x21bcd29b1c635b59bfb853541345611237fd566525c8f9e32d06085a48479716",
        "status": "success",
        "date": "2024-08-14T09:47:34.817Z"
      }
    ],
    "expire_time": "2024-08-14T09:55:38.501Z",
    "createdAt": "2024-08-14T09:45:38.501Z",
    "updatedAt": "2024-08-14T09:47:34.839Z",
    "base_amount": 10,
    "amount": 10,
    "receive_amount": 9,
    "from": "provider",
    "type_coin": "crypto",
    "token_info": {
      "_id": "6582b197419cd75cb4929e22",
      "name": "USDT",
      "token_address": "TXLAQ63Xg1NAzckPwKHvzw7CSEmLMEqcdj",
      "image": "https://naka-wallet.s3.eu-central-1.amazonaws.com/token-info/USDT/image/d7543041b43adff13e1c8d164fdad248.Tether-USDT-icon-1.png",
      "chain": "tron",
      "chain_name": "Tron Network",
      "decimal": 6,
      "rate_current": {
        "coin_to_usd": 1.0002,
        "usd_to_coin": 0.9998000399920016,
        "base": "THB",
        "base_convert": 34.95597819768
      },
      "symbol": "USDT",
      "is_native_token": false,
      "smartcontract_id": 7
    },
    "ref_provider_id": "66bc7cbf08c7e28e9f25990f",
    "type": "deposit",
    "providerTransaction": {
      "_id": "66bc7cbf08c7e28e9f25990f",
      "mode": "receive_pay",
      "amount": 10,
      "ref_id": "6694a18330e7a74b1c3353041723628735564000795",
      "provider_id": "6694a18330e7a74b1c335304",
      "currency": "THB",
      "meta_data": {}
    }
  },
  "message": "get transaction success."
}

Case: HTTP status 401 Unauthorized status: false in case unauthorized.

Headers:
{
  "content-length": "26",
  "content-type": "application/json; charset=utf-8"
}
URL:
Data:
{
  "message": "Unauthorized"
}

Headers:
{
  "content-length": "23",
  "content-type": "application/json; charset=utf-8"
}
URL:
Data:
{
  "message": "Key wrong"
}

Case: HTTP status 500 Unauthorized status: false in case Internal Server Error.

Headers:
{
  "content-length": "70",
  "content-type": "application/json; charset=utf-8"
}
URL:
Data:
{
  "message": "Error: Can not create transaction(ref_id already exists)"
}