Webhooks con Botón de pago

Cuando se hacen pagos a través de un Botón de pago podrás recibir notificaciones de los siguientes eventos para pagos con tarjetas, con efectivo o por transferencia:

  1. Transacción aprobada
  2. Transacción declinada

Pagos con tarjeta

Los webhooks enviados por Kushki contendrán los encabezados (headers) aquí listados.
A continuación se describen las posibles variables que se entregan en el cuerpo del webhook para pagos con tarjeta de crédito:

Método: POST

Body: Object

VariableTipo
ticketNumberstring
approvalCodestring
metadataobject
metadata.key0string
metadata.key1string
responseTextstring
binCardstring
smartLinkstring
requestAmountnumber
typestring
responseCodestring
bankstring
merchantIdstring
syncMetadataboolean
idstring
processorBankNamestring
amountobject
amount.subtotalIva0number
amount.ivanumber
amount.subtotalIvanumber
amount.currencystring
productobject
product.unitPricenumber
product.quantityinteger
product.namestring
product.descriptionstring
cardCountrystring
cardHolderNamestring
transactionReferencestring
creatednumber (Unix Timestamp Format)
paymentBrandstring
contactDetailsobject
contactDetails.emailstring
tokenstring
publicMerchantIdstring
transactionType“SALE”
transactionChannel“WEBCHECKOUTPLUS”
lastFourDigitsstring
paymentMethodstring
binCardstring
approvedTransactionAmountnumber
status"approvedTransaction" "declinedTransaction"

Ejemplos

  • JSON
  • JSON
// Transacción aprobada
{
"ticketNumber":"916519657017985234",
"approvalCode":"000000",
"metadata":{
"orderID":"6827",
"contrato":"claro 123"
},
"responseText":"Transacción aprobada",
"binCard":"545195",
"smartLink":"3W95hy7fX",
"requestAmount":257000,
"type":"credit",
"responseCode":"000",
"bank":"Banco de la Produccion S.A. (PRODUBANCO)",
"merchantId":"20000000106554380000",
"syncMetadata":"false",
"id":"24cf9b50-8b04-49fb-9d57-4be3bb7a1a5a",
"processorBankName":"0032~BANCO INTERNACIONAL",
"amount":{
"subtotalIva0":0,
"iva":19000,
"subtotalIva":238000,
"currency":"MXN"
},
"product":[
{
"unitPrice":100000,
"quantity":2,
"name":"runners",
"description":"Tenis"
}
],
"cardCountry":"Ecuador",
"cardHolderName":"deisy Leal",
"transactionReference":"a6704c0b-4be5-468f-96a1-3e454cb574ca",
"created":1722982829858,
"paymentBrand":"Mastercard",
"contactDetails":{
"email":"user@example.com"
},
"token":"db3d08cd80454324a960a69cc1480d9c",
"publicMerchantId":"017dc7108f0141e78ef4ca4694a2520f",
"transactionType":"SALE",
"transactionChannel":"WEBCHECKOUTPLUS",
"lastFourDigits":"5480",
"paymentMethod":"creditCard",
"approvedTransactionAmount":257000,
"status":"approvedTransaction"
}
// Transacción declinada
{
"amount":{
"subtotalIva0":0,
"iva":19000,
"subtotalIva":238000,
"currency":"MXN"
},
"metadata":{
"orderID":"6827",
"contrato":"claro 123"
},
"product":[
{
"unitPrice":100000,
"quantity":2,
"name":"runners",
"description":"Tenis"
}
],
"code":"WCH017",
"transactionReference":"",
"created":1723578498030,
"smartLink":"X8dNMpznc",
"message":"Transacción declinada.",
"contactDetails":{
"email":"user@example.com"
},
"token":"787dedc573e74e0e9ed62aff13028a9c",
"publicMerchantId":"017dc7108f0141e78ef4ca4694a2520f",
"transactionType":"SALE",
"transactionChannel":"WEBCHECKOUTPLUS",
"merchantId":"20000000106554380000",
"paymentMethod":"creditCard",
"syncMetadata":"true",
"id":"5e6d8cad-d25e-40b1-a662-8c018ca9f4e2",
"status":"declinedTransaction"
}

Pagos con transferencia

Estas son las posibles variables que se entregan en el cuerpo del webhook para pagos con transferencia bancaria:

Método: POST

Body: Object

VariableTipo
ticketNumberstring
amountobject
amount.subtotalIva0number
amount.ivanumber
amount.subtotalIvanumber
amount.currencystring
metadataobject
productobject
product.unitPricenumber
product.quantityinteger
product.namestring
product.descriptionstring
redirectUrlstring
transactionReferencestring
creatednumber (Unix Timestamp Format)
smartLinkstring
contactDetailsobject
contactDetails.firstNamestring
contactDetails.lastNamestring
contactDetails.documentTypestring
contactDetails.documentNumberstring
contactDetails.emailstring
tokenstring
publicMerchantIdstring
merchantIdstring
paymentMethodstring
syncMetadataboolean
idstring
trazabilityCodestring
status"approvedTransaction" "declinedTransaction"

Ejemplos

  • JSON
  • JSON
// Transacción aprobada
{
"ticketNumber": "8903880459904381",
"amount": {
"subtotalIva0": 0,
"iva": 500,
"subtotalIva": 500,
"currency": "MXN"
},
"metadata": {},
"product": [
{
"unitPrice": 1000,
"quantity": 2,
"name": "runners",
"description": "Tenis"
}
],
"redirectUrl": "https://api-uat.kushkipagos.com/transfer/v1/agent?token=4e14347df70d4744b09ff9a6483e80a6&mid=20000000104096460000",
"transactionReference": "6659910b-936e-4842-826f-82b0433af540",
"created": 1678903884347,
"smartLink": "cvIrvtx2j",
"contactDetails": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@kushkipagos.com"
},
"token": "4e14347df70d4744b09ff9a6483e80a6",
"publicMerchantId": "ef31f04f2c364080bd33162bfb360c81",
"merchantId": "20000000104096460000",
"paymentMethod": "transfer",
"syncMetadata": "false",
"id": "a277e170-3241-4e27-8d22-e21f66b879d4",
"trazabilityCode": "564988596",
"status": "approvedTransaction"
}
// Transacción declinada
{
"amount": {
"subtotalIva0": 0,
"iva": 500,
"subtotalIva": 500,
"currency": "CLP"
},
"metadata": {},
"product": [
{
"unitPrice": 1000,
"quantity": 2,
"name": "runners",
"description": "Tenis"
}
],
"redirectUrl": "https://api-uat.kushkipagos.com/transfer/v1/agent?token=43de2759fab14dd190b55edf2c656744&mid=20000000104903344000",
"transactionReference": "8c9f3399-3ecc-460f-b299-25b44f5c86cb",
"created": 1678904120979,
"smartLink": "niKEcpftR",
"contactDetails": {
"firstName": "John",
"lastName": "Doe",
"documentType": "CC",
"documentNumber": "123456789",
"email": "john.doe@kushkipagos.com"
},
"token": "43de2759fab14dd190b55edf2c656744",
"publicMerchantId": "e704812858d7464db163b0a24f2e379f",
"merchantId": "20000000104903344000",
"paymentMethod": "transfer",
"syncMetadata": "false",
"id": "6d4abd76-c21c-42cb-a7b7-30b3b25cef0b",
"status": "declinedTransaction"
}

Pagos con efectivo

Estas son las posibles variables que se entregan en el cuerpo del webhook para pagos en efectivo:

Método: POST

Body: Object

VariableTipo
ticketNumberstring
amountobject
amount.subtotalIva0number
amount.ivanumber
amount.subtotalIvanumber
amount.currencystring
metadataobject
metadata.firstTimestring
productobject
product.unitPricenumber
product.quantityinteger
product.namestring
product.descriptionstring
transactionReferencestring
creatednumber (Unix Timestamp Format)
smartLinkstring
contactDetailsobject
contactDetails.firstNamestring
contactDetails.lastNamestring
contactDetails.documentTypestring
contactDetails.documentNumberstring
contactDetails.emailstring
tokenstring
publicMerchantIdstring
pdfUrlstring
pinstring
merchantIdstring
paymentMethodstring
syncMetadataboolean
idstring
status"approvedTransaction" "expiredTransaction"

Ejemplos

  • JSON
  • JSON
// Transacción aprobada
{
"ticketNumber": "2378903288609109",
"amount": {
"subtotalIva0": 0,
"iva": 50,
"subtotalIva": 50,
"currency": "USD"
},
"metadata": {
"firstTime": "0"
},
"product": [
{
"unitPrice": 100,
"quantity": 2,
"name": "runners",
"description": "Tenis"
}
],
"transactionReference": "225405a4-c300-4ea6-9952-406e0efcc5ee",
"created": 1678903302137,
"smartLink": "2aLhypwTL",
"contactDetails": {
"firstName": "John",
"lastName": "Doe",
"documentType": "CC",
"documentNumber": "123456789",
"email": "john.doe@kushkipagos.com"
},
"token": "2bb63390d18e4475adc4f8f0730f84f2",
"publicMerchantId": "883ae5c3d47446d898dddc94dd76076f",
"pdfUrl": "https://api-uat.kushkipagos.com/cash/v1/charges/2378903288609109/receipt",
"pin": "8903296880",
"merchantId": "20000000108692034000",
"paymentMethod": "cash",
"syncMetadata": "false",
"id": "69bbf42d-7a17-4ff5-ad61-8b4bd156659c",
"status": "approvedTransaction"
}
// Transacción declinada
{
"ticketNumber": "2378908457363309",
"amount": {
"subtotalIva0": 0,
"iva": 50,
"subtotalIva": 50,
"currency": "USD"
},
"metadata": {
"firstTime": "0"
},
"product": [
{
"unitPrice": 100,
"quantity": 2,
"name": "runners",
"description": "Tenis"
}
],
"transactionReference": "e12417f9-ff21-47df-9136-b3e7ccb929bc",
"created": 1678908471189,
"smartLink": "_i_BQiKN7",
"contactDetails": {
"firstName": "John",
"lastName": "Doe",
"documentType": "CC",
"documentNumber": "1000000000",
"email": "john.doe@kushkipagos.com"
},
"token": "41ce3d4a8d3843648124b779e072f9c9",
"publicMerchantId": "883ae5c3d47446d898dddc94dd76076f",
"pdfUrl": "https://api-uat.kushkipagos.com/cash/v1/charges/2378908457363309/receipt",
"pin": "8908465875",
"merchantId": "20000000108692034000",
"paymentMethod": "cash",
"syncMetadata": "false",
"id": "d3774540-46dd-435a-9a9a-de31313e8760",
"status": "expiredTransaction"
}