Commerce Connect - API Document
STEPS FOR INTEGRATION
1. JAVA Integration
- Add CommerceConnect.jar dependency in the project shared by Fiserv.
- In order to initiate a transaction request from your (merchant) check out page, create FDConnectSaleRequest Object and set mandatory fields using constructor or setter methods to set data.
- Call FDConnectUtils.saleTxn(fdConectRequest) and this method returns FDConnectSaleResponse object(It contains SessionTokenId or ErrorCode & ErrorMessage).
- If session token received successfully then do the browser redirection to https://test.fdconnect.com/Pay/?sessionToken=RDDI27SEPEHZFDR3&configId=PageId2019080820099.
- Session token is received in Step no 3 and Config Id shared by Fiserv. Browser redirection will happen to Commerce Connect payment page.
2. Integration Types
Commerce Connect is a single integration which covers the following scenarios:
Integration Type Name | Integration Type Description | Additional Parameters in getToken API |
---|---|---|
Complete payment experience at Commerce Connect |
Payment mode selection, Card details capturing and bank selection is done using Commerce Connect payment page only. |
Standard parameters expected as part of Commerce Connect integration. |
Payment mode selection at Merchant end |
Payment mode selection is at merchant end. Card details capturing and bank selection is done using Commerce Connect payment page. |
integrationType=MERCHANT_PAYMENT_MODE_BANKORWALLET_INTEGRATION paymentMethodType = NETBANKING bankId, bankName/ walletId, walletName |
Bank/Wallet selection at Merchant end but Card capture at Commerce Connect |
Payment mode selection is at merchant end and Bank/Wallet selection. Card details capturing in Commerce Connect payment page. |
integrationType=MERCHANT_PAYMENT_MODE_BANKORWALLET_INTEGRATION paymentMethodType = NETBANKING bankId, bankName/ walletId, walletName |
Link Pay integration |
Merchant generates tiny payment URL and share with the customers through SMS or Email. Once customer clicks on the tiny URL, it will redirect to Commerce Connect hosted page. |
integrationType = MERCHANT_LINK_PAYMENT_MODE_INTEGRATION configId = Page id provided by Fiserv sessionTokenExpireDate = link expiry date(dd-mm-yyyy) |
3. Merchant Transaction ID:
- When you submit your transaction request to Commerce Connect, you need to submit a merchant transaction ID as part of the request. This ID can be used by you as a universal reference number for all transaction requests submitted by you.
- Merchant transaction ID acts as a "merchant reference number". We strongly recommend that you maintain uniqueness of this ID, to avoid confusion and conflicts while retrieving transaction details subsequently.
4. FPTransaction ID:
- When your customer clicks the "Pay" button on the Commerce Connect payment page, a unique transaction ID is assigned to the transaction.
TRANSACTION REQUEST API
Request Type | Transaction(GetToken) API Call(Server2Server call) |
---|---|
Description | This API sends transaction and customer details and receive session token. This session token used to do the transaction. |
Event/Trigger of Request Type | This is Server2Server call. Merchant need to initiate this call when customer clicks on Checkout page. |
List of Parameters in Request & Response |
Parameter Name | Description | Optional/ Mandatory | Sample value |
---|---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | @Mandatory | M123456789 |
key | First Pay would assign a unique key to the merchant. This will part of sharing the integration kit with the merchant. | @Mandatory | |
iv | IV value is associated with the key shared with the merchant. | @Mandatory | |
apiURL | API URL | @Mandatory | |
merchantTxnId | Merchant needs to pass this value for every transaction request and this can be referred for future interaction. It must be unique for every transaction. | @Mandatory | TR1234 |
resultURL | This is the URL in which transaction response has to be posted back with some set of parameters once the transaction is complete. | @Mandatory | http://firstdata/ result.jsp |
transactionType | This has to be “sale” in this case. | @Mandatory | sale |
paymentMethodType | This value will be passed only if the payment selection is done at merchants end. | Conditional | creditcard/debit card/netbanking /wallet/upi |
amount | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. This is the payment amount. | @Mandatory | 100.00 |
currencyCode | This is the 3 digit currency code as defined in the master DB. | @Mandatory | INR |
hostedId | This will be passed by the merchant if the hosted IDs for the saved card are managed by the merchant for future transactions. | @Optional | KRS1220ESFFTR849 |
customerId | This has to be the customer id if the merchant wants to pass. | @Optional | CA12345 |
firstName | First Name of customer | @Optional | Abc |
lastName | Last Name of customer | @Optional | Xyz |
middleName | Middle Name | @Optional | Tbc |
suffix | Suffix to be added along with the name | @Optional | Mr/Mrs/Miss |
emailId | Customer email address. | Optional | test@gmail.com |
mobileNo | Customer phone number | Optional | Optional |
billStreet1 | billStreet1 | Optional | Aaaa |
billStreet2 | Customer billing address2 | Optional | Bbbb |
billCity | Customer billing city | Optional | Mumbai |
billState | Customer billing state | Optional | Maharashtra |
billCountry | Customer billing country | Optional | India |
billZipcode | Customer billing zip code | Optional | 400001 |
shipStreet1 | Customer billing address1 | Optional | Aaaa |
shipStree2 | Customer billing address2 | Optional | Bbbb |
shipCity | Customer billing city | Optional | Mumbai |
shipState | Customer billing state | Optional | Maharashtra |
shipCountry | Customer billing country | Optional | India |
shipZipcode | Customer billing zip code | Optional | 400001 |
productData | This needs to be passed if single transaction is initiated for multiple products with different price. The sum of price of all the products will be equal to the total transaction amount of the request. | Optional | |
airlineData | This field is for the merchants who captures airline booking transactions. | Optional | |
integrationType | This filed indicates integration type. | Conditional | Refer General. 2. Integration types |
cardData | This field is required if merchant captures the card detail in its own page and pass as part of transaction request. | Conditional | Card no, expiry month, expiry year, |
bankData | This field is required if merchant wants to capture the bank selection at its end. | Conditional | bankId, bankName |
walletData | This field is required if merchant wants to capture the wallet selection at its end. | Conditional | walletId, walletName |
upiData | This field is required if merchant wants to capture the UPI details (VPA) at its end. | Conditional | abc@icick |
configId | In case of Link pay this is mandatory. Page Id shared by Fiserv. | Conditional | |
sessionTokenExpir eDate | In case of Link pay this is mandatory. Link expiry date (dd-mm-yyyy). | Conditional | |
udf1 | Optional | ||
udf2 | User defined field | Optional | |
udf3 | User defined field | Optional | |
udf4 | User defined field | Optional | |
udf5 | User defined field | Optional | |
udf6 | User defined field | Optional | |
udf7 | User defined field | Optional | |
udf8 | User defined field | Optional | |
udf9 | User defined field | Optional | |
udf10 | User defined field | Optional |
Sample Request Code
{
"resultURL":
"https://test.fdconnect.com/MerchantApp/merchantSuccessPage.jsp",
"transactionDetails": {
"clientTransactionId": "fjgjg865",
"transactionType": "sale",
"amount": "100",
"currencyCode": "INR"
},
"customerDetails": {
"customerId": "ABC1234",
"name": {
"firstName": "ABC",
"lastName": "XYZ",
"middleName": "DEF",
"suffix": "ADX"
},
"mobileNo": "1234567890",
"emailId": "abc@gmail.com",
"billingAddress": {
"street1": "Ghodbandar Rode",
"stree2": "Sai Nagar",
"city": "Mumbai",
"state": "Maharashtra",
"country": "India",
"zipcode": "400000"
},
"shippingAddress": {
"street1": "Ghodbandar Rode",
"stree2": "Sai nagar",
"city": "Mumbai",
"state": "Maharashtra",
"country": "India",
"zipcode": "400000"
}
},
"productData": {
"productId": "P123",
"productDescription": "Water Bottle",
"quantity": 1,
"price": "100",
"txnAmount": "120",
"shippingFee": "20",
"discountPrice": "0"
}
};
Sample Code
public class SaleTest
{
public static void main(String[] args)
{
//Using Constructor
FDConnectSaleRequest request = new
FDConnectSaleRequest("470000000332252","CNy+HimxmI4PmrJWrpLarBfbo6
jIY/CHcezg2VQ8u5o=","9T4hd3Nx0b0sMgYuyWLCTg==","https://www.test.f
dmerchantservices.com/FirstPayL2Services/gettoken","10","INR","TRA
123456","sale","https://merchantresposneurl");
//Using Setter methods /*
FDConnectSaleRequest request = new FDConnectSaleRequest();
request.setMerchantId("470000000332252");
request.setKey("CNy+HimxmI4PmrJWrpLarBo6jIY/CH8u5o=");
request.setIv("9T4hd3Nx0b0sMgYuyWLCTg==");
request.setResultURL("http://localhost:8080");
request.setAmount("10");
request.setCurrencyCode("INR");
request.setMerchantTxnId("TRA123456");
request.setTransactionType("sale");
request.setCustomerId("CUST1234");
request.setFirstName("D'costa-Flavin");
request.setLastName("Last Name");
request.setMiddleName("Middle Name");
request.setSuffix("Mr");
request.setMobileNo("9769970828");
request.setEmailId("Prashanth@gmail.com");
request.setBillStreet1("billStre'et1address");
request.setBillStree2("billStree2");
request.setBillState("billState");
request.setBillCity("billCity");
request.setBillState("billState");
request.setBillZipcode("123456789");
request.setShipStreet1("shipStreet1");
request.setShipStree2("shipStree2");
request.setShipCity("shipCity");
request.setShipState("shipState");
request.setShipZipcode("123456789");
List productList = new
ArrayList<>();
ProductDataBean bean = new
ProductDataBean();
bean.setProductId("Prod1");
bean.setProductDescription("productDescription");
bean.setQuantity("1");
bean.setPrice("10");
bean.setTxnAmount("10");
bean.setShippingFee("0");
bean.setDiscountPrice("0");
productList.add(bean);
request.setProductData(productList);
request.setApiURL("https://test.fdconnect.com/Fi
rstPayL2Services/gettoken"); */
FDConnectSaleResponse resp = FDConnectUtils.saleTxn(request);
System.out.println("respSessionTokenId :"+resp.getSessionTokenId());
System.out.println("resp
ErrorCode :
"+resp.getErrorCode());
System.out.println("resp
ErrorMessage :
"+resp.getErrorMessage());
}
}
Parameter Name | Description | Sample value |
---|---|---|
sessionToken | This is the unique id assigned to the transaction. | RDDI27SEPEHZFDR3 |
errorCode | Error code | 400 BAD_REQUEST |
errorMessage | Error description | FPDR4013:Merchant_ txn_id cannot be blank. |
udf1 | User defined field | |
udf2 | User defined field | |
udf3 | User defined field | |
udf4 | User defined field | |
udf5 | User defined field | |
udf6 | User defined field | |
udf7 | User defined field | |
udf8 | User defined field | |
udf9 | User defined field | |
udf10 | User defined field |
Sample Response Code
hmac=bfe47a8e907452f098f9ded15f1829b5bc187a3ac551a3c904528af13cbf043d9c6b0d9034dbacc773c357daa50d4e1bfce583007918fb8a01aa2db14f16d226
encdata=+F+0j+9oIIlr+0t4UiJ/nKCtb+BdX7w65EN2Dr+R3UaE3r28HtsA9aNfndGtpGyhU2r9sKFCn6DRtTKqMo9wRbMOIs/b2oY6v4R1zk4cO4loD1HzZ3Pg+GvmRWn3e2P0Hhm7bO8/7efRQj6VN1Zdz0a2BebbUYzDW5CZKctFFQQg5h0xJwVfN1Ywhj3LIYqmTKFSInFJ9nEBkLcCUcqyZjIGd/i9eZhvdN2OT2hpBlN15VwCiIiWo6kXr0mcy5dhFm0oN9TwDxJJtKoLdCwfizjozS5AHSyz9o51v30OSp5ZYIWAcFD8Q38M1Ah6trz99Txg8DD/H4C7PXqD9cHU9wjV/9Zpg3Krb9L1Ta0FzE5EjX33z6L+j7G4rkEvsA4DyFDSzdXwnUrTZJff7ZzlhqdQ/CNqFqOw8i89RL50jdorhcU6i+N6cfqKP1BU2RjtRt452VPposYmczUNX9crwS7yxYR8Z+QiYeuZGafYwjy4diU/mTMMv4L7pLtmxG2jzoHnPxnibbdyrrYdPQ1P7xxrRBXESN3xn5/WJUvrtulnJImcgKSIMyZU/WOuuf/sEPlVcbBktjoKJeEX7qwHeIRp9pqFV18WorRNFEYf4G6ZV0+E1FeJ3NQZk7yCyfnES9HQP4pR9cGZgIJvcDjxBWGW6HoNLJJsWXp6S+I1ZMYKlCW8f1G9n07PyeNygCztNiOvM53B6TfVBPuTN7396x25AK+Xf9DFPOBASiAu0lwhFjcAxPjpEUxmHKzk0wW5MQwvD77v3x+1aBWLoQZ1Gked2nOQx38lt0Vcc0lIIoucRla7sxu5wGiCiMilAIq4MGn4aLLOpDeICT0Dn892ixpt2zvPprXorNGNtWtj+PZy02ND9HbNQWOuE3kNf5vdu1GYfwf8G4Yl9ebMbiAoys6iG2XFXILE6JDelzCCafCGEwUVzqu4qMpvHs4/omJvXKH/HjKtB+yZC0jSIuejFSPSXwP0u7whcPe35rthl9FwVVTtIwqtYqOTA7WxIGjdCnkNVTukgh8C78n1x2UjSom6TgtJlKVbl8Rfb/QujGSZJtsk+qjxYtvL4ZSOnZB2rBEEZoQ/Njq4Q2o82xp2mQ==
sessionToken=QJUNJXG0FOJ3E4VJIMS
Redirection to Commerce Connect Page
Step 1: Use the “sessionToken” and “configId” to generate the redirection URL for payment page.
Step 2: The redirection URL will be as https://test.fdconnect.com/Pay/?sessionToken={received through getToken API call response}&configId={Page Id shared by Fiserv}.
Step 3: Redirect to the above URL from merchant page to proceed with the transaction.
Transaction authorization request processing by Commerce Connect
Commerce Connect will initiate the transaction authorization request with transaction prcessing channel/issuer bank based on the payment mode selected
Receipt of transaction authorization response by Commerce Connect
Transaction authorization response from transaction prcessing channel/issuer bank based on payment mode selected
Transaction response handling API overview
MERCHANT RESPONSE HANDLING
After transaction is completed, Commerce Connect application post the final response on merchant resultURL.
The following fields available as part of response:
- fpTxnId
- encData – Encrypted response message
- merchantId
After getting the above fields write the following code to decrypt the data and display the response to customer.
Request Type | Decrypt Response API Call(Server2Server call) |
---|---|
Description | This API used do the decrypt the transaction data. |
Event/Trigger of Request Type | This is Server2Server call. Merchant can initiate this API to decrypt the transaction details. |
List of Parameters in Request & Response |
Sample Code
public class DecryptTest
{
public static void main(String[] args)
{
FDConnectDecryptRequest fdConnectDecryptRequest = new
FDConnectDecryptRequest("470000000332252","dMaRD5LgrSQ2sfIM8eFjZAV
2lus/Kkr7FhKDuv7sNMqkQheLJaKjoKayt+rDBAeuf4Uhy9O1MTRIFCZcRCr7jAasA
NBcbmLENRToIaz54HSgCMT1Y6F5HA52WSpm+qWFMiJhvvQg0dV9c4TjZHGd5H1k9Jq
6Ti4WZv8hti0Cl+k6uEP4VATCFEFEBnROoOHDW1CipglBkwQyDb5Zz+n04il3QFcuD
kHsDvphj4OwEZetGInQTD3JG+NUUIi/JjEenkARW5F6F6+xYkuLRBYW6XVxs/MLdsG
zVjTlEuHh5Q2xGE4TQ6bVGCq3Z37ojNceUKX7pCJv47aAJCOxpUjuK0TZwC8hOx5/V
MZXPZR3E4NP03sKOos8cJxam4GFi9Ize7ci+efcI20EnbS8f4OncFZ3u6z59pBKaGn
ytTfaM+GzdcVxS1IapXpQwQO5pDhLF8N3pqRR6U3mU39ArsWyv9bh1c2TO7aAMRqnz
xhvAqlIveVHGo3ZoAvtavVcVX/1vuIlJyetziblaQzCJU7isXW2iDDYlyXUZA2Qp2U
pAi1HTY2pqo/WQLR8g8wbjNViDt6cAh7BYHtHGiikZiQU3rHJS5UuHvNl1d3w8pd92
8oBjzvoAbqMCCDqJ9wCYzoUDLmSyZCV2v64vIrFGFrDuATVPi+SKG42BGNBM6lkSMw
QtUZhHJ1jDfAAamVMmVdnmVh2vUZQoSQ6hBhYWTxYvj3BR8jKFSfnuwIf+Cy65n+KZ
FO6xSckOEsznWalcXD0z5lZ8U3c5AHUpHEwhX62qFvDpxHEhXphX2jhiFdHD3kX4oL
WNtVtL2VXGgtwS5U7MqraDx8RIHoUlfwdUA+HXw==","2019102520378696","htt
ps://www.test.fdmerchantservices.com/FirstPayL2Services/decryptMer
chantResponse");
FDConnectDecryptResponse resp =
FDConnectUtils.decryptMsg(fdConnectDecryptRequest);
System.out.println(resp.getErrorCode());
System.out.println(resp.getErrorMessage());
System.out.println(new Gson().toJson(resp));
}
}
Parameter Name | Description | Optional/ Mandatory | Sample value |
---|---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | Mandatory | M123456789 |
apiURL | This is the url in which transaction request has to be posted and receives response. | Mandatory | |
fdcTxnId | This transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | Mandatory | |
encrypatData | This transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | Mandatory |
TRANSACTION REFUND API
Request Type | Refund API Call(Server2Server call) |
---|---|
Description | This API used do the refund transaction. |
Event/Trigger of Request Type | This is Server2Server call. Merchant can initiate whenever he required. |
List of Parameters in Request & Response |
1. Request Parameters for Refund Transaction
Parameter Name | Description | Optional/ Mandatory | Sample value |
---|---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | Mandatory | M123456789 |
key | First Pay would assign a unique key to the merchant. This will part of sharing the integration kit with the merchant. | Mandatory | |
iv | IV value is associated with the key shared with the merchant. | Mandatory | |
merchantTxnId | Merchant needs to pass this value for every transaction request and this can be referred for future interaction. It must be unique for every transaction. | Optional | |
apiURL | This is the url in which transaction request has to be posted and receives response. | Mandatory | https://www.test.fdmerch antservices.com/FirstPayL2Se rvices/ refundTxnDetail |
fdcTxnId | This transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | Mandatory | |
refundAmount | Amount to refund | Mandatory |
Sample JSON request for refund
{
"merchantTxnId":"lyg59zk1fj",
"merchantId":"000000000123456",
"fpTransactionId":"2021070250167208",
"refundAmount":"2.00"
}
Sample Request Code
public class RefundTest
{
public static void main(String[] args)
{
FDConnectRefundRequest firstPayRefundRequest = new
FDConnectRefundRequest("470000000332252","CNy+HimxmI4PmrJWrpLarBfb
o6jIY/CHcezg2VQ8u5o=","9T4hd3Nx0b0sMgYuyWLCTg==","https://test.fdconnect.com/FirstPayL2Services/refundTxnDetail","12345
6","2019092518359898","1");
FDConnectRefundResponse resp =
FDConnectUtils.refundTxn(firstPayRefundRequest);
System.out.println(resp.getAmount());
System.out.println(resp.getFdcRefundTxnId());
System.out.println(resp.getFdcTxnId());
System.out.println(resp.getPaymentType());
System.out.println(resp.getTxnStatus());
System.out.println(new Gson().toJson(resp));
}
}
Parameter Name | Description | Sample value |
---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | M123456789 |
fdcTxId | This transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | |
fdcRefundTxnId | This refund transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | |
txnStatus | Transaction Status description | |
txnStatusCode | Transaction Status code | 399 |
amount | Refund amount | |
txDate | Transaction date | |
currencyCode | Transaction currency code | |
Balance | Balance amount after refund | |
cardBrand | Card brand | @mdo |
bankCode | Bank Code | |
errorCode | Error code | |
errorMessage | Error description |
Sample JSON response for refund response
{
"fpTransactionId": "2021070830683664",
"fpRefundTransactionId": "2021070831327715",
"merchantId": "000000000123456",
"extTransactionId": "30341786",
"extOrderIdOrToken": "2021070830683664",
"transactionStatus": "REFUND_INITIATED",
"amount": "2.00",
"txDate": "Jul 8, 2021 10:18:11 AM",
"currencyCode": "MYR",
"balance": "8.00"
}
Check of refund amount with sales volume
Check the refund amount with the available sales volume for the particular day
Refund presentment by Commerce Connect
Separate refund presentment is done for each payment mode by Commerce Connect in FIFO manner based on availabilty of sales volume
Receipt of payment presentment confirmation by Commerce Connect
Commerce Connect will receive the confirmation from the transaction processing channel on the actual refund presentment status
Update the status of refund
Status if the refund is updated from "REFUN INITIATED" to "REFUND PRESENTED"
TRANSACTION INQUIRY API
Request Type | Transaction Inquiry API Call(Server2Server call) |
---|---|
Description | This API used for transaction inquiry. In response it will return SALE and REFUND transactions based on Commerce Connect transaction Id. |
Event/Trigger Request Type | This is Server2Server call. Merchant can initiate whenever he required. |
List of Parameters in Request & Response |
Parameter Name | Description | Optional/ Mandatory | Sample value |
---|---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | Mandatory | M123456789 |
key | First Pay would assign a unique key to the merchant. This will part of sharing the integration kit with the merchant. | @Mandatory | FD0001 |
iv | IV value is associated with the key shared with the merchant. | @Mandatory | Srffhjtcv1345nk |
merchantTxnId | Merchant needs to pass this value for every transaction request and this can be referred for future interaction. It must be unique for every transaction. | @Mandatory | TR1234 |
apiURL | This is the url in which transaction request has to be posted and receives response. | @Mandatory | https://test.fdconnect.com/FirstPayL2Services/getTxnInquiryDetail |
Sample JSON request of transaction inquiry
{
"merchantTxnId":"123456",
"merchantId":"470000000123456",
"fpTransactionId":"2019081616940480"
}
Sample Request Code
public class InquiryTest
{
public static void main(String[] args)
{
//Using Constructor
FDConnectInquiryRequest firstPayInquiryRequest = new
FDConnectInquiryRequest("470000000332252","CNy+HimxmI4PmrJWrpLarBf
bo6jIY/CHcezg2VQ8u5o=","9T4hd3Nx0b0sMgYuyWLCTg==","https://www.tes
t.fdmerchantservices.com/FirstPayL2Services/getTxnInquiryDetail","
123456","2019092518359898");
//Using Setter methods
FDConnectInquiryRequest firstPayInquiryRequest1 = new
FDConnectInquiryRequest();
firstPayInquiryRequest1.setMerchantId("470000000332252");
firstPayInquiryRequest1.setMerchantTxnId("123456");
firstPayInquiryRequest1.setFdcTxnId("2019092518359898");
firstPayInquiryRequest1.setApiURL("https://www.test.fdmercha n
tservices.com/FirstPayL2Services/getTxnInquiryDetail");
firstPayInquiryRequest1.setKey("CNy+HimxmI4PmrJWrpLarBfbo6jIY/CHcezg2VQ8u5o=");
firstPayInquiryRequest1.setIv("9T4hd3Nx0b0sMgYuyWLCTg==");
FDConnectInquiryResponse resp =
FDConnectUtils.inquiryTxn(firstPayInquiryRequest);
System.out.println(resp.getErrorCode());
System.out.println(resp.getErrorMessage());
System.out.println(new Gson().toJson(resp));
}
}
Parameter Name | Description | Optional/ Mandatory | Sample value |
---|---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | Mandatory | M123456789 |
key | First Pay would assign a unique key to the merchant. This will part of sharing the integration kit with the merchant. | @Mandatory | FD0001 |
iv | IV value is associated with the key shared with the merchant. | @Mandatory | Srffhjtcv1345nk |
merchantTxnId | Merchant needs to pass this value for every transaction request and this can be referred for future interaction. It must be unique for every transaction. | @Mandatory | TR1234 |
apiURL | This is the url in which transaction request has to be posted and receives response. | @Mandatory | https://test.fdconnect.com/FirstPayL2Services/getTxnInquiryDetail |
Sample JSON response for transaction inquiry
{
"fpTransactionId": "2021070830683664",
"merchantId": "000000000123456",
"saleTxnDetail": {
"merchantTxnId": "C-2a91ba3d-3b5d-4822-bf4a-44770b416c6a",
"externalTxnId": "30341786",
"transactionType": "SALE",
"baseCurrency": "MYR",
"transactionCurrency": "MYR",
"baseAmount": "10.00",
"transactionAmount": "10.00",
"balanceAmount": "8.00",
"paymentMethod": "RMS",
"transactionStatus": "SUCCESS",
"transactionStatusCode": "300",
"transactionStatusDescription": "SUCCESS",
"tranEnquiryCount": "2",
"transactionDateTime": "2021-07-08 10:07:26.0398",
"authDate": " ",
"authCode": "36543786",
"externalOrderTokenId": "2021070830683664",
"bankName": " ",
"cardScheme": " ",
"bankCode": " ",
"udf1": " ",
"udf2": " ",
"udf3": " ",
"udf4": " ",
"udf5": " ",
"udf6": " ",
"udf7": " ",
"udf8": " ",
"udf9": " ",
"udf10": " "
},
"refundTxnDetail": [
{
"merchantTxnId": "C-2a91ba3d-3b5d-4822-bf4a-44770b416c6a",
"externalTxnId": "30341786",
"transactionType": "REFUND",
"baseCurrency": "MYR",
"transactionCurrency": "MYR",
"baseAmount": "2.00",
"transactionAmount": "10.00",
"paymentMethod": "RMS",
"transactionStatus": "REFUND_INITIATED",
"transactionStatusCode": "200",
"transactionStatusDescription": "REFUND_INITIATED",
"transactionDateTime": "2021-07-08 11:06:08.0224",
"fpRefundTransactionId": "2021070831327715",
"authDate": " ",
"authCode": "30341786",
"externalOrderTokenId": "2021070830683664",
"bankName": " ",
"cardScheme": " ",
"bankCode": " ",
"udf1": " ",
"udf2": " ",
"udf3": " ",
"udf4": " ",
"udf5": " ",
"udf6": " ",
"udf7": " ",
"udf8": " ",
"udf9": " ",
"udf10": " "
}
]
}
STANDING INSTRUCTION TRANSACTION API
Request Type | Standing Instruction subsequent API Call(Server2Server call) |
---|---|
Description | This API used do the SI subsequent transactions. |
Event/Trigger of Request Type | This is Server2Server call. Merchant can initiate whenever he required. |
List of Parameters in Request & Response |
1. Request Parameters for Standing Instruction Transaction
Parameter Name | Description | Optional/ Mandatory | Sample value |
---|---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | Mandatory | M123456789 |
key | First Pay would assign a unique key to the merchant. This will part of sharing the integration kit with the merchant. | Mandatory | |
iv | IV value is associated with the key shared with the merchant. | Mandatory | |
merchantTxnId | Merchant needs to pass this value for every transaction request and this can be referred for future interaction. It must be unique for every transaction. | Mandatory | https://test.fdconnect.com/FirstPayL2Services/refundTxnDetail |
fdcTxnId | This transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | Mandatory | |
txnAmount | Transaction Amount | Mandatory | |
hostedId | |||
currencyCode | |||
customerId |
Parameter Name | Description | Optional/ Mandatory |
---|---|---|
merchantId | This is the unique id assigned to the merchant at the time of on boarding in Commerce Connect system. | |
resultUrl | This is the url in which transaction response is done. | |
fdcTxnId | This transaction id is returned by Commerce Connect to merchant after successful/failure of the transaction. The same need to pass to get the transaction status. | |
transactionType | Transaction Type like Sale | |
baseCurrency | Base Currency | |
transactionCurrency | Transaction Currency | |
baseAmount | Base Amount | |
transactionAmount | Transaction Amount | |
balanceAmount | Amount available for withdraw | |
paymentMethod | Payment Method | |
convFee | Convenience fee applied on base amount | |
taxFee | Otto | |
transactionStatus | Transaction Status | |
transactionStatusDescription | ||
transactionDateTime | Transaction Date and Time | |
udf1 | User defined field | |
udf2 | User defined field | |
udf3 | User defined field | |
udf4 | User defined field | |
udf5 | User defined field | |
udf6 | User defined field | |
udf7 | User defined field | |
udf8 | User defined field | |
udf9 | User defined field | |
udf10 | User defined field | |
errorCode | Error code | |
errorMessage | Error description |
Sample Code
public class SITest
{
public static void main(String[] args)
{
FDConnectSITxnRequest fDConnectSITxnRequest = new
FDConnectSITxnRequest("470000000332252","CNy+HimxmI4PmrJWrpLarBfbo6jIY/CHcezg2V
Q
8u5o=","9T4hd3Nx0b0sMgYuyWLCTg==","http://localhost:8100/FirstPayL2Services/sta
n
dingInstructionTxn","2019112539788225","FA5C1D88-1DD4-4700-AD2F-6F85ED763FCB","900","INR");
FDConnectSITxnResponse fDConnectSITxnResponse =
FDConnectUtils.standingInstructionTxn(fDConnectSITxnRequest);
System.out.println(new Gson().toJson(fDConnectSITxnResponse));
}
}
Download
Commerce Connect Integration Pack | |
---|---|
Commerce connect Merchant Integration Kit Java
, Commerce connect Error Codes, CommerceConnect.jar |
|