Event Code 111 - Apata Finalised Event


The 111 event code is used when Apata sends a finalised event.

{
  "productId": 12345,
  "events": [111],
  "webhookStatus": "active",  
  "config": {
    "url": "https://client_domain.com/webhook",
    "customHeaders": {
      "header1": "value_1",
      "header2": "value_2"
    }
  }
}

After the webhook has been successfully set up, when Apata sends a finalised event, a notification response is sent asynchronously from the Event Delivery Service to the URL specified in the webhook. See the below example of a response.

{
  "context": {
    "notificationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "eventCode": 111,
    "eventVersion": "v1",
    "notificationTime": "2024-01-24T23:20:28Z"
  },
  "payload": {
    "version": "V2.0",
    "eventType": "FINALISED_EVENT",
    "transaction": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "dsTransactionId": "98315a91-e0b6-4fe0-8842-9ed82ea8ef0b",
      "threeDsServerTransactionId": "3f9430da-4dd7-473c-b3a3-5100a79deb0d",
      "cardProgramId": "ec737f30-0c61-4383-9732-83d7c7b38b49",
      "riskProfileId": "c0ca8866-27de-4ac6-bdda-8dfc24a74ae9",
      "challengePreference": "NO_PREFERENCE",
      "decoupledPreference": "REQUIRED",
      "amount": 1000,
      "currency": "EUR",
      "recurFrequency": 0,
      "recurEndDate": "2019-08-24",
      "installments": 0,
      "merchantId": "string",
      "merchantName": "string",
      "merchantCountry": "IRL",
      "mcc": "1234",
      "threeDsRequestorId": "string",
      "threeDsRequestorName": "string",
      "threeDsRequestorUrl": "string",
      "threeDsServerReferenceNumber": "string",
      "threeDsServerOperatorId": "string",
      "renderType": "APP_NATIVE",
      "date": "2019-08-24T14:15:22Z",
      "acquirerBin": "123456",
      "authenticationValue": "AABBCCDDEEFFAABBCCDDEEFFAAA=",
      "eci": "string",
      "state": "SUCCEEDED",
      "errorCode": "resource_not_found",
      "reason": "CARD_EXPIRED",
      "exemption": "LOW_VALUE_PAYMENT",
      "protocolVersion": "1.0.2",
      "category": "PAYMENT",
      "transactionType": "PAYMENT",
      "channel": "APP",
      "deviceIP": "string",
      "devicePlatform": "string",
      "deviceModel": "string",
      "deviceOs": "string",
      "deviceOsVersion": "string",
      "deviceLocale": "string",
      "deviceTimezone": "string",
      "deviceAdvertisingId": "string",
      "deviceScreenHeight": 0,
      "deviceScreenWidth": 0,
      "deviceName": "string",
      "deviceLatitude": 0,
      "deviceLongitude": 0,
      "deviceCountry": "string",
      "deviceLanguage": "string",
      "browserAcceptHeader": "string",
      "browserJavaEnabled": true,
      "browserJavascriptEnabled": true,
      "browserColourDepth": 0,
      "browserUtcOffsetMinutes": 0,
      "browserUserAgent": "string"
    },
    "challenges": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "challengeProfileId": "950c886e-8eba-4465-8443-d22f90d269f8",
        "challengeMethodId": "12b5985b-8771-477a-9d02-4528a83cf2b4",
        "challengeMethodAlias": "string",
        "challengeMethodType": "SMS_OTP",
        "created": "2019-08-24T14:15:22Z",
        "updated": "2019-08-24T14:15:22Z",
        "ttl": 300,
        "state": "PENDING"
      }
    ],
    "card": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "externalId": "my-custom-card-reference",
      "language": "en",
      "scheme": "VISA",
      "tags": {
        "property1": "string",
        "property2": "string"
      }
    }
  }
}

The below table describes each of the fields included in the notification response.

FieldDescription
contextObject that contains the context of the notification, such as the event code.
notificationIdUnique identifier of the notification.
eventCodeThe event code. In this case, the event code is 111.
eventVersionThe event version.
notificationTimeWhen the notification was created. Time in the UTC format of 'yyyy-MM-ddTHH:mm:ssZ'.
payloadObject that contains the payload of the notification, which is specific to the event code.
versionThe version of the event (for example, V2.0).
eventTypeThe type of the event, indicating this is a finalized event.
transactionObject that contains details of the finalized transaction.
idThe unique identifier for the transaction.
dsTransactionIdThe transaction ID assigned by the directory server.
threeDsServerTransactionIdThe transaction ID assigned by the 3D Secure server.
cardProgramIdThe ID representing the card program used for this transaction.
riskProfileIdThe risk profile ID associated with the transaction.
challengePreferenceThe preference for challenges. For example, CHALLENGE_MANDATED.
decoupledPreferenceThe merchant’s preference for decoupled authentication.
amountThe purchase amount in the currency's minor unit.
currencyThe ISO-4217 alpha currency code.
recurFrequencyThe minimum number of days between authorisations.
recurEndDateThe date after which no further authorisations should be performed in the format.
installmentsThe max number of permitted instalment payments.
merchantIdThe acquirer-assigned merchant identifier.
merchantNameThe merchant name assigned by the Acquirer or Payment System.
merchantCountryThe ISO 3166 alpha country code for the merchant.
mccThe directory server specific code describing the merchant's type of business, product or service.
threeDsRequestorIdThe 3DS requestor ID.
threeDsRequestorNameThe name of the 3DS requestor.
threeDsRequestorUrlThe URL of the 3DS requestor.
threeDsServerReferenceNumberThe reference number from the 3DS server.
threeDsServerOperatorIdThe operator ID from the 3DS server.
renderTypeThe format in which the challenge is displayed to the cardholder.
dateThe date the transaction was initiated.
acquirerBinThe BIN of the acquirer.
authenticationValueThe authentication value generated for the transaction.
eciThe Electronic Commerce Indicator representing the outcome of authentication.
stateThe final status of the transaction.
errorCodeThe error code provided for transactions that encountered an error.
reasonThe explanation for why the transaction failed or was rejected.
exemptionFor frictionless transactions, indicates the exemption type applied.
protocolVersionThe 3DS protocol version.
categoryThe classification of the transaction (For example, payment, non-payment).
transactionTypeThe type of transaction being processed.
channelThe channel through which the transaction originated (For example, browser, app).
deviceIPThe IP address of the device used for the transaction.
devicePlatformThe platform of the device used.
deviceModelThe model of the device used for the transaction.
deviceOsThe operating system of the device used.
deviceOsVersionThe operating system version of the device.
deviceLocaleThe locale of the device.
deviceTimezoneThe timezone of the device.
deviceAdvertisingIdThe advertising ID of the device.
deviceScreenHeightThe screen height of the device.
deviceScreenWidthThe screen width of the device.
deviceNameThe name of the device.
deviceLatitudeThe latitude of the device’s location.
deviceLongitudeThe longitude of the device’s location.
deviceCountryThe country of the device user.
deviceLanguageThe language of the device.
browserAcceptHeaderThe value of the HTTP Accept header sent by the browser.
browserJavaEnabledIndicates whether Java is enabled in the browser.
browserJavascriptEnabledIndicates whether JavaScript is enabled in the browser.
browserColourDepthThe colour depth of the browser.
browserUtcOffsetMinutesUTC offset in minutes of the browser.
browserUserAgentThe User Agent string of the browser.
transactionEnd of the transaction object.
challengesObject that contains details on the challenges performed if the transaction underwent a challenge.
idThe unique identifier of the challenge.
challengeProfileIdThe identifier of the challenge profile in which this challenge method is configured.
challengeMethodIdThe identifier of the challenge method used for this challenge.
challengeMethodAliasThe alias of the challenge method used for this challenge.
challengeMethodTypeThe type of the challenge method used.
createdWhen the challenge was created.
updatedWhen the challenge state was last updated.
ttlThe time limit (in seconds) set for completing this challenge.
stateThe final status of the challenge.
challengesEnd of the challenges object.
cardObject that contains information on the card.
idThe unique identifier of the card generated by Apata.
externalIdThe unique identifier of the card generated by the issuer.
languageThe ISO 639-1 or BCP-47 language code for the card.
schemeThe payment scheme of the card. For example, MASTERCARD.
tagsObject that contains custom tags associated with the card.
property1
property2
tagsEnd of the tags object.
cardEnd of the card object.
payloadEnd of the tags object.