VMPI callback api

martiva
Helper

VMPI callback api

Hi

 

We have some confusion around the VMPI callback api. Having taken the sample code and installed this on our server we are unable to execute a test call back.

 

Digging into this a bit further, the provided sample code seems to try to use basic authentication method;

 

from Purchase_inquiry_callback_apiApi.php

 

 // this endpoint requires HTTP basic authentication
if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {
$headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword());
}

 

however the api that has been provisioned for us requires x-pay-token.

 

Additionally when following the guide for connecting with x-pay-token I am able to do this for the hello world example without many issues. However I am not able to do this for the purchase enquiry callback, I suspect because the URI to be used in the algorithmn to generate the x-pay-token value is not the right ones. I have tried combinations of possibilities but always the response is;

 

{"responseStatus": {
"status": 404,
"code": "9005",
"severity": "ERROR",
"message": "Requested route not found",
"info": ""
}}

 

In your documentation is says that some services do not use the full URI, just a relevant part of the path such as 'helloworld'. Can someone please therefore advise how the x-pay-token should be generated for this API

 

Thanks

7 REPLIES 7
martiva
Helper

Re: VMPI callback api

to clarify - the call being done with SOAP UI to test where we get the error is;

 

GET https://sandbox.api.visa.com/vmpi/services/v1/getPurchaseInformation?apikey=xxxxxxx HTTP/1.1
Accept-Encoding: gzip,deflate
x-pay-token: xv2:1561712355:8dfe1f76dfcf01c9f4d096a44342773ec1063905abaf98bd2d7eff1e5fce95e9
Host: sandbox.api.visa.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

 

obviously i have obfuscated the api key 🙂

API_Products
Visa Developer Support Specialist

Re: VMPI callback api

Hey there @martiva,

 

VMPI API is a Visa Outbound only API. Visa’s VROL system determines if a Merchant participates in this VMPI Program and will call the Merchant Outbound URL to get additional information on a transaction performed by the Card holder.
 
To understand more about how it works, please access the link below.
https://developer.visa.com/capabilities/vmpi/docs-getting-started

 




Thanks,

Diana H.



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

martiva
Helper

Re: VMPI callback api

According to the documentation (VROL 18.2 Merchant API Doc) we should be able to respond to the incoming message with details of the purchase and if a refund has been issued etc... This is (as i understand it) part of the callback API that comes in the sample code provided when you subscribe to the product - PurchaseInformationResponse.

 

This is outlined on p29 an an optional response in the flow diagram and detailed more on page 59. Its not clear from any of the provided sample code or documentation what service endpoint you call to provide this information back to Visa.

API_Products
Visa Developer Support Specialist

Re: VMPI callback api

Hi @martiva,

 

I'll take a look and get back to you soon!

                             




Thanks,

Diana H.



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

martiva
Helper

Re: VMPI callback api

Is there any update on this?

 

I guess this boilds down to where do we provide our response to the incoming request? We can respond to the incoming post with a json message in the defined structure or do we need to post back to a endpoint as the sample code seems to suggest is required (however the endpoint in the sample code always returns a 404 response!)

 

At this point we are going down the route of returning a a json message as part of the incoming post from Visa, although we would appreciate some clarification on this as we are trying to move our development forward.

API_Products
Visa Developer Support Specialist

Re: VMPI callback api

Hey @martiva,

 

I'm currently reviewing your question and I'll get back to you soon!

 




Thanks,

Diana H.



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

API_Products
Visa Developer Support Specialist

Re: VMPI callback api

Hey @martiva,

 

Here's how to use the "intent to credit option".

 

CreditReimbursementInformationInformation:

  • CreditReimbursementSequenceNumber: Use “1” or can leave blank
  • CreditReimbursementDate:  Use the current date/time of the VMPI request.  Answers the question, “When was the credit initiated?”
  • CreditReimbursementMethod: Use the value ‘credit’ or “Refund”
  • CreditAmount:  Use the amount value of the purchase
  • CreditDate:  CreditDate will be when you anticipate the credit will post to the cardholder account. We usually say “CreditReimbursementDate + 2 days”.  Answers the question “When will the credit post to the cardholder’s account?”
  • CreditReference: Field used to provide more details about the credit.  Please use:  “A refund of was processed on .  Please allow 2-3 business days from this date for processing.”



Thanks,

Diana H.



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