Webhook para pagos con Webpay Plus

Kushki puede enviar eventos webhook que notifican a tu aplicación cuando uno de los siguientes eventos ocurre al realizar un cobro con el servicio de Webpay Plus:

  • Cuando una transacción ha sido aprobada.
  • Cuando una transacción ha sido declinada.

Notificación de pago

Estructura

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

Método: POST

Body: Object

VariableTipo
countrystring
processor_typestring
response_codestring
transaction_status"APPROVAL" "DECLINED"
request_amountnumber
channelstring
merchant_idstring
approved_transaction_amountnumber
buy_orderstring
currency_codestring
subtotal_ivanumber
processor_idstring
processor_namestring
response_textstring
transaction_referencestring
last_four_digitsstring
transaction_idstring
approval_codestring
amountobject
subtotalIva0number
ivanumber
subtotalIvanumber
creatednumber (Unix Timestamp Format)
iva_valuenumber
integration_methodstring
merchant_namestring
card_typestring
ticket_numberstring
transaction_type"SALE"
tokenstring
sync_modestring
subtotal_iva0number
transactionReferencestring

Ejemplos

  • JSON
  • JSON
// Transacción aprobada
{
"country": "Chile",
"processor_type": "aggregator_formal",
"response_code": "000",
"transaction_status": "APPROVAL",
"request_amount": 2500,
"channel": "webpay",
"merchant_id": "20000000105045623000",
"approved_transaction_amount": 2500,
"buy_order": "20220604230551990",
"currency_code": "CLP",
"subtotal_iva": 0,
"processor_id": "1000001057834855117416546432453",
"processor_name": "Transbank Processor",
"response_text": "Transacción aprobada",
"transaction_reference": "46a1ff25-51a4-409f-84b8-155fd4732f98",
"last_four_digits": "7763",
"transaction_id": "46a1ff25-51a4-409f-84b8-155fd4732f98",
"approval_code": "1415",
"amount": {
"subtotalIva0": 2500,
"iva": 0,
"subtotalIva": 0
},
"created": 1656025541039,
"iva_value": 0,
"integration_method": "rest",
"merchant_name": "Tu Gran Empresa",
"card_type": "debit",
"ticket_number": "446025551863514017",
"transaction_type": "SALE",
"token": "24d63081656c464694987036e120d6e0",
"sync_mode": "api",
"subtotal_iva0": 2500,
"transactionReference": "46a1ff25-51a4-409f-84b8-155fd4732f98"
}
// Transacción declinada
{
"country": "Chile",
"processor_type": "aggregator_formal",
"response_code": "006",
"transaction_status": "DECLINED",
"request_amount": 2500,
"channel": "webpay",
"merchant_id": "20000000105045623000",
"approved_transaction_amount": 0,
"buy_order": "20220604230846991",
"currency_code": "CLP",
"subtotal_iva": 0,
"processor_id": "1000001057834855117416546432453",
"processor_name": "Transbank Processor",
"response_text": "Rechazo de transacción",
"transaction_reference": "87388bdd-4e96-4861-96c7-3545af633f65",
"last_four_digits": "0568",
"transaction_id": "87388bdd-4e96-4861-96c7-3545af633f65",
"approval_code": "000000",
"amount": {
"subtotalIva0": 2500,
"iva": 0,
"subtotalIva": 0
},
"created": 1656025723299,
"iva_value": 0,
"integration_method": "rest",
"merchant_name": "Tu Gran Empresa",
"card_type": "credit",
"ticket_number": "446025727023609160",
"transaction_type": "SALE",
"token": "821877490cfa451db9df7e948c52055f",
"sync_mode": "api",
"subtotal_iva0": 2500,
"transactionReference": "87388bdd-4e96-4861-96c7-3545af633f65"
}