Webhooks
10 min
a webhook is an http request, triggered by an event in a source system and sent to a destination system, usually with a payload of data webhooks are automated, in other words they are automatically sent out when their event is fired in the source system you can use webhook notifications to listen for events on your cabcard account so your integration can automatically trigger actions webhook endpoints a webhook endpoint defines a complete endpoint url, for example https //api your company com/webhooks/cabcard the event types you wish to receive webhook notifications for which account the webhook notifications will be sent for each webhook endpoint also has its own signature secret which you can use to verify incoming webhook notifications cabcard currently supports webhook notifications for the following events sale created intent authorized webhooks can be attached at the submerchant (driver) level, or the operator (fleet) level you can set up a new webhook endpoint in the developer tools section of your online dashboard (either my cabcard services or fleets cabcard services ) please note that your url must be prefixed by https we are unable to set up localhost addresses for testing purposes we recommend using a tool like ngrok https //ngrok com during development verifying webhooks we recommend you verify incoming webhook notifications, especially if you intend to take actions based on these webhooks which might have a financial impact, for example crediting a driver's account this is to help prevent abuse and fraud after your webhook endpoint has been set up, we will provide you with a signing secret this should be stored safely within your application (for example, in environment variables), and should not be exposed publicly all webhooks will be sent with a signature header webhook signature the header value will include a timestamp tsp and a sha256 hash digest sig in the following format webhook signature\ tsp=1602514909,sig=b46852fb83db1d391b988aa28b0c9857adb7fe1658571edb5cd43040ba87ac56 to verify a webhook extract the timestamp and signatures from the header split the header, using the , character as the separator, to get a list of elements then split each element, using the = character as the separator, to get a prefix and value pair the value for the prefix tsp corresponds to the timestamp, and sig corresponds to the signature (or signatures) you can discard any other elements prepare the signed payload string this is accomplished by conactenating the timestamp (as a string), the character , the actual json payload (i e the request body) as a string determine the expected signature compute an hmac with the sha256 hash function use your endpoint’s signing secret as the key, and use the signed payload string from step 2 as the message compare the signature in the header to the expected signature if they don't match, don't proceed a code sample for verifying webhook signatures is shown below const crypto = require('crypto'); const signingsecret = '379985ecf2af498787d207e6a6f0a007'; // secret for your webhook endpoint const payload = `{"example" "test purposes only"}`; // incoming payload, ensure this is the raw payload string, not a parsed version const header = `tsp=1602514909,sig=4bf8d21b30bc20372d11c38960947901dba598a4640b3ae37d025b08b108dd52`; // value from the http header // parse the header to get timestamp and signature const parsedheader = {}; header split(",") foreach((item) => { const element = item split('='); parsedheader\[element\[0]] = element\[1]; }); // prepare signed payload string concatenate timestamp and json payload string const signedpayloadstring = `${parsedheader tmp} ${payload}`; // compute an hmac using sha256 hash function use signing secret as the key const hash = crypto createhmac('sha256', signingsecret) update(signedpayloadstring) digest('hex'); if (hash === parsedheader sig) { // ok to proceed console log('signature verified'); } else { // do not proceeed console log('signature not verified'); your webhook endpoint for each event occurrence, cabcard will send a post request containint the webhook data to your endpoint url in json format the full event details are included and can be used directly after parsing the json therefore, your webhook endpoint needs to expect data through a post request and confirm successful receipt of that data to acknowledge receipt of an event, your endpoint must return a 2xx http status code to the originating server all response codes outside this range, including 3xx codes, indicate to that you did not receive the event if a 2xx http status code is not received, the notification attempt will be repeated, with retries attempted in an exponential backoff fashion after multiple failures to send the notification, the event will be marked as failed and further sends will not be attempted after multiple days without receiving any 2xx http status code responses, the endpoint will be considered as misconfigured and automatically disabled you will need to fix the problem and re enable the endpoint because properly acknowledging receipt of the webhook notification is so important, your endpoint should return a 2xx http status code prior to any complex logic that could cause a timeout you can use the developer tools section of your cabcard dashboard to view all notification attempts for a given endpoint it is advisable to make the webhook request operation on youre integration idempotent, as you may receive the same webhook notification more than once in this scenario, you would want to ensure that your response to a webhook request is not duplicated in addition, we cannot guarantee that event webhook notifications will be delivered within a particular time window (although our system attempts to deliver notifications as soon as possible) therefore we recommend that your integration should not be time sensitive event types all events share a common format, with specific event types containing certain properties the webhook request body will contain the following properties id string a unique identifier for the object type string the event type, for example sale created , submerchant updated , payout updated createdat string date and time of the event creation, in iso 8601 format, for example 2020 10 11t22 44 30 652z data object data associated with this event detailed information about the data field for the most commonly used events are found below event sale created the data property will contain the following properties sale object sale transaction associated with this event submerchant object submerchant associated with this event (if sale is allocated to a submerchant) balancetransaction object balance transaction associated with this event depending on the method used to accept this payment (pos, e commerce or softpos) the following additional properties may be included terminal object terminal associated with this event if sale was carried out using a pos terminal (sale property method has value pos ) intent object payment intent associated with this event if sale arose from a completed payment intent (sale property method has value ecommerce ) example webhook notification payload for ecommerce (payment link) transaction { "id" "evt a8z8mxqklms0np8t", "type" "sale created", "createdat" "2023 09 20t17 26 56 141z", "data" { "sale" { "id" "sal example", "amount" 14700, "saleamount" 14700, "gratuityamount" 0, "commissionamount" 0, "currency" "gbp", "authcode" "123456", "retrievalreferencenumber" "123456789012", "capturedat" "2023 09 20t17 26 55 000z", "method" "ecommerce", "interface" "ecommerce", "cardholderverificationmethod" "3d secure", "terminalserialnumber"\ null, "terminalid"\ null, "submerchantid" "sub example", "panfirstsix" "412345", "panlastfour" "1234", "panlength" 16, "cardscheme" "visa", "cardbrand" "visa classic", "cardtype" "debit", "cardissuer" "example bank", "cardisprepaid"\ false, "cardcountrycode" "gb", "cardcountryisineea"\ true, "cardiscommercial"\ false, "refundedamount" 0, "status" "approved", "statusexplanation"\ null, "actioncode" "00", "disbursementwithheld"\ false, "receiptslug" "blue tree 09", "balancetransactionid" "btn example", "settlementtransactionid"\ null, "createdat" "2023 09 20t17 26 55 923z", "updatedat" "2023 09 20t17 26 55 923z", "refunds" \[ ], "disputes" \[ ], "receiptid" "rct example", "userid" "api example", "externalreference" "12345678a" }, "submerchant" { "id" "sub example", "isactive"\ true, "deactivatedat"\ null, "deactivationisderogatory"\ null, "name" "taxico limited", "legalname" "taxico limited", "phonenumber" "+441493331111", "secondaryphonenumber" "", "emailaddress" "simon kitchen\@taxico co uk", "websiteurl" "https //taxico taxis co uk", "addressline1" "example road", "addressline2" "", "addressline3" "", "addresscity" "example city", "regioncode" "exm", "postcode" "ex10 1ab", "countrycode" "gb", "addresslatitude" "52 000000", "addresslongitude" "1 000000", "language" "en", "signatory" { "role" "director", "firstname" "eric", "lastname" "example", "dateofbirth" "1980 01 01", "addressline1" "18 example avenue", "addressline2" "", "addressline3" "", "addresscity" "exampleton", "regioncode" "exm", "postcode" "ex10 1ab", "countrycode" "gb" }, "significantowners" \[ { "firstname" "eric", "lastname" "example", "dateofbirth" "1980 01 01", "addressline1" "18 example avenue", "addressline2" "", "addressline3" "", "addresscity" "exampleton", "regioncode" "exm", "postcode" "ex10 1ab", "countrycode" "gb" }, ], "reference" "", "note"\ null, "payoutswithheld"\ false, "businesstype" "llc private", "businessregistrationnumber" "09876543", "merchantcategorycode" "4121", "amexsellerreference" "99999999999999999999", "createdat" "2023 03 07t11 18 53 202z", "updatedat" "2023 03 08t11 10 34 917z", "paymentfacilitatorid" "pfc example", "operatorid" "opr example", "planattachment" { "id" "pat example", "startdate" "2023 03 01", "activationdate" "2023 03 07", "enddate"\ null, "billingsourceid" "placeholder billing source", "payoutdestinationid" "pba example", "createdby"\ null, "createdat" "2023 03 07t11 20 04 194z", "updatedat" "2023 03 07t11 20 04 194z", "merchantid"\ null, "planid" "pla example", "submerchantid" "sub example", "plan" { "id" "pla example", "name" "example plan", "createdby" "usr example", "createdat" "2021 02 11t16 29 52 765z", "updatedat" "2023 01 18t15 52 30 205z", "accountid" "acc example", "processingagreementid" "agp example", "billingagreementid" "agb example", "payoutagreementid" "agd example", "billingagreement" { "type" "billing", "id" "agb example", "name" "billing agreement example name", "currency" "gbp", "charges" \[ ], "createdby" "usr example", "createdat" "2021 02 11t16 29 52 768z", "updatedat" "2021 02 11t16 29 52 768z", "accountid" "acc example" }, "processingagreement" { "type" "processing", "id" "agp example", "name" "processing agreement example name", "currency" "gbp", "rates" { "american express" { "type" "percentage", "value" 0 025 }, "card fallback" { "type" "percentage", "value" 0 015 }, "decline" { "type" "flat", "value" 10 }, "dispute" { "type" "flat", "value" 1500 }, "ecommerce authorisation" { "type" "flat", "value" 10 }, "ecommerce commercial credit european" { "type" "percentage", "value" 0 025 }, "ecommerce commercial credit non european" { "type" "percentage", "value" 0 025 }, "ecommerce commercial debit european" { "type" "percentage", "value" 0 025 }, "ecommerce commercial debit non european" { "type" "percentage", "value" 0 025 }, "ecommerce consumer credit european" { "type" "percentage", "value" 0 015 }, "ecommerce consumer credit non european" { "type" "percentage", "value" 0 025 }, "ecommerce consumer debit european" { "type" "percentage", "value" 0 015 }, "ecommerce consumer debit non european" { "type" "percentage", "value" 0 025 }, "pos authorisation" { "type" "flat", "value" 10 }, "pos commercial credit european" { "type" "percentage", "value" 0 025 }, "pos commercial credit non european" { "type" "percentage", "value" 0 025 }, "pos commercial debit european" { "type" "percentage", "value" 0 025 }, "pos commercial debit non european" { "type" "percentage", "value" 0 025 }, "pos consumer credit european" { "type" "percentage", "value" 0 015 }, "pos consumer credit non european" { "type" "percentage", "value" 0 025 }, "pos consumer debit european" { "type" "percentage", "value" 0 015 }, "pos consumer debit non european" { "type" "percentage", "value" 0 025 } }, "createdby"\ null, "createdat" "2021 02 11t16 29 52 768z", "updatedat" "2021 02 11t16 29 52 768z", "accountid" "acc example" }, "payoutagreement" { "type" "payout", "schedulenaturallanguage" "every week on wednesday", "id" "agd example", "name" "example payout agreement paid weekly, £25 min ", "currency" "gbp", "schedule" "interval=1;freq=weekly;byday=we", "minbalance" 2500, "scheduledpayoutfee" { "type" "flat", "value" 0 }, "unscheduledpayoutfee" { "type" "flat", "value" 100 }, "createdby"\ null, "createdat" "2017 11 21t13 01 36 322z", "updatedat" "2018 12 28t12 07 52 437z", "accountid" "acc example" } } } }, "intent" { "statusisfinal"\ true, "clientaccessurl" "https //pay cabcard services/beta?p=int example\&t=404d54a2c0491f2d136204", "clientaccessqrcode" "data\ image/png;base64,example", "receipturl" "https //receipts cabcard services/blue tree 09", "id" "int example", "submerchantid" "sub example", "paymentfacilitatorid" "pfc example", "reference" "12345678a", "description" "prepayment taxi journey to luton airport on 2023 10 30 09 00", "status" "succeeded", "statusexplanation"\ null, "brandidentifier" "sub example", "brand" { "payeename" "taxico limited", "smssendername" "taxico limited", "payeeavatarurl" "https //pay cabcard services/default avatar png", "processorname" "cabcard services (uk) ltd", "receiptcontactinfo" "receipts\@cabcard services", "receiptsbaseurl" "https //receipts cabcard services" }, "currency" "gbp", "amount" 14700, "saleamount" 14700, "gratuityamount" 0, "captureamount" 14700, "gratuityenabled"\ true, "clientaccesstoken" "404d54a2c0491f2d136204", "customername" "nozrul iqbal", "customeripaddress" "91 42 216 200", "customeripinfo"\ null, "customerdeviceinfo" { "isyabrowser"\ false, "isauthoritative"\ true, "ismobile"\ true, "ismobilenative"\ false, "istablet"\ false, "isipad"\ false, "isipod"\ false, "isiphone"\ true, "isiphonenative"\ false, "isandroid"\ false, "isandroidnative"\ false, "isblackberry"\ false, "isopera"\ false, "isie"\ false, "isedge"\ false, "isiecompatibilitymode"\ false, "issafari"\ true, "isfirefox"\ false, "iswebkit"\ false, "ischrome"\ false, "iskonqueror"\ false, "isomniweb"\ false, "isseamonkey"\ false, "isflock"\ false, "isamaya"\ false, "isphantomjs"\ false, "isepiphany"\ false, "isdesktop"\ false, "iswindows"\ false, "islinux"\ false, "islinux64"\ false, "ismac"\ true, "ischromeos"\ false, "isbada"\ false, "issamsung"\ false, "israspberry"\ false, "isbot"\ false, "iscurl"\ false, "isandroidtablet"\ false, "iswinjs"\ false, "iskindlefire"\ false, "issilk"\ false, "iscaptive"\ false, "issmarttv"\ false, "isuc"\ false, "isfacebook"\ false, "isalamofire"\ false, "iselectron"\ false, "silkaccelerated"\ false, "browser" "safari", "version" "16 6", "os" "os x", "platform" "iphone", "geoip" { }, "source" "mozilla/5 0 (iphone; cpu iphone os 16 6 like mac os x) applewebkit/605 1 15 (khtml, like gecko) version/16 6 mobile/15e148 safari/604 1", "iswechat"\ false }, "customerphonenumber" "+447712345678", "customeremailaddress" "example\@example com", "customersmssent"\ true, "customeremailsent"\ false, "customeraddress"\ null, "expiresat" "2023 10 04t17 24 51 547z", "succeededat" "2023 09 20t17 26 55 757z", "threedsecuretoken"\ null, "cardtoken" "x0zz9aaac9347bcf47691d6", "tokenisedcard" { "token" "x0zz9aaac9347bcf47691d6", "panend" "1234", "panstart" "412345", "cardscheme" "visa" }, "cardtokentype"\ null, "capturemode" "automatic", "capturedat" "2023 09 20t17 26 55 757z", "transactiondetails" { "amount" 14700, "cipher" "c972fd367226428cbb124a7724495779c972fd367226428cbb124a7724495779", "acquirer" "finaro", "authcode" "123456", "currency" "gbp", "operation" "use token capture", "paymentid" "646f5b94b7a52df1f3637", "requestid" "4d1cc15149b6ab", "timestamp" "09/20/2023 17 26 55", "cardscheme" "visa", "merchantid" "20009183", "receiptslug" "blue tree 09", "submerchantid" "893823884734384", "transactiontype" "straight operation", "paymentprocessor" "credorax", "paymentsourcetype" "online order", "previousresponseid" "916b0740bb50bfaf480f", "gatewayresponsecode" "0", "paymentprocessormid" "c0235423", "retrievalreferencenumber" "123456789012", "operationresultdescription" "transaction has been executed successfully ", "sourcegatewaytransactionid" "de5b9f33ee0c4bb5af400b9b177e5ded", "processingresponsereasoncode" "00", "paymentprocessortransactionid" "de5b9f33ee0c4bb5af400b9b177e5ded", "gatewayresponsecodedescription" "the transaction has been executed successfully ", "processingresponsereasoncodedescription" "approved or completed successfully" }, "authorizedat" "2023 09 20t17 26 50 368z", "authorizationdetails" { "amount" 14700, "cipher" "f86ab7a30f2341739db2bb500e109267f86ab7a30f2341739db2bb500e109267", "tdseci" "05", "tdscavv" "421cd0b1858b4e2faeabdbd7bed2745f=", "tdsdata" "05 1234567890987654321234567890\ none", "authcode" "123456", "currency" "gbp", "operation" "use token auth", "paymentid" "646f5b94b7a52df1f3637", "requestid" "1fuq2lms0mllv", "tdsstatus" "authentication successful", "tdsversion" "2 2 0", "3ds acstrxid" "5f985d61 bd46 4487 8ffa 086aaff80885", "tdsvalidpayment" "y", "tdstransactionid" "a459fe0c 66ed 4714 b1f7 bdebfd6fdc7e", "gatewayresponsecode" "0", "initialtransactionid" "098765432123456", "paymentaccountreference" "v001001381923939151234567890", "operationresultdescription" "transaction has been executed successfully ", "sourcegatewaytransactionid" "916b0740bb50bfaf480f", "processingresponsereasoncode" "00", "gatewayresponsecodedescription" "the transaction has been executed successfully ", "tdsdirectoryservertransactionid" "342af42d 4731 421b af96 238f4617b5b2", "processingresponsereasoncodedescription" "approved or completed successfully" }, "verificationdetails" { "tdschallengeurl" "https //x3d redirect credorax net/challenge/request/20009183/e69e5f140ec0e042bc09d8a0b928a47da961", "completionresult" { "amount" 14700, "cipher" "f86ab7a30f2341739db2bb500e109267f86ab7a30f2341739db2bb500e109267", "tdseci" "05", "tdscavv" "421cd0b1858b4e2faeabdbd7bed2745f=", "tdsdata" "05 1234567890987654321234567890\ none", "authcode" "123456", "currency" "gbp", "operation" "use token auth", "paymentid" "646f5b94b7a52df1f3637", "requestid" "1fuq2lms0mllv", "tdsstatus" "authentication successful", "tdsversion" "2 2 0", "3ds acstrxid" "b742fdfe 60fb 4b58 be3a fcb248098bf3", "tdsvalidpayment" "y", "tdstransactionid" "6c7740da fb80 4449 a283 17d12e2be900", "gatewayresponsecode" "0", "initialtransactionid" "098765432123456", "paymentaccountreference" "v001001381923939151234567890", "operationresultdescription" "transaction has been executed successfully ", "sourcegatewaytransactionid" "916b0740bb50bfaf480f", "processingresponsereasoncode" "00", "gatewayresponsecodedescription" "the transaction has been executed successfully ", "tdsdirectoryservertransactionid" "342af42d 4731 421b af96 238f4617b5b2", "processingresponsereasoncodedescription" "approved or completed successfully" }, "verificationmethod" "tds challenge", "tdschallengeurlexpiresat" "2023 09 20t17 27 05 791z" }, "saleid" "sal example", "logs" \[ "\[2023 09 20t17 24 51 551z] created by api example", "\[2023 09 20t17 24 53 545z] customer sms sent to +447712345678", "\[2023 09 20t17 25 11 547z] accessed using client access token ip 92 40 216 207", "\[2023 09 20t17 25 53 197z] saved tokenised card {\\"cardscheme\\" \\"visa\\",\\"panstart\\" \\"412345\\",\\"panend\\" \\"1234\\",\\"token\\" \\"x0zz9aaac9347bcf47691d6\\"}", "\[2023 09 20t17 25 53 487z] requesting payment authorization via fno", "\[2023 09 20t17 25 53 696z] authorization response indicates cardholder authentication required (sca)", "\[2023 09 20t17 25 53 702z] using sca method 3d secure fingerprint", "\[2023 09 20t17 25 53 724z] waiting for 3ds fingerprint data", "\[2023 09 20t17 25 56 297z] accessed using client access token ip 92 40 216 205", "\[2023 09 20t17 25 57 993z] accessed using client access token ip 92 40 216 205", "\[2023 09 20t17 26 00 235z] accessed using client access token ip 92 40 216 205", "\[2023 09 20t17 26 02 097z] accessed using client access token ip 92 40 216 205", "\[2023 09 20t17 26 04 767z] finished waiting for 3ds fingerprint data", "\[2023 09 20t17 26 05 782z] fingerprint completion result indicates cardholder authentication required (sca)", "\[2023 09 20t17 26 05 788z] using sca method 3d secure challenge", "\[2023 09 20t17 26 06 217z] accessed using client access token ip 92 40 216 205", "\[2023 09 20t17 26 56 062z] sale created id sal example" ], "createdby" "api example", "createdat" "2023 09 20t17 24 51 546z", "updatedat" "2023 09 20t17 26 56 062z" }, "balancetransaction" { "id" "btn example", "feeamount" 231, "netamount" 14469, "amount" 14700, "currency" "gbp", "description" "sale (approved)", "type" "sale", "status" "pending", "fees" \[ { "amount" 221, "currency" "gbp", "description" "processing fee", "type" "psp fee" }, { "amount" 10, "currency" "gbp", "description" "authorisation fee", "type" "psp fee" } ], "sourceid" "sal example", "createdat" "2023 09 20t17 26 55 853z", "updatedat" "2023 09 20t17 26 55 853z" } } } example webhook notification payload for pos (terminal) transaction { "id" "evt aa1rluklmtawfil", "type" "sale created", "createdat" "2023 09 21t15 01 25 773z", "data" { "sale" { "id" "sal example", "amount" 17000, "saleamount" 16500, "gratuityamount" 500, "commissionamount" 0, "currency" "gbp", "authcode" "123456", "retrievalreferencenumber" "av1kei004534", "capturedat" "2023 09 21t15 01 19 000z", "method" "pos", "interface" "contact", "cardholderverificationmethod" "offline pin", "terminalserialnumber" "1623116432", "terminalid" "ter example", "submerchantid" "sub example", "panfirstsix" "123456", "panlastfour" "0987", "panlength" 16, "cardscheme" "visa", "cardbrand" "visa classic", "cardtype" "debit", "cardissuer" "example bank", "cardisprepaid"\ false, "cardcountrycode" "gb", "cardcountryisineea"\ true, "cardiscommercial"\ false, "refundedamount" 0, "status" "approved", "statusexplanation" "", "actioncode" "000", "disbursementwithheld"\ false, "receiptslug" "green tree 01", "balancetransactionid" "btn example", "settlementtransactionid"\ null, "createdat" "2023 09 21t15 01 25 028z", "updatedat" "2023 09 21t15 01 25 028z", "refunds" \[ ], "disputes" \[ ], "userid"\ null, "externalreference"\ null }, "submerchant" { "id" "sub example", "isactive"\ true, "deactivatedat"\ null, "deactivationisderogatory"\ null, "name" "example taxi company", "legalname" "taxico ltd", "phonenumber" "+441234567890", "secondaryphonenumber" "", "emailaddress" "example\@example com", "websiteurl" "", "addressline1" "11 example house road", "addressline2" "example town", "addressline3" "", "addresscity" "example", "regioncode" "exp", "postcode" "ex1 9pl", "countrycode" "gb", "addresslatitude" "51 00000", "addresslongitude" " 0 00000", "language" "en", "signatory" { "role" "manager", "firstname" "eric", "lastname" "example", "dateofbirth" "1980 01 01", "addressline1" "11 example house road", "addressline2" "example town", "addressline3" "", "addresscity" "example", "regioncode" "exp", "postcode" "ex1 9pl", "countrycode" "gb" }, "significantowners" \[ { "firstname" "eric", "lastname" "example", "dateofbirth" "1980 01 01", "addressline1" "11 example house road", "addressline2" "example town", "addressline3" "", "addresscity" "example", "regioncode" "exp", "postcode" "ex1 9pl", "countrycode" "gb" } ], "reference" "", "note" "", "payoutswithheld"\ false, "businesstype" "llc private", "businessregistrationnumber" "12345678", "merchantcategorycode" "4121", "amexsellerreference" "99990001010293948585", "createdat" "2021 10 13t10 15 57 406z", "updatedat" "2023 01 16t12 40 32 327z", "paymentfacilitatorid" "pfc example", "operatorid" "opr example", "planattachment" { "id" "pat example", "startdate" "2023 03 01", "activationdate" "2023 03 07", "enddate"\ null, "billingsourceid" "placeholder billing source", "payoutdestinationid" "pba example", "createdby"\ null, "createdat" "2023 03 07t11 20 04 194z", "updatedat" "2023 03 07t11 20 04 194z", "merchantid"\ null, "planid" "pla example", "submerchantid" "sub example", "plan" { "id" "pla example", "name" "example plan", "createdby" "usr example", "createdat" "2021 02 11t16 29 52 765z", "updatedat" "2023 01 18t15 52 30 205z", "accountid" "acc example", "processingagreementid" "agp example", "billingagreementid" "agb example", "payoutagreementid" "agd example", "billingagreement" { "type" "billing", "id" "agb example", "name" "billing agreement example name", "currency" "gbp", "charges" \[ ], "createdby" "usr example", "createdat" "2021 02 11t16 29 52 768z", "updatedat" "2021 02 11t16 29 52 768z", "accountid" "acc example" }, "processingagreement" { "type" "processing", "id" "agp example", "name" "processing agreement example name", "currency" "gbp", "rates" { "american express" { "type" "percentage", "value" 0 025 }, "card fallback" { "type" "percentage", "value" 0 015 }, "decline" { "type" "flat", "value" 10 }, "dispute" { "type" "flat", "value" 1500 }, "ecommerce authorisation" { "type" "flat", "value" 10 }, "ecommerce commercial credit european" { "type" "percentage", "value" 0 025 }, "ecommerce commercial credit non european" { "type" "percentage", "value" 0 025 }, "ecommerce commercial debit european" { "type" "percentage", "value" 0 025 }, "ecommerce commercial debit non european" { "type" "percentage", "value" 0 025 }, "ecommerce consumer credit european" { "type" "percentage", "value" 0 015 }, "ecommerce consumer credit non european" { "type" "percentage", "value" 0 025 }, "ecommerce consumer debit european" { "type" "percentage", "value" 0 015 }, "ecommerce consumer debit non european" { "type" "percentage", "value" 0 025 }, "pos authorisation" { "type" "flat", "value" 10 }, "pos commercial credit european" { "type" "percentage", "value" 0 025 }, "pos commercial credit non european" { "type" "percentage", "value" 0 025 }, "pos commercial debit european" { "type" "percentage", "value" 0 025 }, "pos commercial debit non european" { "type" "percentage", "value" 0 025 }, "pos consumer credit european" { "type" "percentage", "value" 0 015 }, "pos consumer credit non european" { "type" "percentage", "value" 0 025 }, "pos consumer debit european" { "type" "percentage", "value" 0 015 }, "pos consumer debit non european" { "type" "percentage", "value" 0 025 } }, "createdby"\ null, "createdat" "2021 02 11t16 29 52 768z", "updatedat" "2021 02 11t16 29 52 768z", "accountid" "acc example" }, "payoutagreement" { "type" "payout", "schedulenaturallanguage" "every week on wednesday", "id" "agd example", "name" "example payout agreement paid weekly, £25 min ", "currency" "gbp", "schedule" "interval=1;freq=weekly;byday=we", "minbalance" 2500, "scheduledpayoutfee" { "type" "flat", "value" 0 }, "unscheduledpayoutfee" { "type" "flat", "value" 100 }, "createdby"\ null, "createdat" "2017 11 21t13 01 36 322z", "updatedat" "2018 12 28t12 07 52 437z", "accountid" "acc example" } } } }, "terminal" { "id" "ter example", "manufacturer" "datecs", "model" "bluepad55 4g", "serialnumber" "1623116432", "reference" 64329489, "customreference" "258", "lastconnectionat" "2023 09 21t15 01 24 092z", "createdat" "2022 04 01t08 44 41 279z", "updatedat" "2023 09 21t14 38 59 097z", "currentallocation" { "id" "tal example", "endedat"\ null, "createdat" "2022 04 07t10 15 41 080z", "createdby" "9xsxftfcaftfg5gppf9r68v7iac8zoki\@clients", "startedat" "2022 04 07t10 15 41 007z", "updatedat" "2022 04 07t10 15 41 080z", "merchantid"\ null, "terminalid" "ter example", "depositoryid"\ null, "submerchantid" "sub example" }, "simcardid" "sim example" }, "balancetransaction" { "id" "btn example", "feeamount" 175, "netamount" 16825, "amount" 17000, "currency" "gbp", "description" "sale (approved)", "type" "sale", "status" "pending", "fees" \[ { "amount" 170, "currency" "gbp", "description" "processing fee", "type" "psp fee" }, { "amount" 5, "currency" "gbp", "description" "authorisation fee", "type" "psp fee" } ], "sourceid" "sal example", "createdat" "2023 09 21t15 01 24 947z", "updatedat" "2023 09 21t15 01 24 947z" } } } event intent authorized this event is triggered when a payment intent in capture mode manual is authorized an example webhook payload is available on request