Asset

Owner Types


CodeOwner/Member Type
mrcMerchant
isrIssuer
prdProduct
cltClient
mbrMember

Command Types


TypeUpdateTransferCheck BalanceTerms
1Debit(- asset balance): Direct deduct current it’s own asset
2Credit(+ asset balance): Direct top up balance into it’s own asset
3Hold(+ hold): Add amount into ‘hold’ (nominal that planned to deducted)
4Release(- hold): release the previous ‘hold’ amount
5Float(+ float): Float the planned nominal cash in
6Cancel(- float): Cancel the planned nominal cash in
7Directdirect transfer into receiver’s asset
8Indirectindirect transfer into receiver’s asset
9Commitcommit the previous indirect transfer
10CancelTransfercancel the previous indirect transfer
11CheckBalanceQuery asset balance
12CommitHoldCommit previous ‘Hold’ (3) command
13CommitFloatCommit previous ‘Float’ (5) command

Command Example

  • Check Balance
{
   "Data":{
      "UserId":1234,            // member id
      "Type":11,                // command type
      "ClientId":1,
      "PaOwnerTypeFrom":"mrc"   // member/owner type
   },
   "Command":"CheckBalance"
}


{
   "Data":null,
   "DataList":[
      {
         "PaId":819,
         "PaClientId":1,
         "PaOwner":1,
         "PaAssetType":1,
         "PaStatus":1,
         "PaValue":1500.0,
         "PaValueFloat":0.0,
         "PaValueHold":0.0,
         "PaExpired":"2024-03-03T13:04:34",
         "PaAssetValue":1.0,
         "P aCurrency":"IDR",
         "PaTrx":11,
         "PaSerialNo":"mrc999",
         "PaStampToken":null,
         "PaUser":"mrc999",
         "PaOwnerType":"mbr",
         "TotMonth":1001500.0
      }
   ],
   "Id":0,
   "ReqId":0,
   "Status":1,
   "StatusMessage":null,
   "ErrorCode":"0",
   "Time":"2023-03-13T14:01:19.9023822+07:00",
   "Signat ure":null
}
{
   "Data":null,
   "DataList":[
      {
         "PaId":819,
         "PaClientId":1,
         "PaOwner":1,
         "PaAssetType":1,
         "PaStatus":1,
         "PaValue":1500.0,
         "PaValueFloat":0.0,
         "PaValueHold":0.0,
         "PaExpired":"2024-03-03T13:04:34",
         "PaAssetValue":1.0,
         "P aCurrency":"IDR",
         "PaTrx":11,
         "PaSerialNo":"mrc999",
         "PaStampToken":null,
         "PaUser":"mrc999",
         "PaOwnerType":"mbr",
         "TotMonth":1001500.0
      }
   ],
   "Id":0,
   "ReqId":0,
   "Status":1,
   "StatusMessage":null,
   "ErrorCode":"0",
   "Time":"2023-03-13T14:01:19.9023822+07:00",
   "Signat ure":null
}

  • Update - “Type“: [1,2,3,4,5,6,12,13]
{
   "Data":{
      "UserId":1234,
      "TrxId":4321,
      "PtId":1,
      "PtCode":"IDR",
      "Type":2,
      "Amount":10000,
      "UserFromStatus":0,    //0 = basic,1 = premium
      "UserName":"userWhoDoTransaction",
      "ClientId":1,
      "ExpireDate":"2022-09-27T11:42:40.1183508+07:00",
      "PaOwnerTypeFrom":"mrc"
   },
   "Command":"Update"
}
{
   "Data":{
      "UserId":1234,
      "TrxId":4321,
      "PtId":1,
      "PtCode":"IDR",
      "Type":2,
      "ClientId":1,
      "ExpireDate":"2022-09-27T11:42:40",
      "SerialNo":null,
      "PaId":747,
      "PaClientId":1,
      "PaOwner":1234,
      "PaAssetType":1,
      "PaStatus":1,
      "PaValue":10000.0,
      "PaValueFloat":0.0,
      "PaValueHold":0.0,
      "PaExpired":"2022-09-27T11:42:40",
      "PaAssetValue":1.0,
      "PaCurrency":"IDR",
      "PaTrx":4321,
      "PaSerialNo":null,
      "PaStampToken":null,
      "PaUser":"userWhoDoTransaction",
      "PaOwnerType":"mrc",
      "TotMonth":10000.0
   },
   "DataList":null,
   "Id":0,
   "ReqId":0,
   "Status":1,
   "StatusMessage":null,
   "ErrorCode":"0",
   "Time":"2022-09-22T16:59:54.8416222+07:00 ",
   "Signature":null
}

  • Transfer - “Type”: [7,8,9,10]
{
   "Data":{
      "TrxId":9808,
      "PtId":1,
      "PtCode":"IDR",
      "Type":7,
      "Amount":5000.0,
      "UserIdFrom":1234,
      "UserIdTo":21,
      "UserFromStatus":0,   //sender 0=basic, 1=premium
      "UserToStatus":0,     //receiver 0=basic, 1=premium
      "UserName":"userWhoDoTransaction",
      "ClientId":1,
      "ExpireDate":"2021-09-27T11:58:47.7167365+07:00",
      "PaOwnerTypeFrom":"mrc",
      "PaOwnerTypeTo":"isr"
   },
   "Command":"Transfer"
}   
{
   "Data":{
      "UserIdFrom":1234,
      "UserIdTo":21,
      "TrxId":9808,
      "PtId":1,
      "PtCode":"IDR",
      "FromBalance":5000.0,
      "FromHold":0.0,
      "FromFloat":0.0,
      "ToBalance":5000.0,
      "ToHold":0.0,
      "ToFloat":0.0,
      "UserFromStatus":0,
      "UserToStatus":0,
      "UserName":"userWhoDoTra nsaction",
      "ClientId":1,
      "ExpireDate":"2021-09-27T11:58:47.7167365+07:00",
      "SerialNo":null,
      "PaOwnerTypeFrom":"mrc",
      "PaOwnerTypeTo":"isr"
   },
   "DataList":null,
   "Id":0,
   "ReqId":0,
   "Status":1,
   "StatusMessage":null,
   "ErrorCode":"0",
   "Time":"2022-09-22T17:05:36.2289661+07:00",
   "Signature":null
}

🚧

Response Flag

Success

Failed

“status“:1

“ErrorCode“:”0”

Status != 1 & ErrorCode != “0”



📘

Command Types To Do Transaction

  • Money In (Update)
TypeNotes
Type 2(can’t be undo)
Type 5Continue to Type 13
Undo to Type 6

  • Money Out (Update)
TypeNotes
Type 1(can’t be undo)
Type 3Continue to Type 12
Undo to Type 4

  • Transfer
TypeNotes
Type 7(can’t be undo)
Type 8Continue to Type 9
Undo to Type 10

Subject Type Asset Service

The Worker Service Manager Asset documentation provides examples of three different SubjectType, namely "Asset", "AssetType", and "History". Where each SubjectType has different payload data.


Subject Type : "Asset"

Payload Data


NameData TypeDescription
CommandStringcommand type transaction 1 - 6, 12, 13
TrxidStringTransaction Id
OwnerTypeStringOwner Type
CurrencyStringCurrency Type (IDR, PTS, OFW, etc…)
OwnerStatusString0 = basic, 1 = premium
OwnerNameStringName user
ExpiredDateDatetimeExpired date of type point, Voucher, etc
SerialNoStringSerial Number (optional)
AmountStringTotal Amount

Example Request

  • For own request
{
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"asset",
   "Action":"none", 
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "Data":{
      "Command":{
         "Type":2  //berupa command type dari transaksi 1 s/d 6, 12, 13
      },
      "TrxId":39999, //transaksi id
      "OwnerType":"mbr", //mbr,mrc,...
      "Currency":"IDR", //IDR, PTS, OFW,...
      "OwnerStatus":0,  //0 = basic, 1 premium
      "OwnerName":"john doe",
      "ExpireDate":"3/21/2023 3:57:09 PM", //tipe poin, voucher, dst...
      "SerialNo":"TROI27316318", //optional/string empty
      "Amount":1500
   }
}
{
   "Result":{
      "Data":{
         "Assets":null,
         "Asset":{
            "UserId":792,
            "TrxId":39999,
            "PtId":1,
            "PtCode":"IDR",
            "Type":2,
            "ClientId":1,
            "ExpireDate":"2024-03-21T15:57:09",
            "SerialNo":"TROI27316318",
            "PaId":1112,
            "PaClientId":1,
            "PaOwner":792,
            "PaAssetT ype":1,
            "PaStatus":1,
            "PaValue":492192.0,
            "PaValueFloat":0.0,
            "PaValueHold":0.0,
            "PaExpired":"2024-03-21T15:57:09",
            "PaAssetValue":1.0,
            "PaCurrency":"IDR",
            "PaTrx":39999,
            "PaSerialNo":"TROI27316318",
            "PaStampToken":null,
            "PaUser":"john doe",
            "PaOwnerTy pe":"mbr",
            "TotMonth":492192.0
         }
      },
      "Code":200,
      "Status":"Success",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClientId":1,
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"asset",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "UserId":690,
   "TicketId":"f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:19"
}

  • Check Balance
{
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"asset",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "Data":{
      "Command":{
         "Type":11
      },
      "OwnerType":"mbr",
      "Currency":"IDR"
   }
}
{
   "Result":{
    "Data": {
    "Assets": [
      {
        "PaId": 2225,
        "PaClientId": 438,
        "PaOwner": 2649,
        "PaAssetType": 20,
        "PaStatus": 1,
        "PaValue": 798896,
        "PaValueFloat": 0,
        "PaValueHold": 0,
        "PaExpired": "2024-09-18T13:52:35",
        "PaAssetValue": 1,
        "PaCurrency": "IDR",
        "PaTrx": 3979602,
        "PaSerialNo": null,
        "PaStampToken": null,
        "PaUser": "Naufal Firaas",
        "PaOwnerType": "mbr",
        "TotMonth": 0,
        "PttValueNumeric": 1
      },
      {
        "PaId": 2703,
        "PaClientId": 438,
        "PaOwner": 2649,
        "PaAssetType": 21,
        "PaStatus": 1,
        "PaValue": 100,
        "PaValueFloat": 0,
        "PaValueHold": 0,
        "PaExpired": "2025-09-12T10:45:30",
        "PaAssetValue": 1,
        "PaCurrency": "PTS",
        "PaTrx": 2409124530,
        "PaSerialNo": null,
        "PaStampToken": null,
        "PaUser": "Naufal Firaas",
        "PaOwnerType": "mbr",
        "TotMonth": 100,
        "PttValueNumeric": 1
      }
    ],
    "Asset": null,
    "TransactionHistories": null,
    "Signature": "R4S2gqZipbO5ctHoT6rr/tKfG8Z3Fwp1s5v+VDwV5Bx4/BgdghiQXEEfWYKQXvQ15otBuQraMr2YUm4yi5IzesjjeGeH7KkzZYkg7m4ZnHygq9ACGe/y+gPBw5jjVJa2VerF9AXxYqCyYBsCKy2bvKM2nG6XSrTJw0H7XRUrwGI="
  }
}

  • Transfer to another account
{
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"asset",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "Data":{
      "Command":{
         "Type":7      //commmand types 7 s/d 10
      },
      "TrxId":39999,
      "OwnerType":"mbr",
      "Currency":"IDR",
      "OwnerStatus":0,  //0:basic, 1:pemium
      "OwnerName":"john doe",
      "ExpireDate":"3/21/2023 3:57:09 PM", //untuk tipe spt voucher, point, dsb...
      "SerialNo":"TROI27316318",
      "Amount":1523,
      "ReceiverType":"mbr",
      "ReceiverStatus":0,
      "ReceiverId":2     //receiver user id
   }
}
{
   "Result":{
      "Data":{
         "Assets":null,
         "Asset":{
            "UserIdFrom":792,
            "UserIdTo":2,
            "TrxId":39999,
            "PtId":1,
            "PtCode":"IDR",
            "FromBalance":545357.0,
            "FromHold":0.0,
            "FromFloat":0.0,
            "ToBalance":1923.0,
            "ToHold":0.0,
            "ToFloat":0.0,
            "UserFromStatus":0,
            "UserToStatus":0,
            "UserName":"john doe",
            "ClientId":1,
            "ExpireDate":"2023-03-21T15:57:09",
            "SerialNo":"TROI27316318",
            "PaOwnerTypeFrom":"mbr",
            "PaOwnerTypeTo":"mbr"
         }
      },
      "Code":200,
      "Status":"Success",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClientId":1,
   "S ubject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"asset",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "UserId":690,
   "TicketId":"f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:19"
}

SubjectType : "AssetType" (Detail Spesific Asset Type)

Payload Data

NameData TypeDescription
TrxidStringTransaction Id
OwnerTypeStringOwner Type
CurrencyStringCurrency Type (IDR, PTS, OFW, etc…)
OwnerStatusString0 = basic, 1 = premium
OwnerNameStringName user
ExpiredDateDatetimeExpired date of type point, Voucher, etc
SerialNoStringSerial Number (optional)
AmountStringTotal Amount

Example Request

  • Detail Spesific Asset Type
{
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"assettype",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "Data":{
      "Currency":"IDR"
   }
}
{
   "Result":{
      "Data":{
         "Assets":null,
         "Asset":{
            "AssetType":{
               "PtId":1,
               "PtClient":1,
               "PtOrganization":0,
               "PtCode":"IDR",
               "PtName":"Rupiah",
               "PtStatus":"Active",
               "PtDate":"2020-12-17T08:52:53",
               "PtStampToken":null,
               "PtUser":"jo nas"
            },
            "TypeActive":{
               "PtaId":1,
               "PtaClient":1,
               "PtId":1,
               "PtaStatus":"active",
               "PtaDate":"2020-12-17T08:53:32",
               "PtaNote":"Rupiah asset activated",
               "PtaActive":"Register",
               "PtaStampToken":null,
               "PtaUser":"jonas"
            },
            "TypeAttr":{
               "PttId":1,
               "PttClient":1,
               " PtId":1,
               "PttCode":"av",
               "PttName":"Asset Value",
               "PttValueString":null,
               "PttValueNumeric":1.0,
               "PttActive":"Active",
               "PttLock":null,
               "PttStampToken":null,
               "PttUser":"jonas"
            }
         }
      },
      "Code":200,
      "Status":"Success",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClintId":1,
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"assettype",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "UserId":690,
   "TicketId":"f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:1 9"
}

  • All Asset Type
{
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"assettype",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "Data":{}
}
{
   "Result":{
      "Data":{
         "Assets":[
            {
               "PtId":1,
               "PtClient":1,
               "PtOrganization":0,
               "PtCode":"IDR",
               "PtName":"Rupiah",
               "PtStatus":"Active",
               "PtDate":"2020-12-17T08:52:53",
               "PtStampToken":null,
               "PtUser":"jonas",
               "AssetActive":null,
               "Asse tAttribute":null
            },
            {
               "PtId":2,
               "PtClient":1,
               "PtOrganization":0,
               "PtCode":"VCR",
               "PtName":"Voucher",
               "PtStatus":"Active",
               "PtDate":"2021-08-12T10:46:36",
               "PtStampToken":null,
               "PtUser":"admin",
               "AssetActive":null,
               "AssetAttribute":null
            },
            {
               "PtId":3,
               "PtClie nt":1,
               "PtOrganization":0,
               "PtCode":"PTS",
               "PtName":"Points",
               "PtStatus":"Active",
               "PtDate":"2021-08-11T22:57:21",
               "PtStampToken":null,
               "PtUser":"admin",
               "AssetActive":null,
               "AssetAttribute":null
            },
            {
               "PtId":5,
               "PtClient":1,
               "PtOrganization":0,
               "PtCode":"L MT",
               "PtName":"Limit",
               "PtStatus":"Active",
               "PtDate":"2022-12-15T09:53:39",
               "PtStampToken":null,
               "PtUser":"admin",
               "AssetActive":null,
               "AssetAttribute":null
            },
            {
               "PtId":8,
               "PtClient":1,
               "PtOrganization":0,
               "PtCode":"OFW",
               "PtName":"Offline Wallet",
               "PtStat us":"Active",
               "PtDate":"2022-12-15T09:54:27",
               "PtStampToken":null,
               "PtUser":"admin",
               "AssetActive":null,
               "AssetAttribute":null
            }
         ],
         "Asset":null
      },
      "Code":200,
      "Status":"Success",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClientId":1,
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"assettype",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "UserId":690,
   "TicketId":"f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:19"
}


SubjectType : "History"

Payload Data

NameType DataDescription
TrxidStringTransaction Id
OwnerTypeStringOwner Type
CurrencyStringCurrency Type (IDR, PTS, OFW, etc…)
TrxDateFromDatetimeTransaction start date
TrxDateToDatetimeTransaction end date

Example Request

{
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"history",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "Data":{
      "TrxId":0, //leave it 0 to get all transactions or fill it for specific transaction id
      "OwnerType":"mbr", //mbr,mrc,clt,....
      "Currency":"IDR", //OFW,PTS,IDR,....
      "TrxDateFrom":"4-14-2023", //curently the maximum range is 30 days (from-to date)
      "TrxDateTo":"5-14-2023"
   }
}
{
   "Result":{
      "Data":{
         "Assets":null,
         "Asset":null,
         "TransactionHistories":[
            {
               "PahType":7,
               "PahCurrency":"IDR",
               "PahTrx":39999,
               "PahSerialNo":"TROI27316318",
               "PahStampToken":null,
               "PahUser":"john doe",
               "TrxDate":"2023-05-11T1 5:15:37.921",
               "PahOwnerType":"mbr",
               "pahAmount":1523.0,
               "transType":"S"
            },
            {
               "PahType":7,
               "PahCurrency":"IDR",
               "PahTrx":39999,
               "PahSerialNo":"TROI27316318",
               "PahStampToken":null,
               "PahUser":"david soekarno",
               "TrxDate":"2023-05-11T15:12:45.908",
               "PahOwnerT ype":"mbr",
               "pahAmount":1523.0,
               "transType":"S"
            },
            {
               "PahType":2,
               "PahCurrency":"IDR",
               "PahTrx":39999,
               "PahSerialNo":"TROI27316318",
               "PahStampToken":null,
               "PahUser":"david soekarno",
               "TrxDate":"2023-05-11T14:52:14.052",
               "PahOwnerType":"mbr",
               "pahAmount":54688.0,
               "transType":null
            },
            {
               "PahType":2,
               "PahCurrency":"IDR",
               "PahTrx":39999,
               "PahSerialNo":"TROI27316318",
               "PahStampToken":null,
               "PahUser":"david soekarno",
               "TrxDate":"2023-05-11T14:50:42.572",
               "PahOwnerType":"mbr",
               "pahAmount":54688.0,
               "transType":"n ull"
            },
            {
               "PahType":2,
               "PahCurrency":"IDR",
               "PahTrx":39999,
               "PahSerialNo":"TROI27316318",
               "PahStampToken":null,
               "PahUser":"david soekarno",
               "TrxDate":"2023-05-11T14:49:47.583",
               "PahOwnerType":"mbr",
               "pahAmount":54688.0,
               "transType":null
            }
         ]
      },
      "Code":200,
      "Status":"Success",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClientId":1,
   "Subject":"ewallet",
   "SubjectType":"asset",
   "SubjectIdentifier":"history",
   "Action":"none",
   "ResourceType":"none",
   "Resource":"none",
   "ResourceId":"none",
   "UserId":690,
   "TicketId":"f8d2faf3 -f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:19"
}