Webhooks with Smartlinks

When making payments through a Smartlink you will be notified of the following events for card payments.

  1. Transaction approved
  2. Declined transaction

Structure

The webhooks sent by Kushki will contain the headers listed here.

Card Payments

The following is a description of the possible variables delivered in the body of the webhook for credit card payments:

Method: POST

Body: Object

VariableType
publicMerchantIdstring
amountobject
amount.subtotalIva0integer
amount.ivainteger
amount.subtotalIvainteger
amount.currencystring
metadataobject
metadata.totalstring
metadata.nombreApellidostring
metadata.cedulastring
metadata.direccionstring
metadata.productosstring
metadata.emailstring
createdinteger (Unix Timestamp Format)
syncMetadatastring
smartLinkstring
idstring
statusstring
paymentMethodstring
ticketNumberstring
approvalCodestring
approvedTransactionAmountnumber
bankstring
binCardstring
cardCountrystring
cardHolderNamestring
lastFourDigitsstring
paymentBrandstring
paymentConfigTypefixed open
processorBankNamestring
requestAmountnumber
responseCodestring
responseTextstring
transactionTypestring
typestring
transactionReferencestring

Examples

  • JSON
  • JSON
// Approved Transaction
{
"id": "d5d2da2b-9213-4193-b72e-89508deec554",
"amount": {
"currency": "USD",
"iva": 27.6,
"subtotalIva": 230,
"subtotalIva0": 0
},
"approvalCode": "000000",
"approvedTransactionAmount": 257.6,
"bank": "BANK NAME",
"binCard": "424242",
"cardCountry": "Ecuador",
"cardHolderName": "Jhon Doe",
"contactDetails": {},
"created": 1689093048576,
"lastFourDigits": "4242",
"merchantId": "20000000108216107000",
"metadata": {},
"paymentBrand": "Visa",
"paymentConfigType": "fixed",
"paymentMethod": "creditCard",
"processorBankName": "0032~BANCO INTERNACIONAL",
"publicMerchantId": "2ce2008060b146ed964692cc1fad8957",
"requestAmount": 257.6,
"responseCode": "000",
"responseText": "Transacción aprobada",
"smartLink": "0saIIYkDB",
"status": "approvedTransaction",
"syncMetadata": "false",
"ticketNumber": "634537651430879765",
"token": "d4c0ae7db80d4520b99eaa1e7a600c97",
"transactionReference": "6487061f-8b90-47e2-a728-6b229300e73b",
"type": "credit"
}
// Declined Transaction
{
"amount": {
"subtotalIva0": 49000,
"iva": 0,
"subtotalIva": 0,
"currency": "COP"
},
"metadata": {
"email": "test@kushki.com"
},
"code": "017",
"transactionReference": null,
"created": 1602089066473,
"smartLink": "QG02kRklU",
"message": "Transacción declinada.",
"contactDetails": {
"email": "test@kushki.com"
},
"token": "f71431f596834c8b8fe5a51b40db2138",
"publicMerchantId": "20000000XXXXXX2000",
"merchantId": "20000000XXXXXX2000",
"paymentMethod": "creditCard",
"syncMetadata": "true",
"id": "9dfa0186-95e3-48cf-868e-47ce591d242c",
"status": "declinedTransaction"
}

Wire Transfer Payments

These are the possible variables that are submitted in the webhook body for wire transfer payments:

Method: POST

Body: Object

HeaderHeader
publicMerchantIdstring
amountobject
amount.propertiesinteger
amount.ivainteger
amount.subtotalIvainteger
amount.currencystring
metadataobject
metadata.totalstring
metadata.nombreApellidostring
metadata.cedulastring
metadata.direccionstring
metadata.productosstring
metadata.emailstring
createdinteger (Unix Timestamp Format)
syncMetadatastring
smartLinkstring
idstring
statusstring
paymentMethodstring
redirectUrlstring
descriptionstring
bankNamestring
bankIdstring
trazabilityCodestring
emailstring

Examples

  • JSON
  • JSON
// Approved Transaction
{
"ticketNumber": "1602089881960155",
"amount": {
"subtotalIva0": 49000,
"iva": 0,
"subtotalIva": 0,
"currency": "COP"
},
"metadata": {
"email": null
},
"redirectUrl": "https://api-uat.kushkipagos.com/transfer/v1/agent?token=4e85ec6daee54468919654c796e7bf74&mid=20000000XXXXXXX2000",
"transactionReference": "0d3905a2-f30c-4d22-8106-d291f3afbbab",
"created": 1602089886565,
"bankName": "Kushki bank Colombia",
"smartLink": "QG02kRklU",
"contactDetails": {
"email": "test@kushki.com"
},
"token": "4e85ec6daee54468919654c796e7bf74",
"publicMerchantId": "20000000XXXXXXX2000",
"bankId": "0001",
"merchantId": "20000000XXXXXXX2000",
"paymentMethod": "transfer",
"syncMetadata": "false",
"id": "b33ad9c2-9587-483d-9200-2f3ac7b3f883",
"trazabilityCode": "823086197",
"status": "approvedTransaction"
}
// Declined Transaction
{
"amount": {
"subtotalIva0": 15,
"iva": 0,
"subtotalIva": 0,
"currency": "COP"
},
"metadata": {
"email": null
},
"redirectUrl": "https://api-uat.kushkipagos.com/transfer/v1/agent?token=ee3feadd97a542149d2809eec9e55522&mid=20000000XXXXXXX2000",
"transactionReference": "e19ee166-0306-487f-9810-ad79f444c315",
"created": 1602090023831,
"bankName": "Kushki bank Colombia",
"smartLink": "QG02kRklU",
"contactDetails": {
"email": "test@kushki.com"
},
"token": "ee3feadd97a542149d2809eec9e55522",
"publicMerchantId": "20000000XXXXXXX2000",
"bankId": "0001",
"merchantId": "20000000XXXXXXX2000",
"paymentMethod": "transfer",
"syncMetadata": "false",
"id": "53657c39-ad54-442a-b86d-53476691bb7c",
"trazabilityCode": "101210819",
"status": "declinedTransaction"
}

Subscriptions

These are the possible variables that are submitted in the webhook body for subscription payments:

Method: POST

Body: Object

HeaderHeader
publicMerchantIdstring
amountobject
amount.subtotalIva0integer
amount.ivainteger
amount.subtotalIvainteger
amount.currencystring
metadataobject
metadata.totalstring
metadata.nombreApellidostring
metadata.cedulastring
metadata.direccionstring
metadata.productosstring
metadata.emailstring
created(Unix Timestamp Format)
syncMetadatastring
smartLinkstring
idstring
statusstring
paymentMethodstring
subscriptionDetailsobject
subscriptionDetails.amountobject
subscriptionDetails.amount.subtotalIva0integer
subscriptionDetails.amount.subtotalIvainteger
subscriptionDetails.amount.ivainteger
subscriptionDetails.amount.currencystring
subscriptionDetails.endDatestring "yyyy-mm-dd"
subscriptionDetails.termsstring
subscriptionDetails.periodicitystring
subscriptionDetails.planNamestring
subscriptionDetails.startDatestring "yyyy-mm-dd"
subscriptionIdstring
contactDetailsobject
contactDetails.firstNamestring
contactDetails.lastNamestring
contactDetails.emailstring

Example

// Approved Transaction
{
"amount": {
"subtotalIva0": 49000,
"iva": 0,
"subtotalIva": 0,
"currency": "COP"
},
"metadata": {
"email": "test@kushki.com"
},
"created": 1602090156792,
"smartLink": "QG02kRklU",
"contactDetails": {
"firstName": null,
"lastName": null,
"email": "test@kushki.com"
},
"token": "00efa6b6484c412b84271d59c2dacd8e",
"publicMerchantId": "2200000000XXXXXXX200",
"subscriptionDetails": {
"amount": {
"subtotalIva0": 15,
"iva": 0,
"subtotalIva": 0,
"currency": "COP"
},
"terms": "<p>Acepto!</p>",
"periodicity": "monthly",
"planName": "Subscription-SmartLink",
"startDate": "2020-10-07"
},
"merchantId": "2200000000XXXXXXX200",
"paymentMethod": "subscription",
"syncMetadata": "false",
"id": "ba6f7ad1-0623-417a-93fc-74b2d4b98efc",
"subscriptionId": "1602090156474000",
"status": "approvedTransaction"
}