Webhook for Payments Made with Webpay Plus

Kushki can send webhook events that notify your application when one of the following events occurs when making a payment with the Webpay Plus service:

  • When a transaction has been approved.
  • When a transaction has been declined.

Payment Notification

Structure

The webhooks sent by Kushki will contain the headers listed here.
These are the possible variables that are submitted in the Webhook body:

Method: POST

Body: Object

VariableType
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

Examples

  • JSON
  • JSON
// Approved transaction
{
"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"
}
// Declined transaction
{
"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"
}