Notification Examples
Ready-to-use notification rule configurations covering common scenarios, with a full field and condition operator reference.
Code samples within this document are provided for reference purposes only and are not intended for production use.
Notification types
| Type | Event |
|---|---|
PFR | Payment / Financial Response (any transaction outcome) |
NTE_CREATE | Token created |
NTE_UPDATE | Token updated |
NTE_DELETE | Token deleted |
Rule structure
Every notification rule shares the same top-level shape. The payment.fields array controls which transaction fields are included in the POST body, and the optional payment.condition object filters which transactions trigger the notification.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": true,
"type": "PFR",
"url": "https://your-endpoint.com/notifications",
"maxAttempt": 5,
"payment": {
"fields": ["responseCode", "merchReference", "txnReference"],
"condition": {}
}
}
Rule fields
| Field | Type | Required | Description |
|---|---|---|---|
userName | String | Yes* | Username for authentication (*or a suitable alternative authentication method) |
password | String | Yes* | Password for authentication (*or a suitable alternative authentication method) |
enabled | Boolean | Yes | true to activate the rule |
type | String | Yes | Notification type (see table above) |
url | String | Yes | Your HTTPS endpoint to receive the POST |
emails | Array of strings | No | Fallback email(s), used only after all delivery attempts fail. Optional when url is provided |
headers | Object of strings | No | Custom headers sent with the notification. Each key becomes the header name and its value the header value |
maxAttempt | Integer | Yes | Maximum delivery attempts before falling back to email. A value of 0 falls back to the service default |
payment.fields | Array of strings | Yes | Fields to include in the notification payload |
payment.condition | Object | No | Filter for which events trigger the notification. Omit to receive all matching events |
Send enabled as a JSON boolean (true, not "true") and maxAttempt as a JSON integer (5, not "5").
Common examples
- All Transactions
- Approved Only
- Declined Only
- High Value
- Token Events
All transactions
Receive every transaction result. Useful for transaction logging, audit trails, and real-time monitoring.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": true,
"type": "PFR",
"url": "https://your-endpoint.com/notifications",
"maxAttempt": 1,
"payment": {
"fields": ["responseCode", "merchReference", "txnReference"]
}
}
Example payload received:
{
"responseCode": "00",
"merchReference": "ORDER-12345",
"txnReference": "TXN-67890"
}
Approved transactions only
Only fires when responseCode is "00". Use this to trigger order fulfilment or send customer confirmation emails.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": true,
"type": "PFR",
"url": "https://your-endpoint.com/notifications",
"maxAttempt": 5,
"payment": {
"fields": ["merchReference", "txnReference"],
"condition": {
"and": {
"responseCode": "00"
}
}
}
}
Declined transactions only
Fires when the response code matches any code in the list. Use for fraud monitoring or customer retry flows.
Notification conditions do not support a "not equals" operator, so declines are matched by listing the response codes explicitly. The list below is illustrative and is not the complete set of declines. List every response code you want to be notified about.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": true,
"type": "PFR",
"url": "https://your-endpoint.com/fraud-alerts",
"maxAttempt": 10,
"payment": {
"fields": [
"responseCode",
"message",
"merchReference",
"txnReference",
"amount",
"maskedPAN"
],
"condition": {
"and": {
"responseCode": ["05", "51", "54", "14", "41", "43", "59", "61", "62"]
}
}
}
}
Approved transactions over $100
Combines two conditions with and logic. Both must be true for the notification to fire.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": true,
"type": "PFR",
"url": "https://your-endpoint.com/notifications",
"maxAttempt": 5,
"payment": {
"fields": ["merchReference", "txnReference", "amount", "responseCode"],
"condition": {
"and": {
"responseCode": "00",
"amount": { "condition": "gt", "value": 10000 }
}
}
}
}
lt and gt use the full form with a numeric value in the smallest currency unit (cents) — 10000 = $100.00. emails is optional and is only used to send a fallback email after all delivery attempts fail.
Token creation
Fires whenever a new card token is created. Returns the token and any metadata attached to it, making it easy to map the token to a customer record in your system.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": true,
"type": "NTE_CREATE",
"url": "https://your-endpoint.com/notifications",
"maxAttempt": 1,
"payment": {
"fields": ["cardToken", "metadata"]
}
}
Use NTE_UPDATE or NTE_DELETE as the type to monitor token updates and deletions respectively.
Available fields
You choose which fields a notification contains. Any field from the transaction API response can be selected, using its top-level name or a dotted name for nested fields. The tables below list common fields as examples, not a fixed schema. Fields with no value are left out of the notification.
Every notification also always includes notificationId, customerId, hierarchy and userName.
Types match the API response: amount, txnType and detailedCode are integers, and amount is in cents.
These fields are blocked and are never sent in a notification: password, secret, sensitive, pan, cvv, cryptogram, eci, cavv, xid and paymentInstrument.
- Transaction Fields
- Card Fields
Transaction fields
| Field | Description | Example |
|---|---|---|
responseCode | Transaction response code | "00" |
message | Response description | "Approved" |
merchReference | Merchant reference | "ORDER-12345" |
txnReference | Transaction reference | "TXN-67890" |
amount | Amount in cents (integer) | 10000 |
currency | Currency code | "AUD" |
txnType | Transaction type code (integer) | 1 |
transactionDate | Transaction timestamp | "2025-01-12T10:30:00Z" |
settlementDate | Settlement date | "2025-01-13" |
Card fields
| Field | Description | Example |
|---|---|---|
cardToken | Token reference for the card | "tok_abc123" |
cardSchema | Card scheme | "VISA" |
maskedPAN | Masked card number | "411111******1111" |
cardExpiryDate | Card expiry | "1225" |
cardHolderName | Cardholder name | "John Smith" |
metadata | Custom key-value data | {"customerId": "123"} |
Condition operators
Use these inside payment.condition to filter which transactions trigger a notification.
Condition syntax
The supported comparison operators are eq (the default), lt and gt. Other operators such as ne, gte and lte are not supported.
| Form | Meaning | Example |
|---|---|---|
| Plain value | Equals (eq) | "responseCode": "00" |
| List of values | Equals any of these values | "responseCode": ["05", "51"] |
condition + value | Greater than (gt) | "amount": { "condition": "gt", "value": 10000 } |
condition + value | Less than (lt) | "amount": { "condition": "lt", "value": 5000 } |
condition + value | Equals (eq), explicit form | "responseCode": { "condition": "eq", "value": "00" } |
For lt and gt, value is a number. For amounts, use the smallest currency unit (10000 = $100.00).
An object without a "condition" key (for example { "gt": 10000 }) is not an error, but it is treated as eq against the value 0. The rule will never match and no error is raised.
Logical operators
- AND Logic
- OR Logic
AND logic
Use and to require all conditions to match:
"condition": {
"and": {
"responseCode": "00",
"amount": { "condition": "gt", "value": 10000 }
}
}
OR logic
Use or for at least one condition to match:
"condition": {
"or": {
"cardType": "Visa",
"responseCode": ["51", "05"]
}
}
To match one field against several values, use a list instead of repeating the key: "cardType": ["Visa", "Mastercard"].