Quick Start
  • 26 Jul 2021
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Quick Start

  • Dark
    Light
  • PDF

Article Summary

Arcot for Merchants (AFM) provides the sandbox environment to facilitate your integration with AFM platform. Once the merchant is on boarded to AFM, the Arcot CSM for the merchant will share a Public Key, which should be used for encryption. Once this is done, Merchants can start testing the APIs in sandbox.

Simple Transaction Testing

To do a sample request to the Sandbox APIs via command line, please follow the steps below,

i. Card Encryption from Command Line

Merchants can pick a test card from the section Test cards and scenarios. After this, replace the {Card Number} part with any of the test cards from the section 'Test Cards and Scenarios' in the below command. This command will output the encrypted text of the card number

echo -n '{Card Number}' | openssl rsautl -encrypt -pubin -inkey pubkey.pem | base64 -w 0 (For RHEL/CentOS Linux)
echo -n '{Card Number}' | openssl rsautl -encrypt -pubin -inkey pubkey.pem | base64 (For macOS)

Below is an example of the above command output

echo -n '4000000000001000' | openssl rsautl -encrypt -pubin -inkey pubkey.pem | base64 -w 0

V4Qzg3pOUa9fiM7sOP57Bnf6ODtvAuS1kDihNKeIXIQDLmtrr5zWUkh0rMwxIt9+bUDQvgekrqDxAXh/sQTjkuXGrARLgdIyDdB4byasSvtDRKIeF3avOegpny2GZETFuXJQMuL14YKAOV0O2b167DqPtVsc3yNlkQO8AHJ23uF2b/Z8Vph1ZBGrptJPEIkLkslzJHwcq9TKNbl3AXHOMpREzdku4UO5pnAzVuR7NWQvC2X3IMHViv8dQfYofu7tbjVa00RUXGaMcdcVV4AX8RYLBb6xSTTHZNDUEs6UcUdDgFhNv3zby5GkE7TqOxtD35bbRDViKpf58TCmDU6JAQ==

ii. Calling EvalRisk API from Command Line

Once the encrypted card text is obtained from the above command output, replace the value of ‘CA_com_tenant’ field with the Merchant ID shared by Arcot Support and the ‘CA_com_actorId’ field with the encrypted text, in the sample JSON request, which is part of the below curl command.

You can also modify any other desired fields. Once done please post the curl command to the Sandbox API Endpoint as given below

curl --request POST 'https://sandbox-afm.arcot.com/api/v1/evalrisk' \
--header 'Content-Type: application/json' \
--data '{
    "AL_com_apiVersion": "2.1.08",
    "AL_com_destination": "MR",
    "AL_com_messageType": "REQUEST",
    "CA_acc_deviceProxyId": "1:vVbo9iNBFLLpk7ykRTWsFgPZe_DYkX0gsucnG0F6mHS8qW2n10Dbx2qj2GHMa7FJXfchmBN2oHqGVMmarfysDA",
    "AL_com_phase": "EVAL",
    "AL_com_source": "CA",
    "CA_com_industry": "RETAIL",
    "CA_com_serviceType": "RETAIL",
    "CA_com_accessMethod": "02",
    "CA_com_actorType": "PAN",
    "CA_com_actorId": "U095NtHRHg6WHpSlOqXnDmLDVlR+ZSxexIpjBhjOOu4u/AUISgtHqMBPkw3ORLqedyz8YcQwk7ARlM3dydy3TJntE2AMKkO3Yk1wdhKuAZ+OQ9Z1IMeYZroMOo/p5W6uvBbGotQvyp1lM5qnrYJMVb4nYMbAKIarpyxLghheJIHqGPrcKGD7Qty3wldQodvlW8qIQvEJ10ltsISMrxkPH3wp85GvNGIkGo+o6ILFCKa1WOEaYqzbLNohtvA6HfyoSLtIuAnCiow2JGt/qhNnoHO21Wf2pfVcDi9mzu80nhrifPCdFgj8FamdbXKY863mlGCZrz/jOztAR37DC9fu0g==",
    "CA_com_action": "PURCHASE",
    "CA_com_tenant": "MTD000000",
    "CA_com_txnId": "519b0bbc-367f-4ef8-9bf9-1d71848d5c86",
    "CA_com_sessionId": "uS9MWZrh4FKmuFd",
    "CA_com_apiVersion": "1.2.77",
    "CA_com_dtInitiated": "20200314180450",
    "CA_svc_buyerId": "ACCTID98X3fw3",
    "CA_svc_buyerInfo": {
        "chAccDate": "20140529",
        "shipAddressUsageInd": "01",
        "paymentAccAge": "20190203",
        "paymentAccInd": "05",
        "shipNameIndicator": "02",
        "chAccPwChangeInd": "05",
        "provisionAttemptsDay": "1",
        "chAccChange": "20200110",
        "chAccChangeInd": "02",
        "nbPurchaseAccount": "12",
        "chAccAgeInd": "05",
        "chAccPwChange": "20160229",
        "shipAddressUsage": "20200130",
        "txnActivityDay": "0",
        "suspiciousAccActivity": "01"
    },
    "CA_atn_fromAccount": "622925",
    "CA_atn_fromAccountFormat": "PAN",
    "CA_atn_fromAccountType": "OVERDRAFT",
    "CA_atr_panExpirYYMM": "2401",
    "CA_svc_payTokenInd": true,
    "CA_svc_payTokenSource": "",
    "CA_atn_amount": "333.65",
    "CA_svc_purchaseAmount": "33365",
    "CA_atn_currency": "840",
    "CA_svc_purchaseExponent": "2",
    "CA_atn_shoppingCart": [
        {
            "amount": "2.25",
            "category": "electronics",
            "profitablilty": "M",
            "upc": "98092094702"
        },
        {
            "amount": "4.75",
            "category": "office",
            "profitablilty": "L",
            "upc": "11098304989"
        },
        {
            "amount": "15.02",
            "category": "ebook",
            "profitablilty": "H",
            "upc": "12340970999"
        }
    ],
    "CA_atr_panCardType": "02",
    "CA_svc_previousTxnAuthcInfo": {
        "threeDSReqPriorAuthMethod": "01",
        "threeDSReqPriorRef": "4c6453da-4c56-4980-98cd-d04a064899c4",
        "threeDSReqPriorAuthTimestamp": "201810010323",
        "threeDSReqPriorAuthData": "three DS Request Prior Authentication Data"
    },
    "CA_svc_cardholderName": "CardHolder Name",
    "CA_atn_actorEmail": "cardHolderemailid@abc.com",
    "CA_svc_homePhone": {
        "cc": "1",
        "subscriber": "1234567890"
    },
    "CA_atn_actorPhone": {
        "cc": "1",
        "subscriber": "1234567890"
    },
    "CA_atn_trustedBeneficiaryStatus": "Y",
    "CA_atn_trustedBeneficiaryStatusSource": "01",
    "CA_svc_workPhone": {
        "cc": "1",
        "subscriber": "1234567890"
    },
    "CA_svc_mobilePhone": {
        "cc": "1",
        "subscriber": "1234567890"
    },
    "CA_atn_isMIT": "N",
    "CA_atn_isRecur": "N",
    "CA_atn_isSecureCorp": "N",
    "CA_atn_isSubscription": "N",
    "CA_atn_isToSelf": "N",
    "CA_atn_merchantMCC": "0742",
    "CA_atn_merchantCountry": "840",
    "CA_atn_merchantName": "MerchantName",
    "CA_svc_threeDSRqstrMaxTime": "30",
    "CA_svc_threeDSRqstrReqInd": "Y",
    "CA_atn_merchantURL": "www.MerchantWebsite.com/contact",
    "CA_atn_purchaseType": "01",
    "CA_svc_merchantRiskInd": {
        "deliveryTimeframe": "01",
        "deliveryEmailAddress": "dea@abc.com",
        "giftCardCurr": "840",
        "preOrderDate": "20210928",
        "shipIndicator": "01",
        "preOrderPurchaseInd": "01",
        "giftCardAmount": "500",
        "giftCardCount": "02",
        "reorderItemsInd": "01"
    },
    "CA_svc_notificationURL": "http://10.138.159.110:8080/3ds-merchant-stub/notify",
    "CA_atn_merchantAcqId": "123456",
    "CA_atn_merchantId": "testAcqMerId01",
    "CA_atn_shipCity": "San Diego",
    "CA_atn_shipCountry": "840",
    "CA_atn_shipAddrLine1": "1234 Main St.",
    "CA_atn_shipAddrLine2": "Apt. 567",
    "CA_atn_shipAddrLine3": "HMS",
    "CA_atn_shipPostCode": "92121",
    "CA_atn_shipRegion": "CA",
    "CA_svc_addrMatch": "N",
    "CA_atn_billingCity": "San Jose",
    "CA_atn_billingCountry": "840",
    "CA_atn_billingAddrLine1": "PO Box 987",
    "CA_atn_billingAddrLine2": "C/O Ulysses Grant",
    "CA_atn_billingAddrLine3": "HMS",
    "CA_atn_billingPostCode": "92330",
    "CA_atn_billingRegion": "CA",
    "CA_svc_threeDSCompInd": "N",
    "CA_svc_threeDSRqstrAuthcInd": "01",
    "CA_svc_threeDSRqstrAuthcInfo": {
        "threeDSReqAuthMethod": "04",
        "threeDSReqAuthData": "00",
        "threeDSReqAuthTimestamp": "202003041316"
    },
    "CA_svc_threeDSRqstrChlngInd": "01",
    "CA_com_deviceID": "CruPmhX/+FbQhFTPfiah3D/6rxcEvAMxfgzeYCHB9uGi3yZ9AMP/cwCGRRdIY0dV",
    "CA_com_deviceIDSrc": "",
    "CA_acc_deviceUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36",
    "CA_acc_browserAcceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
    "CA_acc_browserColorDepth": "24",
    "CA_acc_ipAddress": "155.35.122.4",
    "CA_acc_browserJavaEnabled": true,
    "CA_acc_browserJavascriptEnabled": true,
    "CA_acc_deviceBrowserLanguage": "en-US",
    "CA_acc_browserScreenHeight": "720",
    "CA_acc_browserScreenWidth": "1280",
    "CA_acc_deviceBrowserTimeZone": "-330",
    "CA_com_chlngWindowSize": "05",
    "CA_com_addInfo": {
        "excellentInformation": "9.9928",
        "hasFamilyMembership": "False",
        "premierMembership": "True",
        "lastChangeToPhone": "2020-01-19"
    }
}'

Sample Response

{
    "AC_svc_acsOperatorID": "acsOperatorID",
    "AC_svc_acsReferenceNumber": "acsReferenceNumber",
    "AC_svc_acsTransId": "9c2e8460-bf20-4f36-b0a6-b994e3ec1725",
    "AC_svc_authenticationValue": "AJkBAnFlCYgmkEJ1ZWUJAAAAAAA=",
    "AC_svc_dsReferenceNumber": "dsReferenceNumber",
    "AC_svc_dsTransID": "11143a3b-fd0b-4bfe-a60d-10d3749d9753",
    "AC_svc_eci": "01",
    "AC_svc_threeDSMessageType": "ARes",
    "AC_svc_threeDSMessageVersion": "2.1.0",
    "AC_svc_threeDSServerTransID": "bb08432e-6983-4139-8fce-732e764e3926",
    "AC_svc_transStatus": "Y",
    "AL_com_apiVersion": "2.1.08",
    "AL_com_destination": "CA",
    "AL_com_messageType": "RESPONSE",
    "AL_com_phase": "EVAL",
    "AL_com_source": "MR",
    "AR_com_returnCode": 0,
    "AR_com_returnDescription": "INFO: Transaction Processed Successfully",
    "CA_com_accessMethod": "02",
    "CA_com_action": "PURCHASE",
    "CA_com_actorType": "PAN",
    "CA_com_apiVersion": "1.2.77",
    "CA_com_industry": "RETAIL",
    "CA_com_serviceType": "RETAIL",
    "CA_com_sessionId": "uS9MWZrh4FKmuFd",
    "CA_com_tenant": "MTD000000",
    "CA_com_txnId": "519b0bbc-367f-4ef8-9bf9-1d71848d5c86",
    "CA_svc_buyerId": "ACCTID98X3fw3",
    "DP_com_issModelId": "",
    "DP_com_issModelReason1": "",
    "DP_com_issModelReason2": "",
    "DP_com_issModelReason3": "",
    "DP_com_issModelRtn": "",
    "DP_com_issModelScore": "-1",
    "DP_com_issTranId": "",
    "DP_com_issVersion": "",
    "DP_com_merHistBasedValues": "",
    "DP_com_merHistMetadata": "",
    "DP_com_merModelDiag": "",
    "DP_com_merModelError": "",
    "DP_com_merModelId": "AFM_GBL03",
    "DP_com_merModelInfo": "",
    "DP_com_merModelPrimingScore": "",
    "DP_com_merModelReason1": "-3",
    "DP_com_merModelReason1Desc": "\"time between txns on this device and device sharing across cards\"",
    "DP_com_merModelReason2": "-18",
    "DP_com_merModelReason2Desc": "\"geo-info of txns, connectivity and enrollment statuses on this card/device\"",
    "DP_com_merModelReason3": "+1",
    "DP_com_merModelReason3Desc": "\"time of or between txns on this card\"",
    "DP_com_merModelRtn": "04:0296",
    "DP_com_merModelScore": "157",
    "DP_com_merScoreReflectsInherence": "0.86",
    "DP_com_merTranId": "20210713085502826587",
    "DP_com_merVersion": "0.0.1",
    "DP_com_returnCode": 0,
    "DP_com_returnDescription": "",
    "II_acc_deviceCity": "islandia",
    "II_acc_deviceCountry": "united states",
    "II_acc_deviceState": "new york",
    "MR_com_dtReceived": "2021-07-13 08:55:02.000",
    "MR_com_returnCode": 0,
    "MR_com_returnDescription": "INFO: Transaction Processed Successfully",
    "MR_com_txnId": "630d811a-161a-4b87-b0f4-ea5d594a2d1b",
    "RE_com_advice": "allow",
    "RE_com_adviceRuleName": "followIssuerStatus",
    "RE_com_aux": {},
    "RE_com_auxRuleName": "",
    "RE_com_clientRuleResults": [
        {
            "followIssuerStatus": {
                "advice": "allow"
            }
        },
        {
            "defaultAllow": {
                "advice": "allow"
            }
        }
    ],
    "RE_com_exemptionClaimed": "",
    "RE_com_returnCode": 0,
    "RE_com_returnDescription": "",
    "RE_com_review": false,
    "RE_com_reviewRuleName": "",
    "RE_com_rulesetCommit": "bc02b96beee987d134b989e51e75252b",
    "RE_com_rulesetTenant": "MTD000000",
    "RE_com_rulesetVersion": 30,
    "RE_com_systemRuleResults": [],
    "TS_svc_returnCode": 0,
    "TS_svc_returnDescription": "INFO: EMV3DS Processing Successful"
}

Was this article helpful?