Webhook para devoluciones
03 agosto 2023
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:
- Cuando una anulación (void) es aprobada.
- 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
Variable | Tipo |
---|---|
country | string |
integrationMethod | string |
metadata | object |
contractID | string |
credentialMetadata | string |
aurusTicketNumber | string |
processorType | string |
merchantName | string |
responseCode | string |
credentialAlias | string |
mccCode | string |
saleTransactionType | string |
uniqueCode | string |
merchantId | string |
nit | string |
syncMode | string |
id | string |
socialReason | string |
isSandboxTransaction | boolean |
foreignCard | boolean |
visibility | string |
transactionReference | string |
created | number (Timestamp format) |
voidTicketNumber | string |
transactionId | string |
saleTicketNumber | string |
lastFourDigits | string |
taxId | string |
credentialId | string |
paymentMethod | string |
saleApprovalCode | string |
privateProcessorId | string |
ticketNumber | string |
forceRefund | boolean |
responseText | Transacción aprobada |
partialVoid | boolean |
contactPerson | string |
binCard | string |
terminalId | string |
requestAmount | number |
categoryMerchant | string |
processorId | string |
processorMerchantId | string |
processorName | string |
saleTransactionReference | string |
email | string |
amount | object |
amount.subtotalIva0 | number |
amount.subtotalIva | number |
amount.iva | number |
amount.extraTaxes | object |
currency | string |
ice | number |
cardCountry | string |
cardHolderName | string |
transactionStatus | "APPROVAL" |
paymentBrand | string |
cardType | string |
publicCredentialId | string |
saleCreated | number (Timestamp format) |
token | string |
transactionType | "VOID" "REFUND" |
cardCountryCode | string |
consortiumName | string |
approvedTransactionAmount | number |
currencyCode | string |
Ejemplo
- 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"}