Preautorización y confirmación

Este tipo de operación permite al comercio bloquear un cierto importe en la tarjeta del cliente, esto no supone realizar el pago, sino que trata de asegurar, previo a un pago, que el importe estará disponible en su momento.

Una autorización puede realizarse mediante las siguientes vías de integración:

Modalidad REST

Ejemplo de pago con autorización vía REST.


							
{
  "DS_MERCHANT_AMOUNT": "145",
  "DS_MERCHANT_CURRENCY": "978",
  "DS_MERCHANT_CVV2": "123",
  "DS_MERCHANT_EXPIRYDATE": "1512",
  "DS_MERCHANT_MERCHANTCODE": "999008881",
  "DS_MERCHANT_ORDER": "4366",
  "DS_MERCHANT_PAN": "454881********04",
  "DS_MERCHANT_TERMINAL": "49",
  "DS_MERCHANT_TRANSACTIONTYPE": "1"
}			
						
					

Se recibe la respuesta, cuyo parámetro "Ds_Response" indica que se ha realizado correctamente la preautorización si su valor es "0000":

								
{
  "Ds_Amount": "145",
  "Ds_AuthorisationCode": "547481",
  "Ds_CardNumber": "4548810000000003",
  "Ds_Card_Brand": "1",
  "Ds_Card_Country": "724",
  "Ds_Currency": "978",
  "Ds_ExpiryDate": "3912",
  "Ds_Language": "1",
  "Ds_MerchantCode": "999008881",
  "Ds_MerchantData": "",
  "Ds_Order": "4366",
  "Ds_Response": "0000",
  "Ds_SecurePayment": "0",
  "Ds_Terminal": "1",
  "Ds_TransactionType": "1"
}	
						
					

										
{
  "DS_MERCHANT_AMOUNT": "145",
  "DS_MERCHANT_CURRENCY": "978",
  "DS_MERCHANT_MERCHANTCODE": "999008881",
  "DS_MERCHANT_ORDER": "4366",
  "DS_MERCHANT_TERMINAL": "49",
  "DS_MERCHANT_TRANSACTIONTYPE": "2"
}
						
					

Cuya respuesta, si se ha realizado correctamente, nos devuelve el parámetro "Ds_Response" con un valor "0900":

								
{
  "Ds_Amount": "145",
  "Ds_AuthorisationCode": "313844",
  "Ds_Card_Brand": "1",
  "Ds_Card_Country": "724",
  "Ds_Card_Type": "C",
  "Ds_Currency": "978",
  "Ds_Language": "1",
  "Ds_MerchantCode": "999008881",
  "Ds_MerchantData": "",
  "Ds_Order": "4366",
  "Ds_Response": "0900",
  "Ds_SecurePayment": "0",
  "Ds_Terminal": "1",
  "Ds_TransactionType": "2"
}
						
					


Modalidad Redirección

Ejemplo de pago con preautorización vía Redirección.


							
{
  "DS_MERCHANT_ORDER":"1575967259",
  "DS_MERCHANT_MERCHANTCODE":"999008881",
  "DS_MERCHANT_TERMINAL":"999",
  "DS_MERCHANT_CURRENCY":"978",
  "DS_MERCHANT_TRANSACTIONTYPE":"1",
  "DS_MERCHANT_AMOUNT":"1000",
  "DS_MERCHANT_MERCHANTURL":"http://www.prueba.com/urlNotificacion.php",
  "DS_MERCHANT_URLOK":"http://www.prueba.com/urlOK.php",
  "DS_MERCHANT_URLKO":"http://www.prueba.com/urlKO.php"
}	
						
					

Se recibe la respuesta, cuyo parámetro "Ds_Response" indica que se ha realizado correctamente la preautorización si su valor es "0000":

								
{
  "Ds_Date":"10%2F12%2F2019",
  "Ds_Hour":"09%3A41",
  "Ds_SecurePayment":"0",
  "Ds_Card_Type":"D",
  "Ds_Card_Country":"724",
  "Ds_Amount":"1000",
  "Ds_Currency":"978",
  "Ds_Order":"1575967259",
  "Ds_MerchantCode":"999008881",
  "Ds_Terminal":"49",
  "Ds_Response":"0000",
  "Ds_MerchantData":"",
  "Ds_TransactionType":"1",
  "Ds_ConsumerLanguage":"1",
  "Ds_AuthorisationCode":"372663",
  "Ds_Card_Brand":"2"
}
						
					

										
{
  "DS_MERCHANT_ORDER":"1575967259",
  "DS_MERCHANT_MERCHANTCODE":"999008881",
  "DS_MERCHANT_TERMINAL":"999",
  "DS_MERCHANT_CURRENCY":"978",
  "DS_MERCHANT_TRANSACTIONTYPE":"2",
  "DS_MERCHANT_AMOUNT":"1000",
  "DS_MERCHANT_MERCHANTURL":"http://www.prueba.com/urlNotificacion.php",
  "DS_MERCHANT_URLOK":"http://www.prueba.com/urlOK.php",
  "DS_MERCHANT_URLKO":"http://www.prueba.com/urlKO.php"
}
						
					

Cuya respuesta, si se ha realizado correctamente, nos devuelve el parámetro "Ds_Response" con un valor "0900":

								
{
  "Ds_Date":"10%2F12%2F2019",
  "Ds_Hour":"09%3A41",
  "Ds_SecurePayment":"0",
  "Ds_Card_Type":"D",
  "Ds_Card_Country":"724",
  "Ds_Amount":"1000",
  "Ds_Currency":"978",
  "Ds_Order":"1575967259",
  "Ds_MerchantCode":"999008881",
  "Ds_Terminal":"49",
  "Ds_Response":"0900",
  "Ds_MerchantData":"",
  "Ds_TransactionType":"2",
  "Ds_ConsumerLanguage":"1",
  "Ds_AuthorisationCode":"372663",
  "Ds_Card_Brand":"2"
}
						
					


Modalidad InSite

Ejemplo de pago con autorización vía InSite.


							
{
  "DS_MERCHANT_AMOUNT": "145",
  "DS_MERCHANT_CURRENCY": "978",
  "DS_MERCHANT_MERCHANTCODE": "999008881",
  "DS_MERCHANT_ORDER": "1446068581",
  "DS_MERCHANT_IDOPER": "9c75f357629acb672e0f5444401d138f02e834ad ",
  "DS_MERCHANT_TERMINAL": "49",
  "DS_MERCHANT_TRANSACTIONTYPE": "1"
}		
						
					

Se recibe la respuesta, cuyo parámetro "Ds_Response" indica que se ha realizado correctamente la preautorización si su valor es "0000":

								
{
  "Ds_Amount": "145",
  "Ds_AuthorisationCode": "501602",
  "Ds_CardNumber": "4548810000000004",
  "Ds_Card_Brand": "1",
  "Ds_Card_Country": "724",
  "Ds_Currency": "978",
  "Ds_Language": "1",
  "Ds_MerchantCode": "999008881",
  "Ds_Order": "1446068581",
  "Ds_Response": "0000",
  "Ds_SecurePayment": "0",
  "Ds_Terminal": "1",
  "Ds_TransactionType": "1"
}
						
					

										
{
  "DS_MERCHANT_AMOUNT": "145",
  "DS_MERCHANT_CURRENCY": "978",
  "DS_MERCHANT_MERCHANTCODE": "999008881",
  "DS_MERCHANT_ORDER": "1446068581",
  "DS_MERCHANT_TERMINAL": "49",
  "DS_MERCHANT_TRANSACTIONTYPE": "2"
}
						
					

Cuya respuesta, si se ha realizado correctamente, nos devuelve el parámetro "Ds_Response" con un valor "0900":

								
{
  "Ds_Amount": "145",
  "Ds_AuthorisationCode": "501602",
  "Ds_CardNumber": "4548810000000004",
  "Ds_Card_Brand": "1",
  "Ds_Card_Country": "724",
  "Ds_Currency": "978",
  "Ds_Language": "1",
  "Ds_MerchantCode": "999008881",
  "Ds_Order": "1446068581",
  "Ds_Response": "0900",
  "Ds_SecurePayment": "0",
  "Ds_Terminal": "1",
  "Ds_TransactionType": "2"
}