Re: Ressource Not found

jowilfrid
Helper

Ressource Not found

Hi Visa support,

I'm struggling for some weeks to process a simple authorization! why it's so complicated?

  • I've managed to allow VISA to generate a CSR for me and the private key, but using both of them with "Visa Developer Center Playground", I have the error:

{"responseStatus": {
"severity": "ERROR",
"code": "9125",
"message": "Authentication failed",
"status": 401,
"info": ""
}}

The endpoint is : https://sandbox.api.visa.com/acs/v1/payments/authorizations

Remark: The certificate generated by VISA (cert.pem) has a 1KB size is it normal?

 

  • I've tried using my own private key and certificate generated by OPENSSL and I've set correctly the MLE credentials (Key ID, public and private key). When I did the test at the same endpoint like the previous one I have the error: 

{"errorResponse": {
"details": {"message": "Error in processing request, Please Contact Visa Inc."},
"status": "404 NOT_FOUND"
}}

Hereafter the request Payload :

{
"acctInfo": {"primryAcctNum": {
"panExpDt": "2025-12",
"pan": "4059540001000007"
}},
"cardAcceptr": {
"clientId": "1VISAGCT000001",
"crdAcptrPhn": "1 4155552235",
"pymtFaciltrId": "52014057",
"crdAcptrCtryCd": "US",
"crdAcptrNm": "ABC Supplies",
"visaMrchId": "52014057",
"mrchCatgyCd": "4814"
},
"riskAssessmntData": {
"traExmptn": "true",
"delgtdAthntctn": "true",
"trustdMerchntExmptn": "true",
"scpExmptn": "true",
"lowVlExmptn": "true"
},
"freeFormDescrptnData": "freeformdata",
"msgIdentfctn": {"correlatnId": "12bc567d90f23e56a8f00D"},
"verfctnData": {
"cvv2Data": {"value": "321"},
"billngAddr": {
"postlCd": "12345",
"addrLn": "PO Box 12345"
}
},
"msgTransprtData": "anyroundtripinfo",
"transctn": {
"eComData": {
"cavv": "0100000000000165FD1F99011589904056830000",
"eciCd": "5",
"xid": "EEC4567F90123A5678B0123EA67890D2345678FF",
"digitalGoods": "true"
},
"posData": {
"panEntryMode": "OnFile",
"panSrce": "VCIND"
},
"localDtTm": "2016-11-25T01:02:03",
"tranAmt": {
"amt": "123.45",
"numCurrCd": "840"
},
"aciCd": "R",
"marketSpecificDataIdentifier": "B",
"tranDesc": "transactiondescription"
}
}

RessourceNotFound.png

Could you please help on thius issue?

Thank you,

Jowilfrid

13 REPLIES 13
jenn_kh
Community Moderator

Re: Ressource Not found

Thank you for reaching out, @jowilfrid! An agent is looking into this and will get back to you shortly! Until then, if any community members know a solution, please feel free to share it with Jowilfrid here. -Jenn

I_Doroteo3
Visa Developer Support Specialist

Re: Ressource Not found

Hi @jowilfrid 

 

The 401 Authentication Error is due to invalid credentials/ a certificate chaining issue.  Visa Payment Processing requires MLE and Two-Way SSL authentication. Please visit the pages below and ensure you are entering the correct information: 

 

Message Level Encryption (MLE): https://developer.visa.com/pages/encryption_guide 

Two-Way SSL: https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl 

 

Please see the link below for more information on the Developer Center Playground: 

https://developer.visa.com/pages/visa-developer-center-playground 

 

Acknowledging your remark, Visa generated certificate files are typically around 1.4 KB.

 

Thanks, 

Illana

jowilfrid
Helper

Re: Ressource Not found

Hi Illana,

I hope you're doing well. I've found out the cause of the issue. The MLE was not provided.

Now I've added the MLE within the request, but I'm facing an error with reason code 404(RessourceNotFound). All the credentials I'm using are the one generated by VISA. 

The resaon code 401 and 404 have the same root causes?

Can we have a call on this issue, please?

Best Regards,

jowilfrid

I_Doroteo3
Visa Developer Support Specialist

Re: Ressource Not found

Hi @jowilfrid,

 

Visa Developer Support typically offers assistance via email. I've created a technical support ticket for your issue and will get back to you once it has been reviewed.

 

Thanks, 

Illana

I_Doroteo3
Visa Developer Support Specialist

Re: Ressource Not found

Hi @jowilfrid

 

The 404 error is due to the project hitting an endpoint that does not exist; I notice you are using version 1 of this code; this may be out of date. Please try running the code using the most current version (v3).

 

Thanks, 

Illana

jowilfrid
Helper

Re: Ressource Not found

Hi @I_Doroteo3,

I've used the most recent endpoint as you've advised:  https://sandbox.api.visa.com/acs/v3/payments/authorizations. Also I've used the v3 authorization request but I'm still having the error 404, with this response header:

---------------------------------------------------------------------------------

Status Code: 404
Server : nginx
Date : Thu, 01 Sep 2022 11:21:49 GMT
Content-Type : application/json;charset=UTF-8
Content-Length : 689
Connection : keep-alive
X-SERVED-BY : -59647d7b68n49
X-CORRELATION-ID : 1662031309_306_1166784428_-59647d7b68n49_VDP_WS
X-ERROR-ORIGIN : 9900
X-APP-STATUS : 404
Cache-Control : no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : 0 ,-1
encrypted : true
Content-Language : en-US
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 0
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=31536000;includeSubdomains
Content-Security-Policy-Report-Only : default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-Content-Security-Policy-Report-Only : default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-WebKit-CSP-Report-Only : default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;

----------------------------------------------------------------------------------

Could you please help?

Thank you

I_Doroteo3
Visa Developer Support Specialist

Re: Ressource Not found

Hi @jowilfrid,

 

Have you tried to run the API call with Postman or SOAPUI?

 

I will reach out to the technical team regarding this issue and will reply again when I receive more information.

 

Thanks, 

Illana

 

 

I_Doroteo3
Visa Developer Support Specialist

Re: Ressource Not found

Hi @jowilfrid,

 

Please provide the following information: 

  1. Endpoint  
  2. Request Header 
  3. Request Body 
  4. Response Header (include the x-correlation-id) 
  5. Response Body 

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header. 

 

Thanks,

Illana

jowilfrid
Helper

Re: Ressource Not found

Hi @I_Doroteo3 ,

I hope you're doing well !

please find the information you've requested: 

  • Request Body 

 

const parameters = {
    'x-client-transaction-id': uuidStr,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  }

  parameters.payload = {
    msgIdentfctn: {
      clientId: '1VISAGCT000001',
      correlatnId: 'Gg6yTAyWkmhyq0jPKHziafe',
    },
    Body: {
      Tx: {
        TxAttr: ['INST'],
        TxDesc: 'transactiondescription',
        TxId: {
          LclDtTm: '2016-11-25T01:02:03',
        },
        AddtlData: {
          Val: 'freeformdata',
          Tp: 'FreeFormDescData',
        },
        TxAmts: {
          AmtQlfr: 'ESTM',
          TxAmt: {
            Ccy: '008',
            Amt: '123.45',
          },
        },
      },
      Envt: {
        Accptr: {
          PaymentFacltId: '52014057',
          CstmrSvc: '1 4155552235',
          ShrtNm: 'ABC Supplies',
          Id: '999999999999999',
          FrgnRtlrInd: true,
          Adr: {
            PstlCd: '78463',
            CtrySubDvsnMjr: '03',
            Ctry: 'US',
            CtrySubDvsnMnr: '011',
          },
        },
        Termnl: {
          TermnlId: {
            Id: '99999999',
          },
        },
        Wllt: {
          Prvdr: {
            Id: 'VCIND',
          },
        },
        Card: {
          XpryDt: '2312',
          PAN: '4000220177656623',
        },
      },
      Cntxt: {
        Vrfctn: [
          {
            VrfctnInf: {
              Val: {
                HexBinryVal: '099010618111100000000788400707000000000',
              },
              Tp: 'authenticationValue',
            },
            Tp: 'THDS',
          },
          {
            VrfctnInf: {
              Val: {
                TxtVal: '321',
              },
            },
            Tp: 'CSCV',
          },
          {
            VrfctnInf: {
              Val: {
                TxtVal: 'PO Box 12345',
              },
            },
            Tp: 'ADDB',
          },
          {
            VrfctnInf: {
              Val: {
                TxtVal: '12345',
              },
            },
            Tp: 'PCDV',
          },
        ],
        TxCntxt: {
          MrchntCtgyCd: '3501',
          MrchntCtgySpcfcData: 'B',
          AuthntcnOutgInd: true,
        },
        PtOfSvcCntxt: {
          CardDataNtryMd: 'CDFL',
        },
        SaleCntxt: {
          GoodsAndSvcsTp: 'ELEC',
          GoodsAndSvcsSubTp: 'CRCU',
        },
      },
      SplmtryData: [
        {
          Envlp: {
            StrngCstmrAuthntcn: {
              Xmptn: [
                {
                  Val: 'CLAI',
                  Tp: 'TMBE',
                },
                {
                  Val: 'NCLA',
                  Tp: 'LOWA',
                },
              ],
              DlgtdAuthrty: 'CLAI',
            },
          },
          PlcAndNm: 'EUPSD2SCADataSD1V01',
        },
      ],
      AdddmData: {
        AddtlData: {
          Val: '1234567890',
          Tp: 'PlanRegSysId',
        },
        Instlmt: {
          PmtSeqNb: '12',
          Plan: [
            {
              DfrrdInstlmtInd: true,
              PrdUnit: 'WEEK',
              SbsqntAmt: '9999.99',
              TtlNbOfPmts: 24,
              InstlmtCcy: 840,
              NbOfPrds: '2',
              PlanOwnr: 'ISSR',
              GrdTtlAmt: '234.56',
            },
          ],
        },
      },
    },
  }

  return parameters
}

 

  • Response Header (include the x-correlation-id) 

 

uuid: 8ccb849f-f04e-48b7-a0a3-a69be22c52d7
headers: 1663145000_162_1113341120_-756b6656t2_VDP_WS

 

  • Response Body 

 

Encrypted Response: {"encData":"eyJjdHkiOiJhcHBsaWNhdGlvblwvanNvbjtjaGFyc2V0PVVURi04IiwiZW5jIjoiQTEyOEdDTSIsImlhdCI6MTY2MzE0NTAwMDIzNywiYWxnIjoiUlNBLU9BRVAtMjU2In0.LYm952McsYydrh7RK3R9PchbFKGNgi__Bicy8fy7eVvpmheSiF-_a-JHOW1_LMc03wcvqEWhlSl_-0ldvAk86rPwZY6Z0NqpG5912TQ6rQOTDjPJUZfdUxHSP1dstJmgjG2xYq8h3gNqH_2e1YOY73OT4fw677FjmoiNZWQDT1nZt7rfQzmi93-uH07VZdFEbg4j-aCU4kEX04vOo1dIv1dL6s8nw9h8cspQqBqWTZevDDlJl2FXBcNvx9jWRs81cmUfyy6wjNgW0t3RdQnrA5Hni97oVY0W5NzNSB1HdsbL4CGaFk8Et6UDIj3xOyIVPfItkRpR-cSVF_j1YOLL0g.2k1dwFPV9Vy8f6yv.V-viYr5TV-51S008fjxbqVOvXNLKaRtKvtxKj_gYOBy-GRkyGFng2iCSN_F0R8A9qM_4rfOOexMge-t3RqOnQChhXMZgboQKZ6tTM19bw4fmPluqK8HLE8rv1Hj6xzTfHOSypVkEM1Z95jGeR1VExjYe1wgcQFH1.562yBGVzzyWddkpW3keFWQ"}
########### JWKBaseKeyObject {
  keystore: JWKStore {},
  length: 2048,
  kty: 'RSA',
  kid: 'AIwzm6plKRSlqIM15KUG67CxEE_pGwd_0Ld_cuPMMUw',
  use: '',
  alg: ''
}
Status: 404
Decrypted Response: "{\"errorResponse\":{\"details\":{\"message\":\"Error in processing request, Please Contact Visa Inc.\"},\"status\":404 NOT_FOUND}}"

 

Thank you