Webhook para pagos únicos con efectivo

Efectivo

Kushki puede enviar eventos al webhook que notifican a tú aplicación en el caso en que se requiera una autorización para aceptar un pago expirado (Preautorización) o en el momento en que tú cliente realizó el pago correctamente (Notificación de Pago).

Notificación de Pago

Éstas son las posibles variables que se entregan en el webhook.

Métodod: Post

Body: Object

VariableTipo
ticketNumberstring
tokenstring
totalAmountnumber
amountobject
amount.ivanumber
amount.subtotalIvanumber
amount.subtotalIva0number
amount.extraTaxesobject
amount.extraTaxes.agenciaDeViajesnumber
amount.extraTaxes.iacnumber
amount.extraTaxes.propinanumber
amount.extraTaxes.tasaAeroportuarianumber
currencystring
creatednumber (Unix Timestamp Format)
expirationnumber (Unix Timestamp Format)
status"approvedTransaction" "declinedTransaction"
identificationstring
namestring
lastNamestring
merchantIdstring
merchantNamestring
processorNamestring
processorIdstring
transactionIdstring
completedAtnumber (Unix Timestamp Format)
metadataobject
metadata.key0string
metadata.key1string
descriptionstring
pinstring
emailstring
documentTypestring

Ejemplos

  • JSON
  • JSON
  • JSON
// Transacción aprobada
{
"country": "Colombia",
"lastName": "Castro",
"ticketNumber": "2302011714922359",
"amount": {
"subtotalIva0": 49.99,
"iva": 0,
"subtotalIva": 0
},
"completedAt": 1602011733626,
"documentType": "CC",
"created": 1602011714779,
"processorType": "gateway",
"description": "Description of the payment",
"transactionId": "aaa6c0ce-bd05-4df2-9012-833fa32efa84",
"merchantName": "Tu Gran Empresa",
"token": "150af7fa762246cc96572d825e3771f6",
"totalAmount": 49.99,
"identification": "123456789",
"processorId": "6000000000XXXXXXXXXXXX50336197",
"pin": "2011731304",
"merchantId": "20000000*******2000",
"name": "Juan",
"currency": "COP",
"expiration": 1602025005000,
"processorName": "Banco Bogota Processor",
"email": "[email protected]",
"status": "approvedTransaction",
"transactionReference": "aaa6c0ce-bd05-4df2-9012-833fa32efa84"
}
// Transacción declinada
{
"country": "Colombia",
"lastName": "Castro",
"ticketNumber": "2302012481612897",
"amount": {
"subtotalIva0": 49.99,
"iva": 0,
"subtotalIva": 0
},
"completedAt": 1602012496214,
"documentType": "CC",
"created": 1602012481607,
"processorType": "gateway",
"description": "Description of the payment",
"transactionId": "88618d23-2d57-401a-94df-313ff89d224f",
"merchantName": "Tu Gran Empresa",
"token": "deca317dd55f4edb91ba068ca6d87038",
"totalAmount": 49.99,
"identification": "1000000000",
"processorId": "6000000000XXXXXXXXXXXX50336197",
"pin": "2012495094",
"merchantId": "20000000*******2000",
"name": "Juan",
"currency": "COP",
"expiration": 1602025005000,
"processorName": "Banco Bogota Processor",
"email": "[email protected]",
"status": "declinedTransaction",
"transactionReference": "88618d23-2d57-401a-94df-313ff89d224f"
}
// Transacción expirada
{
"country": "Colombia",
"lastName": "Castro",
"ticketNumber": "2302010277786922",
"amount": {
"subtotalIva0": 49.99,
"iva": 0,
"subtotalIva": 0
},
"completedAt": 1602010834213,
"documentType": "CC",
"created": 1602010277778,
"processorType": "gateway",
"description": "Description of the payment",
"transactionId": "0cbe6419-9bc0-46a0-be78-fc81c5c18dea",
"merchantName": "Tu Gran Empresa",
"token": "8220ed4ea9fb407abdcfff87ab0f406c",
"totalAmount": 49.99,
"identification": "9999999999",
"processorId": "6000000000XXXXXXXXXXXX50336197",
"pin": "2010319472",
"merchantId": "20000000*******2000",
"name": "Juan",
"currency": "COP",
"expiration": 1602010319000,
"processorName": "Banco Bogota Processor",
"email": "[email protected]",
"status": "expiredTransaction",
"transactionReference": "0cbe6419-9bc0-46a0-be78-fc81c5c18dea"
}

Preautorización

Kushki puede enviar eventos al webhook que notifican a tú aplicación en el momento en que tú autorización es necesaria para cobrar el pago (Preautorización).

Este evento ocurre, en el caso en que el usuario intenta realizar el pago de una referencia expirada. En ese momento se te notificará que el usuario desea pagar una determinada referencia, y se requerirá de tu parte una de las siguientes respuestas según tú decisión.

StatusCodeDescripción del eventoObjeto
200El pago tiene autorización para ser cobradonull
418El pago no puede ser cobradoCode (KSH1,KSH2 O KSH3) message (NOTFOUND,PAID,EXPIRED)

Un Ejemplo de respuesta sería el siguiente:

{
"statuscode": "418",
{
"code": "KSH3",
"message": " EXPIRED"
}
}

Éstas son las posibles variables que se entregan en el webhook.

Métodod: Post

Body: Object

VariableTipo
ticketNumberstring
tokenstring
totalAmountnumber
amountobject
amount.ivanumber
amount.subtotalIvanumber
amount.subtotalIva0number
amount.extraTaxesobject
amount.extraTaxes.iacnumber
amount.extraTaxes.propinanumber
amount.extraTaxes.tasaAeroportuarianumber
currencystring
creatednumber (Timestamp format)
expirationnumber (Timestamp format)
status"initializedTransaction" "expiredTransaction"
identificationstring
namestring
lastNamestring
merchantIdstring
merchantNamestring
processorNamestring

Ejemplo

// Transacción inicializada
{
"ticketNumber": "2301998764353705",
"currency": "COP",
"processorType": "gateway",
"totalAmount": 49.99,
"documentType": "CC",
"lastName": "Castro",
"status": "initializedTransaction",
"created": 1601998764347,
"expiration": 1601998890000,
"merchantName": "Tu Gran Empresa",
"email": "[email protected]",
"country": "Colombia",
"transactionId": "a116a500-feec-44c5-b89f-46595f70c904",
"name": "Juan",
"token": "0cfb89f23afd46b8ac7e461569e308e8",
"pin": "1998868506",
"identification": "1718171671",
"amount": {
"iva": 0,
"subtotalIva": 0,
"subtotalIva0": 49.99
},
"processorName": "Banco Bogota Processor",
"description": "Description of the payment",
"processorId": "6000000000XXXXXXXXXXXX50336197",
"merchantId": "20000000*******2000"
}