Visa Developer Community

Regular Visitor

VTC transaction simulate

Hello, 

I'm developing app in my sandbox, which will aggregate all spends on my card. I have successfully registered card and callback for notifications but I don't know how can I simulate transaction on this card to see if notification is correctly aggregated. Is there any API for this?

3 REPLIES 3
Visa Dev Moderator

Re: VTC transaction simulate

Hey @PawelW,

 

Can you please let me know which Visa Transaction Control API you are trying to use? Please also confirm if you have tested the "Hello World" API by using Soap UI?

 

There is also test data for your Visa Developer application that's available in the Dashboard under test data in the left navigation, this will ensure that you are using valid data that has been provisioned for specific scenarios. You will basically have a table per API that is split into the Request and Response sections and the values on the Request section are meant to be populated in the payload with the intention of obtaining results specified in the Response section.
 
Sandbox data is limited to what is provided in the Test Data tables and is not integrated to the Visa Network and you cannot test real data in sandbox (refer to screenshot examples below).

20190521 Test Data.jpg

 

20190613 VTC Alert History Customer Profiles Create Cus Alerts Pro.png

 

 

Please follow below steps to receive last mile alert delivery on Email. Currently, Sandbox supports only Email. SMS and PUSH are not available.

 

VTC VTA Alert Delivery - Email

  • Register a card

EndPoint: https://sandbox.api.visa.com/vctc/customerrules/v1/consumertransactioncontrols

Request

{"primaryAccountNumber": "418543265390XXXX"}

Response

{

  "receivedTimestamp": "2019-04-05 16:45:13.958",

  "resource": {

    "lastUpdateTimeStamp": "2019-04-05 16:42:59",

    "documentID": "ctc-vd-5c063ea2-257a-4bc1-860b-6a70f0982c0c"

  },

  "processingTimeinMs": 4

}

 

  • Create a Customer Profile and set up Customer Alert Preferences using Email

EndPoint: https://sandbox.api.visa.com/vctc/customerrules/v1/consumertransactioncontrols/customer

Request

{

  "lastName": "Sam",

  "firstName": "Jim",

  "preferredLanguage": "en-us",

  "userIdentifier": "jim123",

  "countryCode": "USA",

  "primaryAccountNumber": "418543265390XXXX",

  "defaultAlertsPreferences": [{

    "isVerified": "true",

    "contactValue": "test@abc.com",

    "contactType": "Email",

    "preferredEmailFormat": "Html",

    "status": "Active"

  }]

}

 

Response

{

  "receivedTimestamp": "2019-04-05 16:46:03.938",

  "resource": {

    "isProfileActive": true,

    "firstName": "Jim",

    "lastName": "Sam",

    "preferredLanguage": "en-us",

    "portfolioID": "001",

    "userIdentifier": "jim123",

    "preferredCountryCode": "USA",

    "defaultAlertsPreferences": [{

      "contactValue": "test@abc.com",

      "isVerified": true,

      "contactType": "Email",

      "preferredEmailFormat": "Html",

      "status": "Active"

    }]

  },

  "processingTimeinMs": 408

}

 

 

  • Set Global Control for Card Off – Use the document ID from the card registration response and userIdentifier from the Customer Profile request on the below endpoint to set up the global control.

EndPoint: https://sandbox.api.visa.com/vctc/customerrules/v1/consumertransactioncontrols/ctc-vd-5c063ea2-257a-...

Request

{"globalControls": [{

  "shouldDeclineAll": true,

  "isControlEnabled": true,

  "userIdentifier": "jim123",

  "alertThreshold": 0,

  "shouldAlertOnDecline": true

}]}

Response

{

  "receivedTimestamp": "2019-04-05 16:49:17.937",

  "resource": {

    "globalControls": [{

      "shouldDeclineAll": true,

      "isControlEnabled": true,

      "userIdentifier": "jim123",

      "alertThreshold": 0,

      "shouldAlertOnDecline": true

    }],

    "lastUpdateTimeStamp": "2019-04-05 16:49:17",

    "documentID": "ctc-vd-5c063ea2-257a-4bc1-860b-6a70f0982c0c"

  },

  "processingTimeinMs": 336

}

 

 

  • Authorization Decision Request

EndPoint: https://sandbox.api.visa.com/vctc/validation/v1/decisions

Request

{

  "cardholderBillAmount": 500,

  "pointOfServiceInfo": {

    "securityCondition": "IDENTIFICATION_VERIFIED",

    "terminalClass": {

      "isAttended": false,

      "howOperated": "CUSTOMER_OPERATED",

      "deviceLocation": "ON_PREMISE"

    },

    "presentationData": {

      "isCardPresent": true,

      "howPresented": "CUSTOMER_PRESENT"

    },

    "terminalEntryCapability": "MAG_STRIPE_READ",

    "terminalType": "POS_TERMINAL"

  },

  "messageType": "0100",

  "processingCode": "000000",

  "decisionType": "RECOMMENDED",

  "primaryAccountNumber": "418543265390XXXX",

  "retrievalReferenceNumber": "000000000002",

  "dateTimeLocal": "0322080000",

  "merchantInfo": {

    "city": "Highlands Ranch",

    "countryCode": "USA",

    "postalCode": "80130",

    "merchantCategoryCode": "5310",

    "name": "POS at ",

    "addressLines": ["6675 Business Center Dr"],

    "region": "CO",

    "currencyCode": "840"

  }

}

Response

{

  "receivedTimestamp": "2019-04-05 16:50:57.45",

  "resource": {

    "decisionResponse": {

      "decisionResponseTimeStamp": "2019-04-05 16:50:57",

      "declineRuleCategory": "PCT_GLOBAL",

      "shouldDecline": true

    },

    "decisionID": "ctc-vd-0120c917-3342-4523-bc69-85d2ef904d29"

  },

  "processingTimeinMs": 59

}

  • Send a auth completion request – Use the decision id from the Auth Decision Response in the URL below

Endpoint: https://sandbox.api.visa.com/vctc/validation/v1/decisions/ctc-vd-0120c917-3342-4523-bc69-85d2ef904d2...

Method : PUT

Request

{

  "transactionApproved": "DECLINED",

  "decisionType": "COMPLETE",

  "isDeclineResultOfTransactionControl": true

}

Response

{

  "receivedTimestamp": "2019-04-05 16:51:49.922",

  "resource": {

    "transactionApproved": "DECLINED",

    "lastUpdateTimeStamp": "2019-04-05 16:51:49",

    "decisionType": "COMPLETE",

    "isDeclineResultOfTransactionControl": true

  },

  "processingTimeinMs": 116

}

 

  • You will receive an email

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

Thanks,
Diana

Visa Dev Moderator

Re: VTC transaction simulate

Hey @PawelW,


Also, to follow up, the test data may have "XXXX" such as for example '49132098504XXXX' (given in Test data section) as the primaryAccountNumber. Please substitute the XXXX with numeric digits. For example, in my Test Data Request, I can set the primaryAccountNumber as {"primaryAccountNumber": "4255255591740001"}, which has only numeric digits (refer to screenshot below).

 

20190904 VTC Registration primaryAccountNumber Test Data.jpg

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

Thanks,
Diana

Regular Visitor

Re: VTC transaction simulate

Thanks! That's it