Earning Point

Notes

public enum SubjectIdentifier
{
    Earning = 1,
    Order,
    Sign
}
public enum ActionOrder
{
    Save = 0,
    DebitH2H = 1,
    H2HStatus = 2,
    CreateVa = 3,
    VaStatus = 4, 
    GetEarning = 7
}



Earning Point


Earning

Earning Point service is responsible for tracking and managing points earned from the Create Order process.

Example Request

{
  "Subject": "loyalty",
  "SubjectType": "trx",
  "SubjectIdentifier": "earning",
  "Action": "0",
  "ResourceType": "data",
  "Resource": "",
  "ResourceId": "",
  "Data": {
    "trxOrganization": 0,
    "trxMerchantId": 0,
    "trxPaymentType": 0,
    "trxDate": "2022-10-26 14:37:42",
    "trxReceipt": "REF221026143742",
    "trxUser": "6281311053950",
    "trxStatus": 1,
    "trxReceiptExtern": "REF221026143742",
    "trxCryptoNo": null,
    "trxStampToken": "86684e25-7262-4ed8-98a4-06f3c4befd15",
    "trxMaster": 0,
    "trxNote": null,
    "trxPhone": null,
    "trxAddressTo": null,
    "trxSignature": null,
    "trxLatitude": null,
    "trxLongitude": null,
    "trxPayload": null,
    "virCashier": null,
    "trxHidden": 0,
    "details": [
      {
        "trxId": 2440,
        "trxIssuerId": 0,
        "trxItemType": null,
        "trxAssetType": 3,
        "trxCurrencyDecimal": null,
        "trxCurrency": "PTS",
        "trxCurrencyType": null,
        "trxProduct": 3200,
        "trxEvent": 0,
        "trxAmount": 0,
        "trxDC": null,
        "trxData": null,
        "trxDataResult": null,
        "trxPpn": 0,
        "trxPph22": 0,
        "trxAmountBill": 0,
        "trxFee": 0,
        "trxDecimalCrypto": 0,
        "trxAmountCrypto": 0,
        "trxGasFee": 0,
        "trxConvertCrypto": 0,
        "trxMarkupProcentage": null,
        "trxMarketRate": null,
        "trxStatus": 0,
        "trxStampToken": "b49970bc-b0cf-4970-83a6-93f860ea1d76",
        "trxUser": null,
        "exactGasFee": null,
        "exactAmountCrypto": null,
        "ExactConvertCrypto": null
      }
    ]
  }
}
{
  "Result": {
    "Data": {
      "TrxId": 4954,
      "MemberId": 792
    },
    "Code": 200,
    "Status": "200",
    "Message": "Success",
    "ErrorCode": "0"
  },
  "ClientId": 1,
  "Subject": "ewallet",
  "SubjectType": "trx",
  "SubjectIdentifier": "earning",
  "Action": "0",
  "ResourceType": "data",
  "Resource": "",
  "ResourceId": "",
  "UserId": 690,
  "TicketId": "f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
  "Date": "2022-01-13 22:36:19"
}

Earning Save

This API service is used to store information about the points earned from the earning process that has been completed.

Example Request

{
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"earning",
   "Action":"0",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "Data":{
      "trxOrganization":0,
      "trxMerchantId":0,
      "trxPaymentType":0,
      "trxDate":"2023-10-24 11:36:19",
      "trxReceipt":"REF221026143742",
      "trxUser":"6281311053950",
      "trxStatus":1,
      "trxReceiptExtern":"REF221026143742",
      "trxCryptoNo":null,
      "trxStampToken":"86684e25-7262-4ed8-98a4-06f3c4befd15",
      "trxMaster":0,
      "trxNote":null,
      "trxPhone":null,
      "trxAddressTo":null,
      "trxSignature":null,
      "trxLatitude":null,
      "trxLongitude":null,
      "trxPayload":null,
      "virCashier":null,
      "trxHidden":0,
      "details":[
         {
            "trxIssuerId":0,
            "trxItemType":null,
            "trxAssetType":3,
            "trxCurrencyDecimal":null,
            "trxCurrency":"PTS",
            "trxCurrencyType":null,
            "trxProduct":3200,
            "trxEvent":0,
            "trxAmount":9000000,
            "trxDC":null,
            "trxData":null,
            "trxDataResult":null,
            "trxPpn":0.00000000,
            "trxPph22":0.00000000,
            "trxAmountBill":0.00000000,
            "trxFee":0.00000000,
            "trxDecimalCrypto":0,
            "trxAmountCrypto":0,
            "trxGasFee":0,
            "trxConvertCrypto":0.000000000000000000,
            "trxMarkupProcentage":null,
            "trxMarketRate":null,
            "trxStatus":0,
            "trxStampToken":"b49970bc-b0cf-4970-83a6-93f860ea1d76",
            "trxUser":null,
            "exactGasFee":null,
            "exactAmountCrypto":null,
            "ExactConvertCrypto":null
         }
      ]
   }
}
{
  "Result": {
    "Data": {
      "SavedTrx": {
        "TrxId": 3967111,
        "MemberId": 792
      },
      "Reward": {
        "status": "success",
        "message": "check transaction promo in process!",
        "SubmittedId": 85737
      }
    },
    "Code": 200,
    "Status": "200",
    "Message": "Success",
    "ErrorCode": "0"
  },
  "ClientId": 1,
  "Subject": "ewallet",
  "SubjectType": "trx",
  "SubjectIdentifier": "earning",
  "Action": "0",
  "ResourceType": "data",
  "Resource": "",
  "ResourceId": "",
  "UserId": 690,
  "TicketId": "f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
  "Date": "2023-10-24 11:36:19"
}

Get Earning

This API is used to retrieve the point earnings information from the completed earning process.

Example Request

{
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"earning",
   "Action":"7",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "Data":{
      "id":34523
   }
}
{
  "Result": {
    "Data": {
      "SavedTrxReward": {
        "TrxId": 3967112,
        "MemberId": 792
      },
      "Asset": {
        "UserId": 792,
        "TrxId": 3967112,
        "PtId": 3,
        "PtCode": "PTS",
        "Type": 2,
        "ClientId": 1,
        "ExpireDate": "9999-12-31T23:59:59",
        "PaId": 2121,
        "PaClientId": 1,
        "PaOwner": 792,
        "PaAssetType": 3,
        "PaStatus": 1,
        "PaValue": 30,
        "PaValueFloat": 0,
        "PaValueHold": 0,
        "PaExpired": "9999-12-31T23:59:59",
        "PaAssetValue": 1,
        "PaCurrency": "PTS",
        "PaTrx": 3967112,
        "PaUser": "792",
        "PaOwnerType": "mbr",
        "TotMonth": 15
      },
      "Reward": {
        "status": "success",
        "message": "success get transaction promo!",
        "data": [
          {
            "asset": 3,
            "product_id": 0,
            "promo_id": 35,
            "value": 15
          }
        ]
      }
    },
    "Code": 200,
    "Status": "200",
    "Message": "Success",
    "ErrorCode": "0"
  },
  "ClientId": 1,
  "Subject": "loyalty",
  "SubjectType": "trx",
  "SubjectIdentifier": "earning",
  "Action": "7",
  "ResourceType": "data",
  "Resource": "",
  "ResourceId": "",
  "UserId": 690,
  "TicketId": "f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
  "Date": "2023-10-24 11:36:19"
}


Debit H2H

This API is used for the H2H process using the signature.


Example Request

trxStampToken = Unique every request

partnerReferenceNo = Unique every request


{
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"order",
   "Action":"1",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "Data":{
      "header":{
         "timeStamp":"2023-07-06T14:12:50+07:00",
         "clientkey":"202000215",
         "partnerId":"9ec88209a7e144a58aef04ff2f01775d",
         "externalId":"41807553358950093184162180797837",
         "channelId":"95221"
      },
      "Body":{
         "partnerReferenceNo":"order0011-x9",
         "merchantId":"202000215",
         "amount":{
            "value":"10000.00",
            "currency":"IDR"
         },
         "urlParam":{
            "url":"https://example.com",
            "type":"PAY_RETURN",
            "isDeeplink":"N"
         },
         "validUpTo":"2023-12-23T07:44:11+07:00",
         "payOptionDetails":{
            "payMethod":"7",
            "payOption":""
         },
         "additionalInfo":{
            "userName":"Agung Setiadi Putra",
            "userEmail":"[email protected]",
            "userPhone":"082231838297"
         }
      },
      "trx":{
         "trxOrganization":0,
         "trxMerchantId":0,
         "trxPaymentType":0,
         "trxDate":"2022-10-26 14:37:42",
         "trxReceipt":"REF221026143742",
         "trxUser":"6281311053950",
         "trxStatus":1,
         "trxReceiptExtern":"REF221026143742",
         "trxCryptoNo":null,
         "trxStampToken":"86684e25-7262-4ed8-98a4-06f3c4befd15-9",
         "trxMaster":0,
         "trxNote":null,
         "trxPhone":null,
         "trxAddressTo":null,
         "trxSignature":null,
         "trxLatitude":null,
         "trxLongitude":null,
         "trxPayload":null,
         "virCashier":null,
         "trxHidden":0,
         "details":[
            {
               "trxIssuerId":0,
               "trxItemType":null,
               "trxCurrencyDecimal":null,
               "trxCurrencyType":null,
               "trxEvent":0,
               "trxAmount":0,
               "trxDC":null,
               "trxData":null,
               "trxDataResult":null,
               "trxPpn":0,
               "trxPph22":0,
               "trxAmountBill":0,
               "trxFee":0,
               "trxDecimalCrypto":0,
               "trxAmountCrypto":0,
               "trxGasFee":0,
               "trxConvertCrypto":0,
               "trxMarkupProcentage":null,
               "trxMarketRate":null,
               "trxStatus":0,
               "trxStampToken":"b49970bc-b0cf-4970-83a6-93f860ea1d76-4",
               "trxUser":null,
               "exactGasFee":null,
               "exactAmountCrypto":null,
               "ExactConvertCrypto":null
            }
         ]
      }
   }
}
{
   "Result":{
      "Data":{
         "Order":{
            "data":{
               "additional_info":{
                  "message":"Mohon selesaikan transaksi anda di aplikasi anda..."
               },
               "order_no":"T23110661978",
               "payment_number":"T23110661978",
               "payment_url":"https://staging-merchant .qoinhub.id/?data=https%3A%2F%2Fkit.espay.id%2Findex%2Forder%2F%3Furl%3Dhttps%3A%2F%2Fsandbox-kit.espay.id%2Fpublic%2Ftest%2Fpluginprod%26paymentId%3D661978%26commCode%3DSGWQOINHUB%26bankCode%3D008%26productCode%3DLINKAJAAPPLINK\u0026pc_code =linkaja",
               "qr_value":null
            },
            "virtualAccountData":{
               "code":"200",
               "data":{
                  "additional_info":{
                     "message":"Mohon selesaikan transaksi anda di aplikasi anda..."
                  },
                  "order_no":"T23110661978",
                  "payment_number":"T23110661978",
                  "payment_url":"https://stagin g-merchant.qoinhub.id/?data=https%3A%2F%2Fkit.espay.id%2Findex%2Forder%2F%3Furl%3Dhttps%3A%2F%2Fsandbox-kit.espay.id%2Fpublic%2Ftest%2Fpluginprod%26paymentId%3D661978%26commCode%3DSGWQOINHUB%26bankCode%3D008%26productCode%3DLINKAJAAPPLINK\\u0 026pc_code=linkaja",
                  "qr_value":null
               },
               "message":"success to update transaction payment",
               "status":"success",
               "status_code":null
            },
            "ResponseCode":"20054000",
            "ResponseMessage":"Request has been processed successfully"
         },
         "SavedTrx":{
            "TrxId":4964,
            "Tr xRId":0,
            "MemberId":792
         }
      },
      "Code":200,
      "Status":"200",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClientId":1,
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"order",
   "Action":"1",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "UserId ":690,
   "TicketId":"f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:19"
}


H2H Status

This API is used to check the status of the H2H process.

Example Request

{
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"order",
   "Action":"2",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "Data":{
      "header":{
         "timeStamp":"2023-07-06T14:12:50+07:00",
         "clientkey":"202000215",
         "partnerId":"9ec88209a7e144a58aef04ff2f01775d",
         "externalId":"41807553358950093184162180797837",
         "channelId":"95221"
      },
      "Body":{
         "originalPartnerReferenceNo":"order0011-x9",
         "serviceCode":"17",
         "additionalInfo":{
            
         }
      },
      "trxId":4964
   }
}
{
   "Result":{
      "Data":{
         "virtualAccountData":{
            "amount":11166,
            "created":"2023-11-30 13:35:12",
            "customer":{
               "billing_address":{
                  "address":null,
                  "city":null,
                  "country_code":null,
                  "email":"[email protected]",
                  "first_name":"Agung Setia di Putra",
                  "last_name":null,
                  "phone":"082231838297",
                  "postal_code":null
               },
               "email":"[email protected]",
               "first_name":"Agung Setiadi Putra",
               "last_name":null,
               "phone":"082231838297",
               "shipping_address":null
            },
            "expire":"2023-12-23 07:49:11",
            "fee":1166,
            "in itial_amount":10000,
            "items":[
               
            ],
            "merchant_name":"PT ABC",
            "merchant_no":"202000215",
            "no":"T23110661978",
            "payer_email":"[email protected]",
            "payer_name":"Agung Setiadi Putra ",
            "payer_phone":"082231838297",
            "payment":"linkaja",
            "ref_no":"order0011-x9 ",
            "state":2,
            "state_text":"To be paid",
            "status":0,
            "status_text":"Waiting for payment",
            "va_number":"\u003Cnil\u003E"
         },
         "ResponseCode":"2005500",
         "ResponseMessage":"Successful"
      },
      "Code":200,
      "Status":"200",
      "Message":"Success",
      "ErrorCode":"0"
   },
   "ClientId":1,
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"order",
   "Action":"2",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "UserId":690,
   "TicketId":"f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
   "Date":"2022-01-13 22:36:19"
}


Token B2B

This API is used to obtain the B2B signature token. In B2B Token, there are two types of actions distinguished:

5= B2B Token

6= Signature Service

Token B2B

Example Request

{
  "Subject": "loyalty",
  "SubjectType": "trx",
  "SubjectIdentifier": "order",
  "Action": "5",
  "ResourceType": "data",
  "Resource": "",
  "ResourceId": "",
  "Data": {
    "timeStamp": "2023-07-06T14:12:50+07:00",
    "clientkey": "202000215",
    "signature": "Pk5wiziFCSRMkePamfIe1X5BHoseSK9ZQus6VWQ2R+8UGCsqbYYmxUdO2+4QJ/CDPTAS2sK6vQPrnOTUaGI69Dm0+KKHm1EX73HIcyns28J1/m3RJSJoJJSdT4dBOTRAQ6Dfb/+92K7y4jY56e1hqIbxFpCPNUys+yxLx3GPB2u7JhW2b98emWi0vFh9XWPHHo9p5wewweYN9MVx1P00PdH/x4krVmnuHWDPqwk0ThSsJfABlobvjhw4zT153D34BTldNsKazJ9MeGYsxT2oCTyg0kLEitHVteLIGs9pVy9YBwOhK4q/PE7SCw09LfBcYjjuHEzdmqa0PF3b3lujHg=="
  }
}
{
  "Result": {
    "Data": {
      "AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4MmZjOGZhMi1jMWQ0LTRhM2UtYTY5My1iOGY5N2Q1ZjdhMjkiLCJjbGllbnRJZCI6IjIwMjAwMDIxNSIsIm5iZiI6MTY5NjkzNjAyNywiZXhwIjoxNjk2OTM2OTI3LCJpYXQiOjE2OTY5MzYwMjd9.cVaL9BqxcFyjvuPYVp8o4qwxhaSp3RMXCmau9UvXUGQ",
      "AdditionalInfo": {},
      "ExpiresIn": "900",
      "TokenType": "Bearer",
      "ResponseCode": "2007300",
      "ResponseMessage": "result"
    },
    "Code": 200,
    "Status": "200",
    "Message": "Success",
    "ErrorCode": "0"
  },
  "ClientId": 1,
  "Subject": "loyalty",
  "SubjectType": "trx",
  "SubjectIdentifier": "order",
  "Action": "6",
  "ResourceType": "data",
  "Resource": "",
  "ResourceId": "",
  "UserId": 690,
  "TicketId": "f8d2faf3-f8f8-42b1-8b85-993e1db47ce9",
  "Date": "2022-01-13 22:36:19"
}

Signature Service

This API is used to create a signature service.

Example Request

{
    "Subject": "loyalty",
    "SubjectType": "trx",
    "SubjectIdentifier": "sign",
    "Action": "3",
    "ResourceType": "data",
    "Resource": "",
    "ResourceId": "",
    "Data": {
      "timeStamp": "2023-07-06T14:12:50+07:00",
      "clientSecret": "oJnNPGsiuzytMOJPatwtPilfsfykSBGplhxtxVSGpqaJaBRgAvzLXqzRrrUIYvaI",
      "AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5NDU0MDAwNC04ZjNhLTQwYzUtYTVjYy1hOTI4M2ZmOTI5MjAiLCJjbGllbnRJZCI6IjIwMjAwMDIxNSIsIm5iZiI6MTY5NzAwNjg0MCwiZXhwIjoxNjk3MDA3NzQwLCJpYXQiOjE2OTcwMDY4NDB9.Me9sLg70u3O3PgifcWmuNtfgtDIhGMKKGRB6tLFUbqI",
      "BodyContent": "{\r\n \"partnerServiceId\": \" 088899\",\r\n \"customerNo\": \"12345678901234567890\",\r\n \"virtualAccountNo\": \" 08889912345678901234567890\",\r\n \"virtualAccountName\": \"Jokul Doe\",\r\n \"virtualAccountEmail\": \"[email protected]\",\r\n \"virtualAccountPhone\": \"6281828384858\",\r\n \"trxId\": \"abcdefgh12345\",\r\n \"totalAmount\": {\r\n \"value\": \"12345678.00\",\r\n \"currency\": \"IDR\"\r\n },\r\n \"billDetails\": [\r\n {\r\n \"billCode\": \"01\",\r\n \"billNo\": \"123456789012345678\",\r\n \"billName\": \"Bill A for Jan\",\r\n \"billShortName\": \"Bill A\",\r\n \"billDescription\": {\r\n \"english\": \"Maintenance\",\r\n \"indonesia\": \"Pemeliharaan\"\r\n },\r\n \"billSubCompany\": \"00001\",\r\n \"billAmount\": {\r\n \"value\": \"12345678.00\",\r\n \"currency\": \"IDR\"\r\n },\r\n \"additionalInfo\": {}\r\n }\r\n ],\r\n \"freeTexts\": [\r\n {\r\n \"english\": \"Free text\",\r\n \"indonesia\": \"Tulisan bebas\"\r\n }\r\n ],\r\n \"virtualAccountTrxType\": \"1\",\r\n \"feeAmount\": {\r\n \"value\": \"12345678.00\",\r\n \"currency\": \"IDR\"\r\n },\r\n \"expiredDate\": \"2023-08-11T12:11:33-07:00\",\r\n \"additionalInfo\": {\r\n \"enabledh2hpayments\": 4\r\n }\r\n}"
    }
}



Create VA


Create VA

This API is used to create a virtual account (VA).

Example Request

{
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"order",
   "Action":"3",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "Data":{
      "header":{
         "timeStamp":"2023-11-30T14:12:50+07:00",
         "clientkey":"202000215",
         "partnerId":"9ec88209a7e144a58aef04ff2f01775d",
         "externalId":"41807553358950093184162180797837",
         "channelId":"95221"
      },
      "Body":{
         "partnerServiceId":"088899-1",
         "customerNo":"12345678901234567890",
         "virtualAccountNo":"088899123456789012345678901",
         "virtualAccountName":"Jokul Doe",
         "virtualAccountEmail":"[email protected]",
         "virtualAccountPhone":"6281828384858",
         "trxId":"abcdefgh123452-1",
         "totalAmount":{
            "value":"12345678.00",
            "currency":"IDR"
         },
         "billDetails":[
            {
               "billCode":"01",
               "billNo":"1234567890123456782-1",
               "billName":"Bill A for Jan",
               "billShortName":"Bill A",
               "billDescription":{
                  "english":"Maintenance",
                  "indonesia":"Pemeliharaan"
               },
               "billSubCompany":"00001",
               "billAmount":{
                  "value":"12345678.00",
                  "currency":"IDR"
               },
               "additionalInfo":{
                  
               }
            }
         ],
         "freeTexts":[
            {
               "english":"Free text",
               "indonesia":"Tulisan bebas"
            }
         ],
         "virtualAccountTrxType":"1",
         "feeAmount":{
            "value":"12345678.00",
            "currency":"IDR"
         },
         "expiredDate":"2023-11-30T12:11:33-07:00",
         "additionalInfo":{
            "enabledh2hpayments":4
         }
      }
   }
} 

VA Status

This API is used to retrieve the status of a virtual account (VA).

Example Request

{
   "Subject":"loyalty",
   "SubjectType":"trx",
   "SubjectIdentifier":"order",
   "Action":"4",
   "ResourceType":"data",
   "Resource":"",
   "ResourceId":"",
   "Data":{
      "header":{
"timeStamp":"2023-11-30T14:12:50+07:00",
         "clientkey":"202000215",
         "partnerId":"9ec88209a7e144a58aef04ff2f01775d",
         "externalId":"41807553358950093184162180797837",
         "channelId":"95221"
      },
      "Body":{
"partnerServiceId": "088899-1",
         "customerNo":12345678901234567890,
         "virtualAccountNo":"9901023110661979",
         "inquiryRequestId":"abcdef-123456-abcdef",
         "paymentRequestId":"abcdef-123456-abcdef",
         "additionalInfo":{
            
         }
      }
   }
}