Webhook para devoluciones

Anulaciones y reembolsos

Kushki puede enviar eventos a tu webhook que notifiquen a tu aplicación en el momento en que uno de los siguientes eventos ocurra:

  1. Cuando una anulación (void) es aprobada.
  2. Cuando un reembolso (refund) es aprobado.

Estructura

Los webhooks enviados por Kushki contendrán los encabezados (headers) aquí listados.
Estas son las posibles variables que se entregan en el webhook:

Método: POST

Body: Object

VariableTipo
countrystring
integrationMethodstring
metadataobject
contractIDstring
credentialMetadatastring
aurusTicketNumberstring
processorTypestring
merchantNamestring
responseCodestring
credentialAliasstring
mccCodestring
saleTransactionTypestring
uniqueCodestring
merchantIdstring
nitstring
syncModestring
idstring
socialReasonstring
isSandboxTransactionboolean
foreignCard boolean
visibilitystring
transactionReferencestring
creatednumber (Timestamp format)
voidTicketNumberstring
transactionIdstring
saleTicketNumberstring
lastFourDigitsstring
taxIdstring
credentialIdstring
paymentMethodstring
saleApprovalCodestring
privateProcessorIdstring
ticketNumberstring
forceRefundboolean
responseTextTransacción aprobada, Transacción rechazada por el procesador
partialVoidboolean
contactPersonstring
binCardstring
terminalIdstring
requestAmountnumber
categoryMerchantstring
processorIdstring
processorMerchantIdstring
processorNamestring
saleTransactionReferencestring
emailstring
amountobject
amount.subtotalIva0number
amount.subtotalIva number
amount.ivanumber
amount.extraTaxesobject
currencystring
icenumber
cardCountrystring
cardHolderNamestring
transactionStatus"APPROVAL"``"DECLINED"
paymentBrandstring
cardTypestring
publicCredentialIdstring
saleCreatednumber (Timestamp format)
tokenstring
transactionType"VOID" "REFUND"
cardCountryCodestring
consortiumNamestring
approvedTransactionAmountnumber
currencyCodestring

Ejemplo

  • JSON
  • JSON
// anulación (void) aprobada
{
"country": "Mexico",
"integrationMethod": null,
"metadata": {
"contractID": "157AB"
},
"credentialMetadata": null,
"aurusTicketNumber": "300765709982529055",
"processorType": "aggregator_formal",
"merchantName": "Tu Comercio MX",
"responseCode": "000",
"credentialAlias": "Tu Comercio",
"mccCode": "5399",
"saleTransactionType": "SALE",
"uniqueCode": null,
"merchantId": "20000000104096460000",
"nit": "1209120000000",
"syncMode": "online",
"id": "f319be20-27d5-4faa-a4d4-b70b6ca55e0d",
"socialReason": "TU COMERCIO",
"isSandboxTransaction": true,
"foreignCard": true,
"visibility": "hidden",
"transactionReference": "f319be20-27d5-4faa-a4d4-b70b6ca55e0d",
"created": 1660062967307,
"voidTicketNumber": "661660062966165887",
"transactionId": "532095824159012674",
"saleTicketNumber": "300765709982529055",
"lastFourDigits": "5480",
"taxId": "1209120000000",
"credentialId": "c15718524c994d0dbc50c1bd03453cc2",
"paymentMethod": "card",
"saleApprovalCode": "000000",
"privateProcessorId": "6000000000165643753487118743",
"ticketNumber": "661660062966165887",
"forceRefund": false,
"responseText": "Transacción aprobada",
"partialVoid": false,
"contactPerson": "John Doe",
"binCard": "545195",
"terminalId": "1656437534581",
"requestAmount": 99.97,
"categoryMerchant": "Medium",
"processorId": "6000000000165643753414808509",
"processorMerchantId": "6000000000165643753448883050",
"processorName": "Kushki Acquirer Processor",
"saleTransactionReference": "f33a3887-d63d-42f0-8d57-3851942c100d",
"email": "test@test.com",
"amount": {
"subtotalIva0": 99.97,
"iva": 0,
"subtotalIva": 0,
"extraTaxes": {
"agenciaDeViaje": 0,
"iac": 0,
"tasaAeroportuaria": 0
},
"currency": "MXN",
"ice": 0
},
"cardCountry": "Ecuador",
"cardHolderName": "John Doe",
"transactionStatus": "APPROVAL",
"paymentBrand": "Master Card",
"cardType": "credit",
"publicCredentialId": "da2f03f0600e4a1d9e702c6096ae733e",
"saleCreated": 1660062956000,
"token": "c9192a20afd14cf885d339d772c8ca57",
"transactionType": "VOID",
"cardCountryCode": "EC",
"consortiumName": null,
"approvedTransactionAmount": 99.97,
"currencyCode": "MXN"
}
// Anulación declinada
{
"country": "Peru",
"integrationMethod": null,
"approvalCode": "000000",
"credentialMetadata": null,
"processorType": "aggregator_formal",
"ownerId": "20000000996159210000",
"merchantName": "Tu comercio",
"responseCode": "006",
"credentialAlias": "ash peru",
"mccCode": "5735",
"saleTransactionType": "SALE",
"uniqueCode": null,
"merchantId": "29000100103159410000",
"nit": "87663667790",
"syncMode": "online",
"id": "6e434de2-121a-4f06-8cdf-127abe29cfa5",
"socialReason": "Tu comercio",
"isSandboxTransaction": false,
"foreignCard": false,
"visibility": "visible",
"transactionReference": "6e434de2-121a-4f06-8cdf-127abe29cfa5",
"created": 1731451319277,
"processor": {
"code": null,
"message": null
},
"transactionId": "1731451318950482897",
"saleTicketNumber": "050164476541661216",
"lastFourDigits": "1091",
"taxId": "87667667790",
"credentialId": "dd5e4829e9f646e39e60bb77f50e0e30",
"paymentMethod": "card",
"saleApprovalCode": "000000",
"privateProcessorId": "6000000000170377457031334144",
"ticketNumber": "661731451318951359",
"forceRefund": false,
"responseText": "Transacción rechazada por el procesador",
"partialVoid": false,
"contactPerson": "Manuela Garcia",
"binCard": "400000",
"customerMerchantId": "20000000106159210000",
"terminalId": "1703774554525",
"requestAmount": 20.5,
"categoryMerchant": "Enterprise",
"processorId": "6000000000170377457037595544",
"processorMerchantId": "604000010685",
"binInfo": {
"country": "PER",
"bank": "PUBLIC BANK BERHAD",
"bin": "40000000",
"prepaid": false,
"type": "credit",
"brand": "Visa"
},
"processorName": "Kushki Acquirer Processor",
"processorBankName": "0032~BANCO INTERNACIONAL",
"saleTransactionReference": "f89dd43c-9c87-4ee5-9242-310705268c9a",
"email": "manuela.garcia@kushkipagos.com",
"amount": {
"subtotalIva0": 0,
"iva": 0,
"subtotalIva": 20.5,
"currency": "PEN",
"ice": 0
},
"cardCountry": "Peru",
"cardHolderName": "TEST CARD",
"transactionStatus": "DECLINED",
"paymentBrand": "Visa",
"cardType": "credit",
"publicCredentialId": "690cd9a234b343288e2d01855aa951b6",
"saleCreated": 1731191845000,
"token": "fc51cbf89052420087bbd568f8b86065",
"transactionType": "REFUND",
"cardCountryCode": "HN",
"consortiumName": null,
"approvedTransactionAmount": 20.5,
"config": {
"region": "us-east-1"
},
"currencyCode": "PEN"
}