Events
Action |
Event name |
creating a loan |
loan.created |
updating a loan |
loan.updated |
Payload example created
{
"attemptId": "18f25eaa-f3da-431f-bb0b-398815c1b986",
"created": 1623874429,
"data": {
"displayTotalTaxes": 180000,
"displayTotal": 1180000,
"totalForTransaction": 1000000,
"agencyName": "",
"shiftId": "60a82622e81e574c31125b76",
"total": 1180000,
"changeable": true,
"createdAt": {
"offset": 0,
"value": "2021-06-16T20:13:34.420Z"
},
"promos": [],
"displayTotalWithoutTax": 1000000,
"lastName": "Hg",
"trxId": "60ca5b6ef5d175071a1f78f3",
"totalTaxes": 180000,
"fees": [],
"shiftLocation": {
"name": "B (testB)",
"stationId": "52a378c8430c7d4e2200020e"
},
"createdByUserEmail": "hernan+break@betterez.com",
"cancellable": true,
"displayTotalForTransaction": 1000000,
"refTransactionId": "72B6P4AL",
"price": 1000000,
"type": "loan_repayment",
"agencyId": "",
"transactionId": "B6ZG424V",
"_id": "60ca5b6ef5d175071a1f78f4",
"taxExempted": false,
"totalWithoutTax": 1000000,
"customerNumber": "689-249-172",
"extra": {
"phone": "514-252-3400"
},
"createdBy": "55fc2f318791db6e1a0000b6",
"status": "paid",
"displayId": "LR-60ca-5b6e-f5d1-7507-1a1f-78f4",
"deleted": false,
"updatedAt": {
"offset": 0,
"value": "2021-06-16T20:13:41.131Z"
},
"paymentRates": [
{
"displayTotal": 1180000,
"itemDisplayId": "LR-60ca-5b6e-f5d1-7507-1a1f-78f4",
"itemId": "60ca5b6ef5d175071a1f78f4",
"rates": [
{
"ratio": "100.00",
"type": "cash"
}
],
"total": 1180000
}
],
"refLoanId": "60ca5b66f5d175071a1f78f2",
"ratios": [
{
"displayTotal": 1180000,
"total": 1180000,
"type": "cash"
}
],
"firstName": "Hg",
"agentId": "",
"email": "hg@mail.com",
"refLoanDisplayId": "LO-60ca-5b66-f5d1-7507-1a1f-78f2",
"shiftNumber": "S-KGU6DX3",
"taxes": [
{
"calculated": 130000,
"displayCalculated": 130000,
"name": "hst",
"province": null,
"value": 13000
},
{
"calculated": 50000,
"displayCalculated": 50000,
"name": "ontax",
"province": null,
"value": 5000
}
],
"accountId": "52a377ec430c7d4e220001fc",
"displayDiscounts": 0,
"discounts": 0,
"productFamily": "loan",
"ssrs": [],
"refTrxId": "60ca5b5b6917240714708839",
"productType": "loan"
},
"event": "loan.created",
"id": "59dcef0a-c093-40bf-a189-d85c475f0b42",
"livemode": true
}
Payload example updated
{
"attemptId": "3e03b27b-f3b3-4557-8788-1fde1a8cd66a",
"created": 1623872009,
"data": {
"displayTotalTaxes": -180000,
"displayTotal": -1180000,
"totalForTransaction": -1000000,
"agencyName": "",
"shiftId": "60a82622e81e574c31125b76",
"total": -1180000,
"createdAt": {
"offset": 0,
"value": "2021-06-16T19:32:11.317Z"
},
"promos": [],
"displayTotalWithoutTax": -1000000,
"lastName": "Hg",
"trxId": "60ca51afb4869705bb65d142",
"totalTaxes": -180000,
"fees": [],
"shiftLocation": {
"name": "B (testB)",
"stationId": "52a378c8430c7d4e2200020e"
},
"createdByUserEmail": "hernan+break@betterez.com",
"cancellable": true,
"displayTotalForTransaction": -1000000,
"price": -1000000,
"type": "loan",
"agencyId": "",
"transactionId": "96X2V6NQ",
"_id": "60ca51bbd4d7e705bcdfe2cb",
"taxExempted": false,
"totalWithoutTax": -1000000,
"customerNumber": "689-249-172",
"extra": {
"phone": "514-252-3400"
},
"createdBy": "55fc2f318791db6e1a0000b6",
"status": "waiting for payment",
"displayId": "LO-60ca-51bb-d4d7-e705-bcdf-e2cb",
"deleted": false,
"updatedAt": {
"offset": 0,
"value": "2021-06-16T19:32:11.332Z"
},
"paymentRates": [
{
"displayTotal": -1180000,
"itemDisplayId": "LO-60ca-51bb-d4d7-e705-bcdf-e2cb",
"itemId": "60ca51bbd4d7e705bcdfe2cb",
"rates": [
{
"ratio": "100.00",
"type": "pay_on_delivery"
}
],
"total": -1180000
}
],
"ratios": [
{
"displayTotal": 1180000,
"extraInfo": null,
"total": 0,
"type": "pay_on_delivery"
}
],
"firstName": "Hg",
"agentId": "",
"email": "hg@mail.com",
"shiftNumber": "S-KGU6DX3",
"taxes": [
{
"calculated": -130000,
"displayCalculated": -130000,
"name": "hst",
"province": "all",
"value": 13000
},
{
"calculated": -50000,
"displayCalculated": -50000,
"name": "ontax",
"province": "Ontario",
"value": 5000
}
],
"accountId": "52a377ec430c7d4e220001fc",
"displayDiscounts": 0,
"discounts": 0,
"productFamily": "loan",
"ssrs": [],
"productType": "loan"
},
"event": "loan.updated",
"id": "f297c7ea-0e5d-4d4c-aa58-ea216511eb7d",
"livemode": true
}
}