Re: VisaNet connect acceptance - Sale Api always returns 400 bad request

sijoyjoseph
New Contributor

Visanet connect acceptance bad request

Hi, I am trying to execute the sample sale api but I always receive a 400 bad request.

 

Request Body:

{
  "msgIdentfctn": {
    "clientId": "1VISAGCT000001",
    "correlatnId": "abcdefga0000005N"
  },
  "Body": {
    "Tx": {
      "AddtlSvc": {
        "Tp": "DCCV"
      },
      "TxAttr": [
        "INST"
      ],
      "TxDesc": "transactiondescription",
      "SpclPrgrmmQlfctn": {
        "Dtls": [
          {
            "Val": "Y",
            "Nm": "ACI"
          }
        ],
        "Prgrmm": "CPS"
      },
      "TxAmts": {
        "TxAmt": {
          "Ccy": "008",
          "Amt": "100.1"
        }
      }
    },
    "Envt": {
      "Accptr": {
        "PaymentFacltId": "52014057",
        "CstmrSvc": "1 4155552235",
        "Id": "520142254322",
        "FrgnRtlrInd": true,
        "Adr": {
          "Ctry": "US"
        }
      },
      "Termnl": {
        "TermnlId": {
          "Id": "10012343"
        }
      },
      "Card": {
        "XpryDt": "2312",
        "PAN": "4000220177656623"
      }
    },
    "Cntxt": {
      "Vrfctn": [
        {
          "VrfctnInf": {
            "Val": {
              "HexBinryVal": "1234"
            },
            "Tp": "authenticationValue"
          },
          "Tp": "THDS"
        },
        {
          "VrfctnInf": {
            "Val": {
              "TxtVal": "PO Box 12345"
            }
          },
          "Tp": "ADDB"
        },
        {
          "VrfctnInf": {
            "Val": {
              "TxtVal": "12345"
            }
          },
          "Tp": "PCDV"
        }
      ],
      "TxCntxt": {
        "MrchntCtgySpcfcData": "B"
      },
      "PtOfSvcCntxt": {
        "CardDataNtryMd": "CDFL"
      },
      "RskCntxt": {
        "RskInptData": {
          "Val": "172.20.253.209",
          "Tp": "IPAddr"
        }
      },
      "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"
          }
        ]
      }
    }
  }
}

 

Response body:

{
    "responseStatus": {
        "status": 400,
        "code": "9125",
        "severity": "ERROR",
        "message": "Expected input credential was not present",
        "info": ""
    }
}
3 REPLIES 3
sijoyjoseph
New Contributor

Re: Visanet connect acceptance bad request

I think I wasn't considering message level encryption, but after implementing message level encryption I am getting a new error : 

{
    "responseStatus": {
        "status": 403,
        "code": "9611",
        "severity": "ERROR",
        "message": "Authorization Failed for the URL.",
        "info": ""
    }
}
sijoyjoseph
New Contributor

VisaNet connect acceptance - Sale Api always returns 400 bad request

Hi, I've been trying to run the sample sales api provided in the api reference but the api always return 400 bad request. 

 

Request body: 

{
  "msgIdentfctn": {
    "clientId": "1VISAGCT000001",
    "correlatnId": "abcdefga0000005N"
  },
  "Body": {
    "Tx": {
      "AddtlSvc": {
        "Tp": "DCCV"
      },
      "TxAttr": [
        "INST"
      ],
      "TxDesc": "transactiondescription",
      "SpclPrgrmmQlfctn": {
        "Dtls": [
          {
            "Val": "Y",
            "Nm": "ACI"
          }
        ],
        "Prgrmm": "CPS"
      },
      "TxAmts": {
        "TxAmt": {
          "Ccy": "008",
          "Amt": "100.1"
        }
      }
    },
    "Envt": {
      "Accptr": {
        "PaymentFacltId": "52014057",
        "CstmrSvc": "1 4155552235",
        "Id": "520142254322",
        "FrgnRtlrInd": true,
        "Adr": {
          "Ctry": "US"
        }
      },
      "Termnl": {
        "TermnlId": {
          "Id": "10012343"
        }
      },
      "Card": {
        "XpryDt": "2312",
        "PAN": "4000220177656623"
      }
    },
    "Cntxt": {
      "Vrfctn": [
        {
          "VrfctnInf": {
            "Val": {
              "HexBinryVal": "1234"
            },
            "Tp": "authenticationValue"
          },
          "Tp": "THDS"
        },
        {
          "VrfctnInf": {
            "Val": {
              "TxtVal": "PO Box 12345"
            }
          },
          "Tp": "ADDB"
        },
        {
          "VrfctnInf": {
            "Val": {
              "TxtVal": "12345"
            }
          },
          "Tp": "PCDV"
        }
      ],
      "TxCntxt": {
        "MrchntCtgySpcfcData": "B"
      },
      "PtOfSvcCntxt": {
        "CardDataNtryMd": "CDFL"
      },
      "RskCntxt": {
        "RskInptData": {
          "Val": "172.20.253.209",
          "Tp": "IPAddr"
        }
      },
      "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"
          }
        ]
      }
    }
  }
}

 

Response:

{
    "responseStatus": {
        "status": 400,
        "code": "9125",
        "severity": "ERROR",
        "message": "Expected input credential was not present",
        "info": ""
    }
}

 

I tried to run the api with the integrated test data, in all cases the api return 400 bad request. Could you please help me figure out what's going wrong ? 

SyedSa
Community Moderator

Re: VisaNet connect acceptance - Sale Api always returns 400 bad request

Hi @sijoyjosephThank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member has information that may be helpful, please feel free to reply.