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?
Solved! Go to Solution
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).
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
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
}
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
}
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
}
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
}
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
}
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).
Hello, good afternoon, I have several questions about this process.
I want to implement a cashback section in my product, it would work in the following way.
The user would subscribe to an offer, after making the purchase he would receive a notification in my backend which I use to detect if the purchase was made in the business that offered the discount and then I would assign the cashback to the user in his wallet.
To follow this flow, from what I understood, I needed to register the user's card, then I would create a rule that listens to transactions of a certain type and once the purchase notification was received I would delete that rule.
I currently have 2 empoints with the Visa API, the one to register the card and the one to register the rule, I also have an endpoint in the backend that receives the notifications.
The problem I am having is when simulating a transaction to the test card to receive the notification. I don't know how to do it and it's not clear to me in the API documentation.
I also have a question about how I can test the notification locally, that is, on my PC, if there is any way to debug and work with it.
Is this entire flow that I describe to be able to implement this cashback functionality correct? Is it possible to simulate the transaction with the test data that the API offers? Is it possible to receive the notification in my location?
These are the questions I have.
If you could please explain it to me and if you could give some examples of curls of how it is done that would be perfect.
Greetings! I'll be waiting.
Thanks! That's it