FEED Integration

Configure End Point URL

Watch This Video for a Visual Walkthrough of the Steps

Transaction & Settlement

Below is the Sample Code provided for HMAC Validation with Languages :

Transaction

private String convertTxnDetailsToString(FeedReceiverTxnPayload data) {
      if (data == null) {
          return "";
      }
 
      // Use TreeMap to store fields in alphabetical order
      Map<String, Object> detailFields = new TreeMap<>();
      detailFields.put("dba", getOrDefault(data.getData().getDba()));
      detailFields.put("tpn", getOrDefault(data.getData().getTpn()));
      detailFields.put("tpnLabel", getOrDefault(data.getData().getTagLabel()));
      detailFields.put("deviceModel", getOrDefault(data.getData().getDeviceModel()));
      detailFields.put("buildNumber", getOrDefault(data.getData().getBuildNumber()));
      detailFields.put("maskedPan", getOrDefault(data.getData().getMaskedPan()));
      detailFields.put("rrn", getOrDefault(data.getData().getRrn()));
      detailFields.put("txName", getOrDefault(data.getData().getTxName()));
      detailFields.put("transactionId", getOrDefault(data.getData().getTransactionId()));
      detailFields.put("externalReferenceId", getOrDefault(data.getData().getExternalReferenceId()));
      detailFields.put("amount", data.getData().getAmount());
      detailFields.put("baseAmount", data.getData().getBaseAmount());
      detailFields.put("totalFee", data.getData().getTotalFee());
      detailFields.put("trueCashDiscountFee", data.getData().getTrueCashDiscountFee());
      detailFields.put("commercialTaxAmount", data.getData().getCommercialTaxAmount());
      detailFields.put("localTaxAmount", data.getData().getLocalTaxAmount());
      detailFields.put("stateTaxAmount", data.getData().getStateTaxAmount());
      detailFields.put("tipAmount", data.getData().getTipAmount());
      detailFields.put("tipAdjAmount", data.getData().getTipAdjAmount());
      detailFields.put("posRequestDate", getOrDefault(data.getData().getPosRequestDate()));
      detailFields.put("posRequestTime", getOrDefault(data.getData().getPosRequestTime()));
      detailFields.put("txTime", getOrDefault(data.getData().getTxTime()));
      detailFields.put("hostResponseDate", getOrDefault(data.getData().getHostResponseDate()));
      detailFields.put("txDuration", getOrDefault(data.getData().getTxDuration()));
      detailFields.put("invoiceNumber", getOrDefault(data.getData().getInvoiceNumber()));
      detailFields.put("hostResponseCode", getOrDefault(data.getData().getHostResponseCode()));
      detailFields.put("responseText", getOrDefault(data.getData().getResponseText()));
      detailFields.put("approvalCode", getOrDefault(data.getData().getApprovalCode()));
      detailFields.put("tpnBatchNumber", getOrDefault(data.getData().getTpnBatchNumber()));
      detailFields.put("cardLabel", getOrDefault(data.getData().getCardLabel()));
      detailFields.put("sourceType", getOrDefault(data.getData().getSourceType()));
      detailFields.put("posEntryMode", getOrDefault(data.getData().getPosEntryMode()));
      detailFields.put("L2L3uploadflag", getOrDefault(data.getData().getL2L3uploadflag()));
      detailFields.put("commMedia", getOrDefault(data.getData().getCommMedia()));
      detailFields.put("destType", getOrDefault(data.getData().getDestType()));
      detailFields.put("email", getOrDefault(data.getData().getEmail()));
      detailFields.put("phoneNumber", getOrDefault(data.getData().getPhoneNumber()));
      detailFields.put("tagLabel", getOrDefault(data.getData().getTagLabel()));
      detailFields.put("tagValue", getOrDefault(data.getData().getTagValue()));
      detailFields.put("chName", getOrDefault(data.getData().getChName()));
      detailFields.put("additionalDetails", getOrDefault(data.getData().getAdditionalDetails()));
      detailFields.put("performedBy", getOrDefault(data.getData().getPerformedBy()));
      detailFields.put("cardInfo", getOrDefault(data.getData().getCardInfo()));
      detailFields.put("cardType",getOrDefault(data.getData().getCardType()));
      detailFields.put("transactionType", getOrDefault(data.getData().getTransactionType()));
      detailFields.put("cardCategory", getOrDefault(data.getData().getCardCategory()));
      detailFields.put("TermId", getOrDefault(data.getData().getTermId()));
      detailFields.put("Mid", getOrDefault(data.getData().getMid()));
      detailFields.put("description", getOrDefault(data.getData().getDescription()));
      detailFields.put("posMode", getOrDefault(data.getData().getPosMode()));
      detailFields.put("minorChannel", getOrDefault(data.getData().getMinorChannel()));
      detailFields.put("txDate", getOrDefault(data.getData().getTxDate()));
      detailFields.put("cardToken", getOrDefault(data.getData().getCardToken()));
      detailFields.put("originalRRN", getOrDefault(data.getData().getOriginalRRN()));
      // Add other fields from TxnDetailsModel as needed
      return detailFields.values().stream().map(value -> getOrDefault(value)).collect(Collectors.joining("|"));
  }
  private static final String HMAC_SHA512_ALGORITHM = "HmacSHA512";
 
Map<String, Object> fields = new TreeMap<>();
      fields.put("id", getOrDefault(feedFinalTxnPosting.getId()));
      fields.put("version", getOrDefault(feedFinalTxnPosting.getVersion()));
      fields.put("createdDt", getOrDefault(feedFinalTxnPosting.getCreatedDt()));
      fields.put("eventType", getOrDefault(feedFinalTxnPosting.getEventType()));
      fields.put("subEventType", getOrDefault(feedFinalTxnPosting.getSubEventType()));
      fields.put("requestType", getOrDefault(feedFinalTxnPosting.getRequestType()));
      fields.put("data", convertTxnDetailsToString(feedFinalTxnPosting.getData()));
 
 
      // Concatenate fields with | as delimiter
      String concatenatedString = fields.values().stream().map(value -> getOrDefault(value)).collect(Collectors.joining("|"));
 
 
      try {
          System.out.println("Before MAC Generation Value= " + concatenatedString);
          Mac sha256Hmac = Mac.getInstance(HMAC_SHA512_ALGORITHM);
          SecretKeySpec secretKeySpec = new SecretKeySpec(secretKey.getBytes(StandardCharsets.UTF_8), HMAC_SHA512_ALGORITHM);
          sha256Hmac.init(secretKeySpec);
 
 
          byte[] hashBytes = sha256Hmac.doFinal(concatenatedString.getBytes(StandardCharsets.UTF_8));
          StringBuilder hexString = new StringBuilder();
          for (byte b : hashBytes) {
              String hex = Integer.toHexString(0xff & b);
              if (hex.length() == 1) {
                  hexString.append('0');
              }
              hexString.append(hex);
          }
          return hexString.toString();
      } catch (Exception e) {
          throw new RuntimeException("Error while generating HMAC-SHA256", e);
      }
 
public static String getOrDefault(Object value) {
      return value != null ? value.toString() : "";
  }

Settlement

Map<String, String> fields = new TreeMap<>();
      fields.put("id", feedFinalTxnPosting.getId() != null ? feedFinalTxnPosting.getId().toString() : "");
      fields.put("tpn", feedFinalTxnPosting.getTpn());
      fields.put("version", feedFinalTxnPosting.getVersion());
      fields.put("createdDt", feedFinalTxnPosting.getVersionCreatedDt());
      fields.put("eventType", feedFinalTxnPosting.getEventType());
      fields.put("subEventType", feedFinalTxnPosting.getSubEventType());
      fields.put("requestType", feedFinalTxnPosting.getRequestType());
      fields.put("batchNumber", feedFinalTxnPosting.getBatchNumber());
      fields.put("settlementDate", feedFinalTxnPosting.getSettlementDate());
      fields.put("settlementCount", String.valueOf(feedFinalTxnPosting.getSettlementCount()));
      fields.put("settlementAmount", String.valueOf(feedFinalTxnPosting.getSettlementCount()));
      fields.put("settlementTxnDetails", convertSettlementTxnDetailsToString(feedFinalTxnPosting.getSettlementTxnDetails()));
 
      // Concatenate fields with | as delimiter
      String concatenatedString = fields.values().stream()
              .collect(Collectors.joining("|"));
 
      try {
          Mac sha256Hmac = Mac.getInstance(HMAC_SHA512_ALGORITHM);
          SecretKeySpec secretKeySpec = new SecretKeySpec(secretKey.getBytes(StandardCharsets.UTF_8), HMAC_SHA512_ALGORITHM);
          sha256Hmac.init(secretKeySpec);
 
          byte[] hashBytes = sha256Hmac.doFinal(concatenatedString.getBytes(StandardCharsets.UTF_8));
          StringBuilder hexString = new StringBuilder();
          for (byte b : hashBytes) {
              String hex = Integer.toHexString(0xff & b);
              if (hex.length() == 1) {
                  hexString.append('0');
              }
              hexString.append(hex);
          }
          return hexString.toString();
      } catch (Exception e) {
          throw new RuntimeException("Error while generating HMAC-SHA256", e);
      }
 
public static String convertSettlementTxnDetailsToString(List<SettlementTxnDetails> details) {
      if (details == null || details.isEmpty()) {
          return "";
      }
 
      return details.stream()
              .map(detail -> {
                  Map<String, Object> detailFields = new TreeMap<>();
                  detailFields.put("txnDate", detail.getTxnDate());
                  detailFields.put("transactionType", detail.getTransactionType());
                  detailFields.put("transactionId", detail.getTransactionId());
                  detailFields.put("txnAmount", detail.getTxnAmount());
                  return detailFields.values().stream()
                          .map(value -> getOrDefault(value))
                          .collect(Collectors.joining("|"));
              })
              .collect(Collectors.joining("|"));
  }

Transaction Types

  1. BALANCE ENQ
  2. INC AUTH
  3. INC SALE
  4. PREAUTH
  5. REFUND
  6. SALE
  7. TICKET
  8. TIP ADJUST
  9. VOID
  10. VOID PREAUTH
  11. VOID REFUND
  12. VOID SALE
  13. VOID TICKET
  • Source Types
  1. ECOM
  2. TPOS
  3. ITAP
  4. TOPH
  • Event Types
  1. Transaction
  2. Settlement

Sub Events

  • Transaction
  1. INC AUTH
  2. INC SALE
  3. PREAUTH
  4. REFUND
  5. SALE
  6. TICKET
  7. TIP ADJUST
  8. VOID
  9. VOID PREAUTH
  10. VOID REFUND
  11. VOID SALE
  12. VOID TICKET

Settlement Batch

Closed Batch

Transaction Event -

  • Transaction Process Payload

Authentication with Basic Authentication

{
  "id": "6ea412fc-7181-4eb6-bb43-d07684ceff72",
  "eventType": "Transaction",
  "subEventType": "SALE",
  "requestType": "N",
  "signature": null,
  "version": "1.0",
  "createdDt": "2024-06-04 08:53:39",
  "data": {
    "dba": "Virat",
    "tpn": "342824380352",
    "tpnLabel": "",
    "deviceModel": "Cloud POS",
    "buildNumber": "10597",
    "maskedPan": "424242******4242",
    "rrn": "428209503179",
    "txName": "SALE",
    "transactionId": "41151701526138035220241008151118",
    "externalReferenceId": "0",
    "amount": 1.3,
    "baseAmount": 0.96,
    "totalFee": 0.0,
    "trueCashDiscountFee": 0.04,
    "commercialTaxAmount": 0.0,
    "localTaxAmount": 0.2,
    "stateTaxAmount": 0.1,
    "tipAmount": 0.0,
    "tipAdjAmount": 0.0,
    "posRequestDate": "2024-10-08",
    "posRequestTime": "11:11:18",
    "txTime": "05:41:18",
    "hostResponseDate": "2024-10-08",
    "txDuration": "0.902",
    "invoiceNumber": "000002",
    "hostResponseCode": "00",
    "responseText": "NO MATCH",
    "approvalCode": "TAS176",
    "tpnBatchNumber": "469",
    "cardLabel": "VISA",
    "sourceType": "ECOM",
    "posEntryMode": "100",
    "L2L3uploadflag": "No",
    "commMedia": null,
    "destType": "TSYS - QA",
    "email": "femeyey365@seosnaps.com",
    "phoneNumber": "+19898989898",
    "tagLabel": "Clerk ID,Table ID,Invoice No",
    "tagValue": "1,2,3",
    "chName": "Dhoni",
    "additionalDetails": "",
    "performedBy": "nowona1660@ipnuc.com",
    "cardInfo": "PERSONAL",
    "cardType": "CREDIT",
    "transactionType": "CREDIT",
    "cardCategory": "CLASSIC",
    "TermId": "75091651",
    "Mid": "888000003338",
    "description": "Description",
    "posMode": "COF",
    "minorChannel": "E-Commerce",
    "txDate": "2024-10-08",
    "cardToken": "7CB5968FACE5A7127CB5968FACE5A712390655538A3C6C73",
    "originalRRN":"503711500457"
  },
  "headers": {
    "Authorization": "Basic Y2xudGtleV9SbkVfWGV5Y2lwVUVPd2VwRzF3UldBT1pDUXREQzdzblEwM",
    "Content-Type": "application/json"
  }
}

HMAC Sample Request

{
  "id": "2d4f1c3d-b1eb-4867-a168-a05e74ccd245",
  "eventType": "Transaction",
  "subEventType": "SALE",
  "requestType": "N",
  "signature": "df0047bae2540420e7645c6c323ee18a106008063fce8491b983031419429378558b74ffa16385470d7d36aa8bcc0d2a45a38e3f6d57410df90d9f970a0848c7",
  "version": "1.0",
  "createdDt": "2024-06-04 08:53:39",
  "data": {
    "dba": "Virat",
    "tpn": "342824380352",
    "tpnLabel": "",
    "deviceModel": "Cloud POS",
    "buildNumber": "10597",
    "maskedPan": "424242******4242",
    "rrn": "428209503926",
    "txName": "SALE",
    "transactionId": "35018720494938035220241008152830",
    "externalReferenceId": "0",
    "amount": 2.6,
    "baseAmount": 1.92,
    "totalFee": 0.0,
    "trueCashDiscountFee": 0.08,
    "commercialTaxAmount": 0.0,
    "localTaxAmount": 0.4,
    "stateTaxAmount": 0.2,
    "tipAmount": 0.0,
    "tipAdjAmount": 0.0,
    "posRequestDate": "2024-10-08",
    "posRequestTime": "11:28:30",
    "txTime": "05:58:30",
    "hostResponseDate": "2024-10-08",
    "txDuration": "1.26",
    "invoiceNumber": "000001",
    "hostResponseCode": "00",
    "responseText": "NO MATCH",
    "approvalCode": "TAS575",
    "tpnBatchNumber": "470",
    "cardLabel": "VISA",
    "sourceType": "ECOM",
    "posEntryMode": "100",
    "L2L3uploadflag": "No",
    "commMedia": null,
    "destType": "TSYS - QA",
    "email": "nowoa1660@ipnuc.comn",
    "phoneNumber": "+19898989898",
    "tagLabel": "Clerk ID,Table ID,Invoice No",
    "tagValue": "1,2,3",
    "chName": "Ak Arun",
    "additionalDetails": "",
    "performedBy": "femeyey365@seosnaps.com",
    "cardInfo": "PERSONAL",
    "cardType": "CREDIT",
    "transactionType": "CREDIT",
    "cardCategory": "CLASSIC",
    "TermId": "75091651",
    "Mid": "888000003338",
    "description": "Description",
    "posMode": "COF",
    "minorChannel": "E-Commerce",
    "txDate": "2024-10-08",
    "cardToken": "7CB5968FACE5A7127CB5968FACE5A712390655538A3C6C73",
    "originalRRN": "503711500457"
  },
  "headers": {
    "Content-Type": "application/json"
  }
}
FieldTypeDescription
id * string Unique id generated for each request
version * string Webhooks Integration Version
createdDt * string Webhooks Implemented Date in EST (yyyy-MM-dd HH:mm:ss)
eventType * string Transaction Event Type
subEventType * string Transaction type which was done by the Customer
requestType * string Type of Request whether to insert or update the existing record
signature string Mandatory only for HMAC enabled Merchants
  • Data Object
FieldTypeDescription
dba string Merchant Registered as Doing Business as with Dejavoo
tpnLabel string Label name which provided while onboarding
deviceModel string Device Name where merchant is performing the transactions this data will received in Second posting which we are Additional Transaction Details as request Type as Update
tpnBatchNumber string Unique number will be generated to process the settlement of merchant transactions
externalReferenceId string Merchant unique transaction reference id.
hostResponseDate string Date time of transaction initiated
amount double (USD) Amount to be charged. Amount will sent in decimal format (example 10.01)
baseAmount fee double Basic amount In cents is $100.00
description string Description of the transaction this data will received in Second posting which we are Additional Transaction Details as request Type as Update
commercialTaxAmount double Tax Calculation for the Transaction if merchant Opted [Decimal format (Ex : 10.00)]
localTaxAmount double Local Tax Calculation for the Transaction if merchant Opted [Decimal format (Ex : 10.00)]
tipAmount double Tip Amount if Customer raised [Decimal format(Ex : 10.00)]
tipAdjAmount double TipAdjust calculations [Decimal format(Ex : 10.00)]
posRequestDate string Request Received from the POS Terminal Date in EST(yyyy-MM-dd)
posRequestTime string Request Received from the POS Terminal Time in EST(yyyy-MM-dd)
transactionDate string Transaction Initiated Date in EST(yyyy-MM-dd)
transactionTime string Transaction Initiated Time in EST(yyyy-MM-dd)
hostResponseDate string Transaction Date and Time in EST(yyyy-MM-dd)
txDuration string Transaction Duration for complete process this data will received in Second posting which we are Additional Transaction Details as request Type as Update
invoiceNumber string Transaction Number generated by Issuing Bank
hostResponseCode string Received from the Issuing Bank
responseText string Received from the Issuing Bank
approvalCode string Received from the Issuing Bank
buildNumber string Transaction Processing Build this data will received in Second posting which we are Additional Transaction Details as request Type as Update
cardLabel string Card Scheme
chName string Name of Cardholder this data will received in Second posting which we are Additional Transaction Details as request Type as Update
maskedPan string First 6 digits and Last 4 digits of card number
posMode string Transaction Initiated Process
channel(sourceType) string Transaction Initiated Channel
minorChannel string Request Received Channel based on Source this data will received in Second posting which we are Additional Transaction Details as request Type as Update
commMedia string Request Process Communication Mode this data will received in Second posting which we are Additional Transaction Details as request Type as Update
destType string Transaction Acceptor Name(processor)
email string Customer Email this data will received in Second posting which we are Additional Transaction Details as request Type as Update
phoneNumber string Customer Mobile Number this data will received in Second posting which we are Additional Transaction Details as request Type as Update
tagLabel string Additional Information provided in the Edit Parameters in registration process which will shown as additional Details in HPP and GHPP Page
tagValue string Additional Information provided in the Edit Parameters in registration process which will shown as additional Details in HPP and GHPP Page
performedBy string Customer Name who performed the transaction this data will received in Second posting which we are Additional Transaction Details as request Type as Update
cardInfo string Transaction Initiated by CardHolder or Others
cardType string Card Type used by the cardholder
transactionMode string Mode of the transaction
cardCategory string Card category based on the service provider of the Card Holder
additionalDetails string Future Use this data will received in Second posting which we are Additional Transaction Details as request Type as Update
termId string TerminalId registered by the Processor to Merchant
Mid string MerchantId provided by the processor to the Merchant
l2L3uploadflag string Whether transaction has performed with L2L3 Packet or not
transactionId string iPOSpay response unique transaction id
transactionType string Type of transactions to be processed.
tpn string TPN Registered with Dejavoo System
rrn string Unique Reference Number generated by Bank System
cardToken string This is used as Tokenized Card for complete the void and Refund transactions using iposTransact API
totalFee double Total Fee Amount, Decimal format(Ex : 10.00)
trueCashDiscountFee double Discount fee if customer has using the debit card transactions , Decimal format(Ex : 10.00)
stateTaxAmount double State Tax Calculation for the Transaction if merchant Opted , Decimal format(Ex : 10.00)
posEntryMode string PosEntryMode
originalRRN string For Mapping Refund and void Sale with the original transaction

Settlement Event

This event provided the settlement of the merchants with transaction details which got settled on the batch. It will be easy for an integrator to find the transaction with count.

Sample Request Below

Basic Authentication Sample Payload

{
  "id": "f5b15dac-359f-439d-8977-a0226c467dc7",
  "eventType": "Settlement",
  "subEventType": "ClosedBatch",
  "requestType": "HTTPS",
  "signature": null,
  "version": "1.0",
  "versionCreatedDt": "2024-06-04 08:53:39",
  "batchNumber": "469",
  "settlementDate": "2024-10-08",
  "settlementCount": 2,
  "settlementAmount": 2.6,
  "tpn": "342824380352",
  "settlementTxnDetails": [
    {
      "txnDate": "2024-10-08 04:06:18",
      "transactionType": "SALE",
      "transactionId": "38939820834338035220241008133618",
      "txnAmount": 1.3
    },
    {
      "txnDate": "2024-10-08 05:41:18",
      "transactionType": "SALE",
      "transactionId": "41151701526138035220241008151118",
      "txnAmount": 1.3
    }
  ],
  "headers": {
    "Authorization": "Basic Y2xudGtleV9SbkVfWGV5Y2lwVUVPd2VwRzF3UldBT1pDUXREQzdzblEwM",
    "Content-Type": "application/json"
  }
}

HMAC Sample Payload

{
  "id": "46f69dec-fce4-444c-ba7b-64a11b9357a3",
  "eventType": "Settlement",
  "subEventType": "ClosedBatch",
  "requestType": "HTTPS",
  "signature": "464ebd627992eb451b8d8a4075d6869c685e6ce7552535318a607f7ee68cccde0856fc78ae9e84f88778c4f935b4953cc61764e3f4152032d1c0e12dd5280ff0",
  "version": "1.0",
  "versionCreatedDt": "2024-06-04 08:53:39",
  "batchNumber": "470",
  "settlementDate": "2024-10-08",
  "settlementCount": 2,
  "settlementAmount": 3.9,
  "tpn": "342824380352",
  "settlementTxnDetails": [
    {
      "txnDate": "2024-10-08 05:58:30",
      "transactionType": "SALE",
      "transactionId": "35018720494938035220241008152830",
      "txnAmount": 2.6
    },
    {
      "txnDate": "2024-10-08 06:00:28",
      "transactionType": "SALE",
      "transactionId": "64838090846138035220241008153028",
      "txnAmount": 1.3
    }
  ],
  "headers": {
    "Content-Type": "application/json"
  }
}
FieldTypeDescription
id * string Unique id generated for each request
version * string Webhooks Integration Version
createdDt * string Version Registered Date in EST (yyyy-MM-dd HH:mm:ss)
eventType * string Transaction Event Type
subEventType * string Transaction type which was done by the Customer
requestType * string Type of Request whether to insert or update the existing record
signature string Mandatory only for HMAC enabled Merchants
settlementAmount double Total Amount Settled for that TPN in Batch , Decimal format(Ex : 10.00)
batchNumber string Settled Batch Number it will unique
settlementDate string Settled Batch Date and Time in EST format in EST (yyyy-MM-dd HH:mm:ss)
SettledTxnCount long Total Txn’s Settled with Batch
tpn string TPN Registered with Dejavoo System
  • SettlementTxnDetails
FieldTypeDescription
txnDate string Transaction Initiated Date and Time in EST (yyyy-MM-dd HH:mm:ss)
transactionId string iPOSpays response unique transaction id
transactionType string Type of transactions to be processed.
txnAmount double Transaction Amount , Decimal format(Ex : 10.00)

For each transaction, two requests will be sent. In the first request, certain data fields (such as chName, minorChannel, phoneNumber, buildNumber, etc.) will be sent as null.

In the second request, you will receive the actual values for these fields. These two requests can be mapped together based on the transactionId.