• França
lyra.com
Procurando
Categoria
Tags
pagina inicial
Suporte técnico

Consultar as mensagens de autenticação

  • Caso de uso
  • Solicitação
  • Resposta

Ativação desta funcionalidade sujeita à uma autorização prévia do Lyra.

Caso de uso

O objetivo do 3D Secure é proteger as vendas online de Estabelecimentos Comerciai contra os riscos de fraude e mais particularmente de contestação do portador.

  • Visa Secure (substitui "Verified by Visa") é o programa 3D Secure da Visa
  • Mastercard Identity check substitui "Mastercard Secure Code") é o programa 3D Secure da Mastercard
  • Safekey é o programa 3D Secure da American Express
  • Pagamento seguro CB é o programa 3D Secure de CB
  • ProtectBuy é o programa 3D Secure de Diners e Discover

Este WebService permite recuperar as mensagens trocadas no âmbito da autenticação.

No caso de contestação, estes dados são imprescindíveis para proteger o EC com uma prova de autenticação do portador.

Solicitação

As mensagens de autenticação podem ser recuperadas a partir do código único de autenticação. Este é procedente do campo authenticationResponse.id presente no resultado final das chamadas aos Web Services PCI/Authentication/CreateSession , PCI/Charge/CreatePayment recebido via a IPN ou IAN. Ou em resposta dos Web Services PCI/Authentication/GetSession , Transaction/Get , Order/Get.

Segue um exemplo no resultado de autenticação (recebido na IAN após a chamada ao PCI/Authentication/CreateSession).

  • ObjetoAuthenticationResponseData:
  • caminho:answer.id
{
  (...)
  "answer": {
    "id": "cb3cb538-1959-47c0-ba8d-2be52e535d81",
    "protocol": {
      (...)
      "_type": "V4/Charge/Authenticate/Protocol"
    },
    "value": {
      "authenticationType": "FRICTIONLESS",
      "authenticationId": {
        (...)
        "_type": "V4/Charge/Authenticate/AuthenticationId"
      },
      "authenticationValue": {
        (...)
        "_type": "V4/Charge/Authenticate/AuthenticationValue"
      },
      "status": "SUCCESS",
      "commerceIndicator": "05",
      "extension": {
        (...)
        "_type": "V4/Charge/Authenticate/AuthenticationResultExtensionThreedsV2"
      },
      "reason": {
        "_type": "V4/Charge/Authenticate/AuthenticationResultReason"
      },
      "_type": "V4/Charge/Authenticate/AuthenticationResult"
    },
    "_type": "V4/AuthenticationResponseData"
  }
}

No exemplo:

  • id: "cb3cb538-1959-47c0-ba8d-2be52e535d81" (lien :Playground)

Segue um exemplo no resultado do pagamento (na IPN ou no retorno para a loja).

  • ObjetoPayment:
  • caminho:transactions.transactionDetails.cardDetails.authenticationResponse.id

Exemplo de resposta: objeto Payment

{
    "transactions": [
    {
      "shopId": "69876357",
      (...)
      "transactionDetails": {
        (...)
        "cardDetails": {
          
          },
          "authenticationResponse": {
            "id": "fa73d948-2e96-45fb-a701-75812d19f7bb",
            "operationSessionId": "56a80c1f94f64f549a1eb00048d56d35",
            "protocol": {
              (...)
            },
            (...)
              },
              "_type": "V4/Charge/Authenticate/AuthenticationResult"
            },
            "_type": "V4/AuthenticationResponseData"
          },
      "_type": "V4/PaymentTransaction"
    }
  ]
}

No exemplo:

  • id: "fa73d948-2e96-45fb-a701-75812d19f7bb" (link:Playground)

Link para os Web Services retronando um id de autenticação:

  • Transaction/Get
  • Transaction/Order
  • PCI/Authentication/GetSession
  • PCI/Authentication/CreateSession (desde l'IAN)
  • PCI/Charge/CreatePayment (desde l'IPN)
  1. Chame o WebService PCI/Authentication/GetMessages com o identificador de autenticação exclusivo.
PARÂMETRO REQUISITO Descrição
id Sim token único de autenticação, no formato UUID.

Resposta

O objeto AuthenticationMessagesResponse conterá os parâmetros abaixo:

PARÂMETRO Descrição
id token único de autenticação, no formato UUID.
messages.date Data de envio ou de recepção da mensagem de autenticação.
messages.message Mensagem de autenticação.
messages.messageType Tipo de mensagem de autenticação (ver quadro abaixo ).

Tabela dos valores messages.messageType

valores Nome completo Descrição
AREQ Autorização Request Mensagem que permite solicitar e iniciar a autenticação.
ARES Authentication Response Resposta do DS indicando o status de autenticação e se uma autenticação forte for necessária.
CREQ Challenge Resquest Mensagem iniciando a autenticação forte do portador.
RREQ Results Request Mensagem que contém o resultado final da autenticação enviada pelo DS.
RRES Results Response Mensagem de confirmação da recepção da mensagem RReq.
CRES Challenge Response Resposta do ACS indicando o fim da autenticação forte.
ERRO Error message Mensagem de erro recebido ou enviado.

Veja todos os campos em nosso playground:

  • AuthenticationMessagesResponse

Exemplo de solicitação e resposta

  • Chame ao Web Service PCI/Authentication/GetMessages com o identificador único de autenticação de transação.

Solicitação

/pt-BR/rest/V4.0/api/kb/authentication.html
https://github.com/lyra/rest-php-examples/blob/master/www/minimalEmbeddedForm.php#L9-L44
https://api.lyra.com/api-payment/V4/PCI/Authentication/GetMessages
{
"id": "fa73d948-2e96-45fb-a701-75812d19f7bb"
}

Resposta

   {
   "id": "fa73d948-2e96-45fb-a701-75812d19f7bb",
    "messages": [
        {
            "date": "2023-06-07T09:13:20Z",
            "messageType": "AREQ",
            "message": "{\"threeDSServerTransID\":\"4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"messageExtension\":[{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"A000000042_CB-EXEMPTACQ\",\"name\":\"CB-EXEMPTACQ\"},{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"A000000042_CB-USECASE\",\"name\":\"CB-USECASE\"}],\"messageType\":\"AReq\",\"messageVersion\":\"2.2.0\",\"deviceChannel\":\"02\",\"threeDSServerRefNumber\":\"3DS_LOA_SER_LYNE_020100_00098\",\"threeDSServerOperatorID\":\"batmanEnSlip\",\"threeDSCompInd\":\"Y\",\"threeDSRequestorAuthenticationInd\":\"01\",\"threeDSRequestorChallengeInd\":\"05\",\"threeDSRequestorID\":\"45251785700028\",\"threeDSRequestorName\":\"Lyra SMS\",\"threeDSRequestorURL\":\"http://www.lyra-sms.com\",\"threeDSServerURL\":\"http://localhost:8080/protected/v1/3dsv2/notify/rreq?network=CB&messageVersion=2.2.0&deviceChannel=BROWSER&challengeInd=NO_CHALLENGE_REQUESTED_TRA&authenticateId=4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"acctType\":\"02\",\"acquirerBIN\":\"00000017807\",\"acquirerMerchantID\":\"05785350       -08121902\",\"addrMatch\":\"N\",\"browserAcceptHeader\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\",\"browserIP\":\"10.33.168.125\",\"browserJavaEnabled\":true,\"browserJavascriptEnabled\":true,\"browserLanguage\":\"fr\",\"browserColorDepth\":\"24\",\"browserScreenHeight\":\"969\",\"browserScreenWidth\":\"1920\",\"browserTZ\":\"-120\",\"browserUserAgent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\",\"cardExpiryDate\":\"2406\",\"acctInfo\":{\"shipNameIndicator\":\"01\"},\"acctNumber\":\"5100********0106\",\"billAddrCity\":\"toulouse\",\"billAddrCountry\":\"250\",\"billAddrLine1\":\"2 rue de test\",\"billAddrPostCode\":\"31000\",\"email\":\"parayreludovic@gmail.com\",\"homePhone\":{\"cc\":\"33\",\"subscriber\":\"670011400\"},\"mobilePhone\":{\"cc\":\"33\",\"subscriber\":\"670011492\"},\"shipAddrCity\":\"Labège\",\"shipAddrCountry\":\"250\",\"shipAddrLine1\":\"innovation\",\"shipAddrPostCode\":\"31670\",\"mcc\":\"5965\",\"merchantCountryCode\":\"250\",\"merchantName\":\"Lyra SMS\",\"messageCategory\":\"01\",\"notificationURL\":\"https://pass-inte01.lyra-labs.fr/public/v1/3dsv2/notify/cres/4302c1cb-188a-46ac-a6c2-9677ddf1405c/CB\",\"purchaseAmount\":\"20000\",\"purchaseCurrency\":\"978\",\"purchaseExponent\":\"2\",\"purchaseDate\":\"20230607091320\",\"transType\":\"01\"}"
        },
        {
            "date": "2023-06-07T09:13:20Z",
            "messageType": "ARES",
            "message": "{\"threeDSServerTransID\":\"4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"messageExtension\":[{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"A000000042_CB-EXEMPTACQ\",\"name\":\"CB-EXEMPTACQ\"},{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"A000000042_CB-USECASE\",\"name\":\"CB-USECASE\"}],\"messageType\":\"ARes\",\"messageVersion\":\"2.2.0\",\"acsTransID\":\"286bf72c-dc87-4785-9fb0-82266849c320\",\"dsTransID\":\"d610d3a1-1a1c-402b-a4d1-34d1ab92165f\",\"acsChallengeMandated\":\"Y\",\"acsReferenceNumber\":\"3DS_LOA_ACS_PPFU_020100_00009\",\"acsURL\":\"https://acs-inte01.lyra-labs.fr/acs/v2/creq\",\"authenticationType\":\"02\",\"dsReferenceNumber\":\"DS_LOA_DIS_PPFU_020100_00010\",\"transStatus\":\"C\"}"
        },
        {
            "date": "2023-06-07T09:13:20Z",
            "messageType": "CREQ",
            "message": "{\"threeDSServerTransID\":\"4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"messageExtension\":[{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"A000000042_CB-USECASE\",\"name\":\"CB-USECASE\"},{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"SIMULATION-AREQ\",\"name\":\"SIMULATION-AREQ\"}],\"messageType\":\"CReq\",\"messageVersion\":\"2.2.0\",\"acsTransID\":\"286bf72c-dc87-4785-9fb0-82266849c320\",\"challengeWindowSize\":\"03\"}"
        },
        {
            "date": "2023-06-07T09:13:23Z",
            "messageType": "RREQ",
            "message": "{\"threeDSServerTransID\":\"4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"messageExtension\":[{\"criticalityIndicator\":false,\"data\":\"<MESSAGE_EXTENSION_DATA_ELEMENT>\",\"id\":\"A000000042_CB-AVALGO\",\"name\":\"CB-AVALGO\"}],\"messageType\":\"RReq\",\"messageVersion\":\"2.2.0\",\"acsTransID\":\"7fd8019a-c7b1-457b-9811-e3a763e789d2\",\"dsTransID\":\"a1959823-b9ff-429f-8d6e-3739ca3cf96a\",\"authenticationType\":\"01\",\"authenticationValue\":\"v**************************=\",\"eci\":\"05\",\"interactionCounter\":\"02\",\"messageCategory\":\"01\",\"transStatus\":\"Y\"}"
        },
        {
            "date": "2023-06-07T09:13:23Z",
            "messageType": "RRES",
            "message": "{\"threeDSServerTransID\":\"4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"messageType\":\"RRes\",\"messageVersion\":\"2.2.0\",\"acsTransID\":\"7fd8019a-c7b1-457b-9811-e3a763e789d2\",\"dsTransID\":\"a1959823-b9ff-429f-8d6e-3739ca3cf96a\",\"resultsStatus\":\"01\"}"
        },
        {
            "date": "2023-06-07T09:13:23Z",
            "messageType": "CRES",
            "message": "{\"threeDSServerTransID\":\"4302c1cb-188a-46ac-a6c2-9677ddf1405c\",\"messageType\":\"CRes\",\"messageVersion\":\"2.2.0\",\"acsTransID\":\"0b96eccc-4d1a-4d62-b1da-7d4bc97acf16\",\"dsTransID\":\"9bd29fdc-9487-4343-8710-2fdd5909734e\",\"challengeSelectInfo\":[],\"transStatus\":\"Y\"}"
        }
    ],
    "_type": "V4/Authentication/AuthenticationMessagesResponse"
}
Jobs
Legal
GDPR
25.25.0-1.11