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",
"emails": ["[email protected]"],
"maxAttempt": "5",
"payment": {
"fields": ["responseCode", "merchReference", "txnReference"],
"condition": {}
}
}
Rule fields
| Field | Description |
|---|---|
enabled | "true" to activate the rule |
type | Notification type (see table above) |
url | Your HTTPS endpoint to receive the POST |
emails | Fallback email(s) if all delivery attempts fail |
maxAttempt | Maximum delivery attempts before falling back to email |
payment.fields | Fields to include in the notification payload |
payment.condition | Optional filter — omit to receive all matching events |
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",
"emails": ["[email protected]"],
"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",
"emails": ["[email protected]"],
"maxAttempt": "5",
"payment": {
"fields": ["merchReference", "txnReference"],
"condition": {
"and": {
"responseCode": "00"
}
}
}
}
Declined transactions only
Fires for any non-approved response. Use for fraud monitoring or customer retry flows.
{
"userName": "ABC",
"password": "passwordABC",
"enabled": "true",
"type": "PFR",
"url": "https://your-endpoint.com/fraud-alerts",
"emails": ["[email protected]"],
"maxAttempt": "10",
"payment": {
"fields": [
"responseCode",
"responseText",
"merchReference",
"txnReference",
"amount",
"maskedPAN"
],
"condition": {
"and": {
"responseCode": { "ne": "00" }
}
}
}
}
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": { "gt": "10000" }
}
}
}
}
Amounts are always in cents — "10000" = $100.00.
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",
"emails": ["[email protected]"],
"maxAttempt": "1",
"payment": {
"fields": ["cardToken", "metadata"]
}
}
Use NTE_UPDATE or NTE_DELETE as the type to monitor token updates and deletions respectively.
Available fields
- Transaction Fields
- Card Fields
Transaction fields
| Field | Description | Example |
|---|---|---|
responseCode | Transaction response code | "00" |
responseText | Response description | "Approved" |
merchReference | Merchant reference | "ORDER-12345" |
txnReference | Transaction reference | "TXN-67890" |
amount | Amount in cents | "10000" |
finalAmount | Total including surcharge | "10050" |
surcharge | Surcharge amount in cents | "50" |
currency | Currency code | "AUD" |
txnType | Transaction type code | "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" |
cardType | Card brand | "Visa" |
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.
Comparison operators
| Operator | Meaning | Example |
|---|---|---|
| (no operator) | Equals | "responseCode": "00" |
ne | Not equals | "responseCode": { "ne": "00" } |
gt | Greater than | "amount": { "gt": "10000" } |
lt | Less than | "amount": { "lt": "5000" } |
gte | Greater than or equal | "amount": { "gte": "10000" } |
lte | Less than or equal | "amount": { "lte": "5000" } |
Logical operators
- AND Logic
- OR Logic