3DS2 - autentificación con challenge y timeout
Para probar este escenario, use uno de los números de tarjeta a continuación:
Tarjeta | Fecha de vencimiento. | Marca |
---|---|---|
4970110000000021 | A elección | VISA |
5100010000000049 | A elección | MASTERCARD |
375900000000016 | A elección | AMEX |
Al momento de introducir el código de autentificación, no ingrese nada y espere 10 minutos hasta que expire la sesión de pago.
Secuencia de los intercambios
1. Llamada inicial al servicio V4.1/PCI/Charge/CreateToken
{
"amount": "990",
"currency": "EUR",
"customer": {
"email": "<sample@example.com>"
},
"ipnTargetUrl": "<https://my.site/my-ipn>",
"orderId": "myOrderId-1234",
"paymentForms": [
{
"paymentMethodType": "CARD",
"pan": "5100010000000049",
"expiryMonth": 11,
"expiryYear": 2,
"securityCode": 123
}
]
}
Respuesta
{
"webService":"PCI/Charge/CreateToken",
"version":"V4.1",
(...)
"answer":{
"operationSessionId":"30641640cba14eab8e6766094fd201da",
"operationUrl":"https://api.lyra.com/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.default-hostname",
"_type":"V4/PCI/Authentication/AuthenticationSessionResponse"
}
}
En el ejemplo:
answer.operationUrl
: "https://api.lyra.com/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.nombre de host predeterminado"Transmite el campo
operationUrl
al método de autentificaciónkr-authenticate.js
de la biblioteca JS (más información: undefined).
2. Redirección al ACS del banco del titular de la tarjeta.
- La biblioteca JS realiza automáticamente todas las acciones necesarias, el vendedor no necesita realizar ningún desarrollo específico.
3. Retorno del servidor de la plataforma de pago con el resultado de pago.
{
"webService":"PCI/Charge/CreateToken",
"version":"V4.1",
(...)
"ticket":"3b68064f80f346919828dee761bd22b5",
"applicationProvider":"LYRA",
"metadata":null,
"status":"SUCCESS",
"mode":"TEST",
"serverUrl":"https://api.lyra.com",
"_type":"V4/WebService/Response",
"answer":{
"shopId": "12345678",
"orderCycle": "CLOSED",
"orderStatus": "PAID",
(...)
"orderDetails": {
"orderTotalAmount": "990",
"orderEffectiveAmount": "990",
"orderCurrency": "EUR",
"mode": "TEST",
"orderId": null,
"metadata": null,
"_type": "V4/OrderDetails"
},
"customer": {
"billingDetails": {
"address": null,
"category": null,
"cellPhoneNumber": null,
"city": null,
"country": null,
"district": null,
"firstName": null,
"identityCode": null,
"identityType": null,
"language": "FR",
"lastName": null,
"phoneNumber": null,
"state": null,
"streetNumber": null,
"title": null,
"zipCode": null,
"legalName": null,
"_type": "V4/Customer/BillingDetails"
},
"email": "<sample@example.com>",
"reference": null,
"shippingDetails": {
"address": null,
"address2": null,
"category": null,
"city": null,
"country": null,
"deliveryCompanyName": null,
"district": null,
"firstName": null,
"identityCode": null,
"lastName": null,
"legalName": null,
"phoneNumber": null,
"shippingMethod": null,
"shippingSpeed": null,
"state": null,
"streetNumber": null,
"zipCode": null,
"_type": "V4/Customer/ShippingDetails"
},
"extraDetails": {
"browserAccept": null,
"fingerPrintId": null,
"ipAddress": "54.86.50.139",
"browserUserAgent": "PostmanRuntime/7.32.2",
"_type": "V4/Customer/ExtraDetails"
},
"shoppingCart": {
"insuranceAmount": null,
"shippingAmount": null,
"taxAmount": null,
"cartItemInfo": null,
"_type": "V4/Customer/ShoppingCart"
},
"_type": "V4/Customer/Customer"
},
"transactions": [
{
"shopId": "12345678",
"uuid": "8e0e6596b08849c1a771488547bb7940",
"amount": "990",,
"currency": "EUR",
"paymentMethodType": "CARD",
"paymentMethodToken": null,
"status": "PAID",
"detailedStatus": "AUTHORISED",
"operationType": "DEBIT",
"effectiveStrongAuthentication": "ENABLED",
"creationDate": "2023-05-24T13:45:33+00:00",
"errorCode": null,
"errorMessage": null,
"detailedErrorCode": null,
"detailedErrorMessage": null,
"metadata": null,
"transactionDetails": {
"liabilityShift": "YES",
"effectiveAmount": "990",
"effectiveCurrency": "EUR",
"creationContext": "CHARGE",
"cardDetails": {
"paymentSource": "EC",
"manualValidation": "NO",
(...)
"taxRefundAmount": null,
"userInfo": null,
"paymentMethodTokenPreviouslyRegistered": null,
"occurrenceType": "UNITAIRE",
"archivalReferenceId": "L14491716001",
"useCase": null,
"wallet": null,
"_type": "V4/TransactionDetails"
},
"_type": "V4/PaymentTransaction"
}
],
"subMerchantDetails": null,
"_type": "V4/Payment"
}
6. Retorno del servidor de la plataforma de pago con el resultado final.
answer.operationUrl
: "https://api.lyra.com/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.nombre de host predeterminado"Transmite el campo
operationUrl
al método de autentificaciónkr-authenticate.js
de la biblioteca JS (más información: undefined).
2. Redirección al ACS del banco del titular de la tarjeta.
- La biblioteca JS realiza automáticamente todas las acciones necesarias, el vendedor no necesita realizar ningún desarrollo específico.
3. Retorno del servidor de la plataforma de pago con el resultado de pago.
{
"webService":"PCI/Charge/CreateToken",
"version":"V4",
"applicationVersion":"5.30.0",
"status":"SUCCESS",
"answer":{
"shopId":"12345678",
"orderCycle":"CLOSED",
"orderStatus":"UNPAID",
"serverDate":"2021-12-10T10:38:39+00:00",
"orderDetails":{
"orderTotalAmount":0,
"orderEffectiveAmount":0,
"orderCurrency":"EUR",
"mode":"TEST",
"orderId":null,
"metadata":null,
"_type":"V4/OrderDetails"
},
"customer":{
"billingDetails":{
"address":null,
"category":null,
"cellPhoneNumber":null,
"city":null,
"country":null,
"district":null,
"firstName":null,
"identityCode":null,
"language":"FR",
"lastName":null,
"phoneNumber":null,
"state":null,
"streetNumber":null,
"title":null,
"zipCode":null,
"legalName":null,
"_type":"V4/Customer/BillingDetails"
},
"email":"<sample@example.com>",
"reference":"myCustomerRef-123456",
"shippingDetails":{
"address":null,
"address2":null,
"category":null,
"city":null,
"country":null,
"deliveryCompanyName":null,
"district":null,
"firstName":null,
"identityCode":null,
"lastName":null,
"legalName":null,
"phoneNumber":null,
"shippingMethod":null,
"shippingSpeed":null,
"state":null,
"streetNumber":null,
"zipCode":null,
"_type":"V4/Customer/ShippingDetails"
},
"extraDetails":{
"browserAccept":null,
"fingerPrintId":null,
"ipAddress":"185.244.73.2",
"browserUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36",
"_type":"V4/Customer/ExtraDetails"
},
"shoppingCart":{
"insuranceAmount":null,
"shippingAmount":null,
"taxAmount":null,
"cartItemInfo":null,
"_type":"V4/Customer/ShoppingCart"
},
"_type":"V4/Customer/Customer"
},
"transactions":[
{
"shopId":"12345678",
"uuid":"5ec224e752e244c2b943b43de9e63f3f",
"amount":0,
"currency":"EUR",
"paymentMethodType":"CARD",
"paymentMethodToken":null,
"status":"UNPAID",
"detailedStatus":"REFUSED",
"operationType":"VERIFICATION",
"effectiveStrongAuthentication":"DISABLED",
"creationDate":"2021-12-10T10:38:36+00:00",
"errorCode":"PSP_539",
"errorMessage":"3D Secure refusal for the transaction",
"detailedErrorCode":"39",
"detailedErrorMessage":"3D Secure refusal for the transaction.",
"metadata":null,
"transactionDetails":{
"liabilityShift":null,
"effectiveAmount":0,
"effectiveCurrency":"EUR",
"creationContext":"VERIFICATION",
"cardDetails":{
"paymentSource":"EC",
"manualValidation":"NO",
"expectedCaptureDate":null,
"effectiveBrand":"VISA",
"pan":"497011XXXXXX0021",
"expiryMonth":11,
"expiryYear":2027,
"country":"FR",
"issuerCode":17807,
"issuerName":"Banque Populaire Occitane",
"effectiveProductCode":null,
"legacyTransId":"926164",
"legacyTransDate":"2021-12-10T10:38:36+00:00",
"paymentMethodSource":"TOKEN",
"authorizationResponse":{
"amount":null,
"currency":null,
"authorizationDate":null,
"authorizationNumber":null,
"authorizationResult":null,
"authorizationMode":"FULL",
"_type":"V4/PaymentMethod/Details/Cards/CardAuthorizationResponse"
},
"captureResponse":{
"refundAmount":null,
"refundCurrency":null,
"captureDate":null,
"captureFileNumber":null,
"effectiveRefundAmount":null,
"effectiveRefundCurrency":null,
"_type":"V4/PaymentMethod/Details/Cards/CardCaptureResponse"
},
"threeDSResponse":{
"authenticationResultData":{
"transactionCondition":null,
"enrolled":null,
"status":null,
"eci":null,
"xid":null,
"cavvAlgorithm":null,
"cavv":null,
"signValid":null,
"brand":null,
"_type":"V4/PaymentMethod/Details/Cards/CardAuthenticationResponse"
},
"_type":"V4/PaymentMethod/Details/Cards/ThreeDSResponse"
},
"authenticationResponse":{
"id":"e0fa068f-ac95-47dd-a4b7-6799e5268771",
"operationSessionId":"81655958183e4e9e955115197599870f",
"protocol":{
"name":"THREEDS",
"version":"2.1.0",
"network":"VISA",
"challengePreference":"CHALLENGE_MANDATED",
"simulation":true,
"_type":"V4/Charge/Authenticate/Protocol"
},
"value":{
"authenticationType":"CHALLENGE",
"status":"FAILED",
"extension":{
"authenticationType":"THREEDS_V2",
"_type":"V4/Charge/Authenticate/AuthenticationResultExtensionThreedsV2"
},
"reason":{
"code":"AUTHENTICATION_ERROR",
"message":"Challenge timeout",
"_type":"V4/Charge/Authenticate/AuthenticationResultReason"
},
"_type":"V4/Charge/Authenticate/AuthenticationResult"
},
"_type":"V4/AuthenticationResponseData"
},
"installmentNumber":null,
"installmentCode":null,
"markAuthorizationResponse":{
"amount":null,
"currency":null,
"authorizationDate":null,
"authorizationNumber":null,
"authorizationResult":null,
"_type":"V4/PaymentMethod/Details/Cards/MarkAuthorizationResponse"
},
"cardHolderName":null,
"identityDocumentNumber":null,
"identityDocumentType":null,
"_type":"V4/PaymentMethod/Details/CardDetails"
},
"fraudManagement":{
"riskControl":[],
"riskAnalysis":[],
"_type":"V4/PaymentMethod/Details/FraudManagement"
},
"subscriptionDetails":{
"subscriptionId":null,
"_type":"V4/PaymentMethod/Details/SubscriptionDetails"
},
"parentTransactionUuid":null,
"mid":"9999999",
"sequenceNumber":1,
"taxAmount":null,
"preTaxAmount":null,
"taxRate":null,
"externalTransactionId":null,
"nsu":null,
"tid":"001",
"acquirerNetwork":"CB",
"taxRefundAmount":null,
"userInfo":"API REST",
"paymentMethodTokenPreviouslyRegistered":null,
"occurrenceType":"RECURRENT_INITIAL",
"_type":"V4/TransactionDetails"
},
"_type":"V4/PaymentTransaction"
}
],
"subMerchantDetails":null,
"_type":"V4/Payment"
},
"email": "<sample@example.com>",
"reference": null,
"shippingDetails": {
"address": null,
"address2": null,
"category": null,
"city": null,
"country": null,
"deliveryCompanyName": null,
"district": null,
"firstName": null,
"identityCode": null,
"lastName": null,
"legalName": null,
"phoneNumber": null,
"shippingMethod": null,
"shippingSpeed": null,
"state": null,
"streetNumber": null,
"zipCode": null,
"_type": "V4/Customer/ShippingDetails"
},
"extraDetails": {
"browserAccept": null,
"fingerPrintId": null,
"ipAddress": "54.86.50.139",
"browserUserAgent": "PostmanRuntime/7.32.2",
"_type": "V4/Customer/ExtraDetails"
},
"shoppingCart": {
"insuranceAmount": null,
"shippingAmount": null,
"taxAmount": null,
"cartItemInfo": null,
"_type": "V4/Customer/ShoppingCart"
},
"_type": "V4/Customer/Customer"
},
"transactions": [
{
"shopId": "12345678",
"uuid": "8e0e6596b08849c1a771488547bb7940",
"amount": "990",,
"currency": "EUR",
"paymentMethodType": "CARD",
"paymentMethodToken": null,
"status": "PAID",
"detailedStatus": "AUTHORISED",
"operationType": "DEBIT",
"effectiveStrongAuthentication": "ENABLED",
"creationDate": "2023-05-24T13:45:33+00:00",
"errorCode": null,
"errorMessage": null,
"detailedErrorCode": null,
"detailedErrorMessage": null,
"metadata": null,
"transactionDetails": {
"liabilityShift": "YES",
"effectiveAmount": "990",
"effectiveCurrency": "EUR",
"creationContext": "CHARGE",
"cardDetails": {
"paymentSource": "EC",
"manualValidation": "NO",
(...)
"taxRefundAmount": null,
"userInfo": null,
"paymentMethodTokenPreviouslyRegistered": null,
"occurrenceType": "UNITAIRE",
"archivalReferenceId": "L14491716001",
"useCase": null,
"wallet": null,
"_type": "V4/TransactionDetails"
},
"_type": "V4/PaymentTransaction"
}
],
"subMerchantDetails": null,
"_type": "V4/Payment"
}