Webhook para pagos únicos con transferencia bancaria
11 enero 2024
Transferencias
Como fase final del proceso de recepción de pagos con transferencia, Kushki te da la posibilidad de enviar eventos al webhook que notifiquen a tu aplicación cuando se complete un pago con transferencia.
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 |
---|---|
amount | object |
amount.subtotalIva0 | integer |
amount.iva | integer |
amount.subtotalIva | integer |
amount.ice | number |
amount.currency | string |
amount.extraTaxes | object |
amount.extraTaxes.agenciaDeViajes | number |
amount.extraTaxes.propina | number |
amount.extraTaxes.iac | number |
amount.extraTaxes.tasaAeroportuaria | number |
processorState | string OK NOT_AUTHORIZED FAILED |
documentType | string |
created | integer (Unix Timestamp Format) |
documentNumber | string |
transactionCycle | string |
paymentDescription | string |
responseCode | string |
responseText | string |
token | string |
publicMerchantId | string |
returnCode | string |
bankId | string |
userIp | string |
userType | string “Persona Natural” (0) o “Persona Jurídica” (1) |
trazabilityCode | string |
status | string initializedTransaction approvedTransaction declinedTransaction expiredTransaction |
completedAt | number (Unix Timestamp Format) |
country | string |
ticketNumber | string |
metadata | object |
metadata.key0 | string |
metadata.key1 | string |
metadata.key2 | string |
serviceCode | string |
processorType | string |
transferProcessor | string |
entityCode | string |
processorId | string |
bankurl | string |
callbackUrl | string |
currency | string |
sessionId | string |
userId | string |
email | string |
processorToken | string |
signatureToken | string |
termsUrl | string |
Ejemplos
- JSON
- JSON
// Transacción aprobada{"country": "Mexico","ticketNumber": "1948675805137586","metadata": {"userId": "IB344"},"serviceCode": null,"processorType": "gateway","transferProcessor": "SafetyPay Processor","requestAmount": 1000,"merchantName": "Tu Comercio MX","credentialAlias": "Tu Comercio","processorId": "6000000000166378251934364091365","credentialInfo": {"alias": "Tu Comercio","credentialId": "c15718524c994d0dbc50c1bd03453cc2","publicCredentialId": "da2f03f0600e4a1d9e702c6096ae733e"},"bankurl": "https://uat-sandbox.kushkipagos.com/checkout/transfer?status=pending&identificationType=&identificationNumber=&description=&referenceNumber=1948675805137586&bankName=&bankCode=null&amount=1000&cus=418918412&ticketNumber=1948675805137586&processor=SafetyPay Processor","currency": "MXN","trazabilityCode": "418918412","email": "user@example.com","amount": {"subtotalIva0": 1000,"iva": 0,"subtotalIva": 0},"completedAt": 1681948680428,"entityCode": null,"transactionReference": "4f9d5706-a539-4899-acd1-283a374e6c65","created": 1681948649325,"userAgent": "PostmanRuntime/7.29.2","sessionId": "-","publicCredentialId": "da2f03f0600e4a1d9e702c6096ae733e","userId": "-","paymentDescription": "-","token": "5ff6e47b987d4863804982a9155230fb","publicMerchantId": "20000000104096460000","bankId": null,"credentialId": "c15718524c994d0dbc50c1bd03453cc2","userIp": "187.207.68.168","config": {"region": "us-east-1"},"status": "approvedTransaction"}
// Transacción declinada{"country": "Mexico","metadata": {"userId": "IB344"},"credentialMetadata": null,"processorType": "gateway","responseText": "Monto inválido","transferProcessor": "SafetyPay Processor","merchantName": "Tu Comercio MX","responseCode": "T003","credentialAlias": null,"credentialInfo": {"alias": "Tu Comercio","credentialId": "c15718524c994d0dbc50c1bd03453cc2","publicCredentialId": "da2f03f0600e4a1d9e702c6096ae733e"},"currency": "MXN","email": "user@example.com","amount": {"subtotalIva0": 1000,"iva": 0,"subtotalIva": 0},"completedAt": 1682537134909,"transactionReference": "16bff4db-0076-4cf3-a7cb-8a910385bece","created": 1682537108011,"userAgent": "PostmanRuntime/7.29.2","sessionId": "-","publicCredentialId": null,"userId": "-","paymentDescription": "-","token": "4fb5a77637ae48df8dd53b3e7dda1a4a","publicMerchantId": "20000000104096460000","bankId": null,"credentialId": null,"userIp": "189.169.112.110","config": {"region": "us-east-1"},"status": "declinedTransaction"}