Webhooks with Payment Button
When making payments through a Payment Button you will be notified of the following events for card, cash or wire payments:
- Approved transaction
- Declined transaction
Card Payments
The webhooks sent by Kushki will contain the headers listed here.
The following is a description of the possible variables delivered in the body of the webhook for credit card payments:
Method: POST
Body: Object
Variable | Type |
---|---|
ticketNumber | string |
amount | object |
amount.subtotalIva0 | number |
amount.iva | number |
amount.subtotalIva | number |
amount.currency | string |
metadata | object |
product | object |
product.unitPrice | number |
product.quantity | integer |
product.name | string |
product.description | string |
code | string |
transactionReference | string |
created | number (Unix Timestamp Format) |
smartLink | string |
message | string |
contactDetails | object |
contactDetails.email | string |
token | string |
publicMerchantId | string |
transactionType | "SALE" |
merchantId | string |
paymentMethod | string |
syncMetadata | boolean |
id | string |
status | "approvedTransaction" "declinedTransaction" |
Examples
- JSON
- JSON
// Approved Transaction{"ticketNumber": "672148913082649091","amount": {"subtotalIva0": 0,"iva": 50,"subtotalIva": 50,"currency": "USD"},"metadata": {},"product": [{"unitPrice": 100,"quantity": 2,"name": "runners","description": "Tenis"}],"transactionReference": "b38e51f3-b5aa-4700-8670-91e2fce51004","created": 1678902932120,"smartLink": "nL_JmVeTk","contactDetails": {"email": "john.doe@kushkipagos.com"},"token": "d23507a568af477893fa0d298fd97b50","publicMerchantId": "883ae5c3d47446d898dddc94dd76076f","transactionType": "SALE","merchantId": "20000000108692034000","paymentMethod": "creditCard","syncMetadata": "false","id": "a79cc9ff-82ec-44ea-9653-694bfa0b9a46","status": "approvedTransaction"}
// Declined Transaction{"amount": {"subtotalIva0": 0,"iva": 50,"subtotalIva": 50,"currency": "USD"},"metadata": {},"product": [{"unitPrice": 100,"quantity": 2,"name": "runners","description": "Tenis"}],"code": "017","transactionReference": "ad3059f0-2795-4058-8fe0-2d96faa0de77","created": 1678903213705,"smartLink": "WjPYmv_lz","message": "Transacción declinada.","contactDetails": {"email": "john.doe@kushkipagos.com"},"token": "13e4ac80714e4f98a12095d91cfa8b8f","publicMerchantId": "883ae5c3d47446d898dddc94dd76076f","transactionType": "SALE","merchantId": "20000000108692034000","paymentMethod": "creditCard","syncMetadata": "true","id": "5bdc0899-4baa-4b2a-9452-69d8504baaad","status": "declinedTransaction"}
Wire Transfer Payments
These are the possible variables provided in the body of the webhook for wire transfer payments:
Method: POST
Body: Object
Variable | Type |
---|---|
ticketNumber | string |
amount | object |
amount.subtotalIva0 | number |
amount.iva | number |
amount.subtotalIva | number |
amount.currency | string |
metadata | object |
product | object |
product.unitPrice | number |
product.quantity | integer |
product.name | string |
product.description | string |
redirectUrl | string |
transactionReference | string |
created | number (Unix Timestamp Format) |
smartLink | string |
contactDetails | object |
contactDetails.firstName | string |
contactDetails.lastName | string |
contactDetails.documentType | string |
contactDetails.documentNumber | string |
contactDetails.email | string |
token | string |
publicMerchantId | string |
merchantId | string |
paymentMethod | string |
syncMetadata | boolean |
id | string |
trazabilityCode | string |
status | "approvedTransaction" "declinedTransaction" |
Examples
- JSON
- JSON
// Approved Transaction{"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"}
// Declined Transaction{"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"}
Cash Payments
These are the possible variables that are delivered in the body of the webhook for cash payments:
Method: POST
Body: Object
Variable | Type |
---|---|
ticketNumber | string |
amount | object |
amount.subtotalIva0 | number |
amount.iva | number |
amount.subtotalIva | number |
amount.currency | string |
metadata | object |
metadata.firstTime | string |
product | object |
product.unitPrice | number |
product.quantity | integer |
product.name | string |
product.description | string |
transactionReference | string |
created | number (Unix Timestamp Format) |
smartLink | string |
contactDetails | object |
contactDetails.firstName | string |
contactDetails.lastName | string |
contactDetails.documentType | string |
contactDetails.documentNumber | string |
contactDetails.email | string |
token | string |
publicMerchantId | string |
pdfUrl | string |
pin | string |
merchantId | string |
paymentMethod | string |
syncMetadata | boolean |
id | string |
status | "approvedTransaction" "expiredTransaction" |
Examples
- JSON
- JSON
// Approved Transaction{"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"}
// Declined Transaction{"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"}