Webhook para contracargos

Contracargos

Kushki puede enviar eventos vía webhook que notifican a tu aplicación cuando uno de los siguientes eventos ocurra con relación a un contracargo:

  • Contracargo inicializado ( INITIALIZED): cuando se genere un nuevo contracargo para tu comercio. Se incluirá dentro de la información un deadLine (en formato Unix) que te indicará el tiempo límite que tienes para cargar los documentos correspondientes; de igual forma se te indicará la razón del contracargo.
  • Contracargo pendiente ( PENDING): cuando el contracargo ha sido abierto y tu comercio debe adjuntar la documentación de soporte desde la Consola de Administración.
  • Contracargo en revisión ( REVIEW): el contracargo pasa a este estado una vez tu comercio envía los documentos de soporte para revisión. En Kushki tendremos un plazo máximo de 60 días para indicarte la resolución del contracargo
  • Contracargo fallido ( FAILED): ocurre cuando se ingresa un correo inválido al iniciar el contracargo.
  • Contracargo aprobado ( APPROVAL): ocurre cuando el contracargo es resuelto a favor de tu cliente luego de analizar la documentación.
  • Contracargo declinado ( DECLINED): este estado se presenta cuando el contracargo es denegado a tu cliente.
  • Contracargo expirado ( EXPIRED): este estado se presenta cuando tu comercio no envía la documentación de respaldo en el plazo establecido (72 horas hábiles).

Notificación de actualización de estado de contracargo

Estructura

Los webhooks de contracargos enviados por Kushki contendrán los encabezados (headers) aquí listados.
Estas son las posibles variables que se entregan en el cuerpo del webhook cuando un contracargo cambia de estado:

Método: POST

Body: Object

VariableTipo
countrystring
iceValuenumber
approvalCodestring
metadataobject
metadata.key0string
subtotalIva0string
credentialMetadatastring
productDetailsobject
productobject
product.quantityinteger
product.pricenumber
product.idstring
product.tittlestring
product.skustring
deadLinenumber (Unix Timestamp Format)
transaction_detailsobject
transaction_details.cardTypestring
transaction_details.binCardstring
transaction_details.processorBankNamestring
transaction_details.isDeferredstring
merchantNamestring
responseCodestring
credentialAliasstring
merchantIdstring
ivaValuenumber
syncModestring
idstring
transaction_referencestring
transactionReferencestring
vault_tokenstring
creatednumber (Unix Timestamp Format)
ipstring
transactionIdstring
saleTicketNumberstring
lastFourDigitsstring
credentialIdstring
saleApprovalCodestring
ticketNumberstring
processor_typestring
acquirer_bankstring
responseTextstring
fullResponseboolean
binCardstring
recapstring
requestAmountnumber
token_typenumber
maskedCardNumbernumber
emailsarray
securityobject
security.whitelistboolean
processorIdstring
processorMerchantIdstring
issuing_bankstring
foreign_cardboolean
processorNamestring
processorBankNamestring
user_agentstring
amountobject
amount.subtotalIva0number
amount.subtotalIvanumber
amount.ivanumber
amount.icenumber
amount.currencystring
card_holder_namestring
transactionStatusstring "PENDING" "INITIALIZED" "REVIEW" "FAILED" "APPROVAL" "DECLINED" "EXPIRED"
paymentBrandstring
subtotalIvanumber
cardTypestring
plccstring
contact_detailsobject
contact_details.firstNamestring
contact_details.lastNamestring
contact_details.phoneNumberstring
contact_details.documentTypestring
contact_details.documentNumberstring
contact_details.emailstring
publicCredentialIdstring
tokenstring
transactionTypestring
orderDetailsobject
shippingDetailsobject
shippingDetails.countrystring
shippingDetails.zipCodestring
shippingDetails.addressstring
shippingDetails.phonestring
shippingDetails.citystring
shippingDetails.namestring
shippingDetails.regionstring
billingDetailsobject
billingDetails.countrystring
billingDetails.zipCodestring
billingDetails.addressstring
billingDetails.phonestring
billingDetails.citystring
billingDetails.namestring
billingDetails.regionstring
siteDomainstring
approvedTransactionAmountnumber
currencyCodestring
previousStatusobject
previousStatus.statusstring "PENDING" "INITIALIZED" "REVIEW" "FAILED" "APPROVAL" "DECLINED" "EXPIRED"
previousStatus.updatedAtnumber (Unix Timestamp Format)

Ejemplo

  • JSON
// Contracargo inicializado
{
"data": {
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/x-www-form-urlencoded",
"X-Kushki-Id": 1625173711150,
"X-Kushki-Key": "20000000106902204000",
"X-Kushki-Signature": "e8caf6bcafff0ec4ff410eb6cda43891c616f90e5081fc6918d71b1098ac081f",
"X-Kushki-SimpleSignature": "77396f3d87ae660f44513f989a1663cb1d61709d239f71a4600b3593a821fab8"
},
"url": "https://accendo.getsandbox.com/users",
"body": {
"country": "Ecuador",
"iceValue": 0,
"approvalCode": "000000",
"metadata": {
"contractID": "157AB"
},
"subtotalIva0": 56.5,
"credentialMetadata": null,
"productDetails": {
"product": [
{
"quantity": 1,
"price": 6990000,
"id": "198952AB",
"title": "eBook Digital Services",
"sku": "10101042"
},
{
"quantity": 1,
"price": 9990000,
"id": "198953AB",
"title": "eBook Virtual Selling",
"sku": "004834GQ"
}
]
},
"deadLine": 1625519298000,
"transaction_details": {
"cardType": "Master Card",
"binCard": "520081",
"processorBankName": "0032~BANCO TEST",
"isDeferred": "N"
},
"merchantName": "pruebaEcuador",
"responseCode": "000",
"credentialAlias": "pruebaEcuador",
"merchantId": "20000000106902204000",
"ivaValue": 0,
"syncMode": "online",
"id": "ce6b4ef5-693d-4e3f-97ba-da8a65465498",
"transaction_reference": "5643f3b1-3c3e-4090-bb71-1ea997f09d79",
"transactionReference": "ce6b4ef5-693d-4e3f-97ba-da8a65465498",
"vault_token": "EQ*********=",
"created": 1625173695218,
"ip": "181.199.34.1",
"transactionId": "1625173695217917",
"saleTicketNumber": "776576109663279606",
"lastFourDigits": "4242",
"credentialId": "1f4c2a757e8b450b9ebf0550ef2d64ff",
"saleApprovalCode": "000000",
"ticketNumber": "1625173695217917",
"processor_type": "gateway",
"acquirer_bank": "Banco Adquiriente",
"responseText": "Transacción aprobada",
"fullResponse": true,
"binCard": "520081",
"recap": "612900",
"requestAmount": 56.5,
"token_type": "tr*********n",
"maskedCardNumber": "520081XXXX4242",
"emails": [
"test@yourdomain.com"
],
"security": {
"whitelist": false
},
"processorId": "6000000000162379953762969965097",
"processorMerchantId": "35677777",
"issuing_bank": "BANCO TEST C.A.",
"foreign_card": false,
"processorName": "Credimatic Processor",
"processorBankName": "0032~BANCO TEST",
"user_agent": "PostmanRuntime/7.28.0",
"amount": {
"subtotalIva0": 56.5,
"iva": 0,
"subtotalIva": 0,
"ice": 0,
"currency": "USD"
},
"cardHolderName": "Your name",
"transactionStatus": "INITIALIZED",
"paymentBrand": "Master Card",
"subtotalIva": 0,
"cardType": "CREDIT",
"plcc": false,
"contact_details": {
"firstName": "Diego",
"lastName": "Cadena",
"phoneNumber": "+593988734644",
"documentType": "CC",
"documentNumber": "1009283738",
"email": "test@yourdomain.com"
},
"publicCredentialId": "a83320cb922548098d02793c827a004b",
"token": "8503e83a182c4c84a9de1786891feacb",
"transactionType": "CHARGEBACK",
"orderDetails": {
"shippingDetails": {
"country": "Ecuador",
"zipCode": "170402",
"address": "Eloy Alfaro 139 y Catalina Aldaz",
"phone": "+593988734644",
"city": "Quito",
"name": "Diego Cadena",
"region": "Pichincha"
},
"billingDetails": {
"country": "Ecuador",
"zipCode": "170402",
"address": "Eloy Alfaro 139 y Catalina Aldaz",
"phone": "+593988734644",
"city": "Quito",
"name": "Diego Cadena",
"region": "Pichincha"
},
"siteDomain": "tuebook.com"
},
"approvedTransactionAmount": 56.5,
"currencyCode": "USD",
"previousStatus": [
{
"status": "INITIALIZED",
"updatedAt": 1625173695218
}
]
},
"method": "post"
}
}