Unable to call VOP Enroll service

PD
Regular Visitor

Unable to call VOP Enroll service

Hi,

 

I am trying to call VOP Enroll service using Postman. But I am getting the below error everytime.

Error

{
"status": 403,
"reason": "AUTHENTICATION_ERROR",
"message": "Access Denied. Please consult the VDP documentation for providing your App with the proper auth credentials for the APIs being accessed."
}

 

Please find below my request.

Headers

Accept: application/json

Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  (Used Postman Basic Auth and Visa given user Id/password))

Body (Copy/Paste from sample request given in documentation- used a PAN given in test data)

{
"correlationId": "ce708e6a-fd5f-48cc-b9ff-ce518a6fda1a",
"userDetails": {
"communityCode": "SANDBOX",
"userKey": "TEST1235557881",
"membershipNumber": "123456",
"externalUserId": "356456",
"promoCode": "45261",
"referrerId": "45261",
"languageId": "en-US",
"timeZoneId": "Pacific Standard Time",
"contacts": [
{
"type": "SMS",
"value": "1234567891",
"countryCode": "1",
"isContactVerified": "false",
"isPreferred": "true"
}
],
"cards": [
{
"billingZipCode": "11901",
"cardNumber": "4XXXXXXXXXXXXXX1",
"cvv2": "925",
"expirationMonth": "9",
"expirationYear": "2020",
"nameOnCard": "XI LI"
}
],
"userAttributes": [
{
"name": "test1",
"value": "test2"
}
]
},
"communityTermsVersion": "1"
}

 

 

Please note I have created p12 certificate using private key and app key. Used the following command.

openssl pkcs12 -export -in cert.pem -inkey "privateKey.pem" -certfile cert.pem -out my_offers_cert.p12

 

And Imported it by using Chrome.

Steps: 

1. Hit chrome with https://sandbox.api.visa.com/vop/v1/users/enroll

2. Got a prompt to use cert

3. Accept

 

Can you please help me to resolve this issue

 

Regards,

PD

4 REPLIES 4
tcs
Helper

Re: Unable to call VOP Enroll service

I haven't tried with importing the keystore into chrome, instead I use the Postman native app for Mac, which allows you to add the certificates directly into Postman:

  • Go to Settings > Certificates > Add Certificate
  • Enter the domain (https://sandbox.api.visa.com).
  • Choose your App certificate (cert.pem) for the CRT file.
  • Choose the private key .pem for the KEY file.

As far as I know the chrome app version of Postman doesn't allow you to add certifcates. Using the native app, adding the certificates along with the auth header works for me.

PD
Regular Visitor

Re: Unable to call VOP Enroll service

Thanks for replying. After trying it for the 2nd time I am able to get past this issue (Without making any chnages). But I got a new issue.

Request

{
"userDetails": {
"firstName": "Test",
"lastName": "Test",
"communityCode": "SANDBOX",
"userKey": "TEST1235557881",
"externalUserId": "356456",
"languageId": "en-US",
"contacts": [{
"type": 1,
"value": "XXXXXXXXXX - my email",
"countryCode": "1",
"isContactVerified": true,
"isPreferred": true
}],
"cards": [{
"cardNumber": "4321114156363001"
}]
}
}

Response

{
"correlationId": "552a9524-c86b-476e-8fa1-78b9a0227ff7",
"responseDateTime": "Sat Mar 04 02:14:31 GMT 2017",
"responseStatus": {
"code": "FAILED",
"message": "Request failed.",
"responseStatusDetails": [
{
"code": "RTMMOBE401",
"message": "access to resource is not allowed"
}
]
}
}

 

Please note, I took all the data from the sample request except the PAN.

If you have any working request can you please share the same with me.

 

Regards,
PD

 

tcs
Helper

Re: Unable to call VOP Enroll service

I think I had the same issue. If you have not made a request to onboard a merchant or create an offer, try those first and then try the enrollment request again. It seemed to be a sequence issue, like you must have a merchant onboarded before you can enroll a customer. I just remember that I started trying a few different requests and once I got one that worked, they all started working.

ricardo_visa
Community Scholar

Re: Unable to call VOP Enroll service

Hi PD, 

 

As mentioned, for VOP runtime call you need to do Onboard Merchant call first and then do the Enroll customer call.

 

If you create a VOP app and do the Enroll Customer call first, you get the mentioned error message.

 

Let me know if this works out. 

 

Thank you,

Ricardo 




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