Webhooks with Smartlinks

Credit Card Payment

Structure

The webhooks sent by Kushki will contain the headers listed here.
These are the possible variables that are submitted in the webhook body 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

Examples

  • JSON
  • JSON
// Approved Transaction
{
"ticketNumber": "608834841569769013",
"amount": {
"subtotalIva0": 49000,
"iva": 0,
"subtotalIva": 0,
"currency": "COP"
},
"metadata": {
"email": "test@kushki.com"
},
"transactionReference": "57619814-1f58-47be-b1ac-5cf66c13d127",
"created": 1602088845957,
"smartLink": "QG02kRklU",
"contactDetails": {
"email": "test@kushkipagos.com"
},
"token": "d04e9b999f304cf5bebdf85f9f9837cd",
"publicMerchantId": "20000000XXXXXX2000",
"merchantId": "20000000XXXXXX2000",
"paymentMethod": "creditCard",
"syncMetadata": "false",
"id": "5b291720-0328-4d48-bb45-c7016aa037ec",
"status": "approvedTransaction"
}
// 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 Payment

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"
}