Simulate Fleet Transactions
Overview
Do not enter production data in the Highnote Test environment, which is for exploring features and training. Use only dummy or test data.
Fleet transactions include enhanced data that may arrive at different points in the transaction lifecycle. You can use the Highnote API to simulate fleet transactions in the Test environment. Simulating fleet transactions helps test the following use cases and card product settings:
- Different merchants
- Different merchant category codes (MCCs)
- Enhanced data
- Authorization advice
- Spend rules and velocity controls
- Collaborative authorization flow
This guide provides steps for simulating fleet transactions using the Highnote API.
Prerequisites
- Review Transaction Lifecycle guide
- A Highnote account
- An API key or the API Explorer
- A fleet card product, financial account, and payment card
Merchant category codes
Fleet cards can be restricted to specific purchase types using MCC-based authorization controls. For an overview of MCC-based spend controls, see Configure Spend Rules.
Purchase types are defined as follows for Visa and Mastercard:
| Card network | Purchase type | Description |
|---|---|---|
| Visa | Open, No restrictions | Allows all fuel, maintenance, and non-fuel purchases |
| Fleet | Allows fuel and maintenance purchases only | |
| Fuel only | Only allows fuel purchases | |
| Mastercard | Open, No restrictions | Allows all fuel, maintenance, and non-fuel purchases |
| Fuel only | Allows only fuel purchases |
All fleet cards must accept fleet/fuel MCCs. It is optional to configure your authorization controls to accept maintenance MCCs. The following tables provide an overview of fleet/fuel and maintenance MCCs for reference:
Fleet/Fuel MCCs
| CODE | DESCRIPTION |
|---|---|
| 4468 | Marinas, Marine service/supplies |
| 5499 | Miscellaneous food stores; Convenience stores, markets, and specialty stores |
| 5541 | Service stations (with or without ancillary services) |
| 5542 | Fuel dispenser, automated |
| 5983 | Fuel dealers – Coal, fuel oil, liquefied petroleum, wood |
Maintenance MCCs
| CODE | DESCRIPTION |
|---|---|
| 5013 | Motor vehicle supplies and new parts |
| 5511 | Automobile and truck dealers – Sales, service, repairs, parts, and leasing |
| 5531 | Auto stores, home supply stores |
| 5532 | Automotive tire stores |
| 5533 | Automotive parts, accessories stores |
| 5599 | Miscellaneous automotive, aircraft, and farm equipment dealers |
| 7531 | Automotive body repair shops |
| 7534 | Tire retreading and repair shops |
| 7535 | Automotive paint shops |
| 7538 | Automotive service shops (non-dealer) |
| 7542 | Car washes |
| 7549 | Towing services |
| 7692 | Welding |
| 7699 | Miscellaneous repair shops and related services |
Fleet data levels
Fleet transactions follow the standard authorization and clearing data flow and include enhanced data specific to the fleet vertical. Both Visa and Mastercard define multiple levels of fleet data, but each network delivers the data differently.
When fleet data arrives
The following table shows when fleet data is delivered for each network:
| Network | Data | When it arrives |
|---|---|---|
| Both | Level 1 (standard) | Authorization and clearing |
| Visa | Level 2 (enhanced) | Authorization, authorization advice, or clearing (acquirer decides) |
| Visa | Level 3 (line items) | 24–48 hours after the transaction |
| Mastercard | Level 2 + 3 (bundled) | End of business day (ET), in a single event |
You can set up a Notification Event to alert you when enhanced data has been added to a transaction.
Level 1 data
Level 1 data contains standard payment network transaction data provided by merchants. This data includes:
- Merchant details
- Point of Service details
- Billing zip code
- Total purchase amount
- Purchase date
Level 1 data is the same for all transaction types and merchants. No enhanced data is captured or provided at this level.
Visa fleet data
Visa delivers Level 2 and Level 3 data separately, at different points in the transaction lifecycle.
Level 2 data
Level 2 data contains enhanced data captured at the point of sale. Acquirers can send Level 2 data with both authorization and clearing messages. Highnote includes fleet data in the additionalTransactionData field on the AuthorizationEvent and ReversalEvent in addition to the ClearingEvent.
An event may include either or both of the following fleet data types:
VisaFleetAuthorizationData— prompt responses, fleet identifiers, odometer readings, and purchase type captured at authorization or authorization advice timeVisaFleetL2TransactionData— fuel line items, tax data, and purchase totals
Visa sends Level 2 fuel line items on only one event in the transaction lifecycle—either the authorization, the reversal, or the clearing, depending on when the acquirer provides the data. Your integration should check for Level 2 data on the AuthorizationEvent, ReversalEvent, and ClearingEvent to ensure you capture it regardless of when it arrives.
Refer to the API Reference for more information on Visa Level 2 Purchase Data Fields.
Level 3 data
Level 3 data is typically sent 24 to 48 hours after the transaction and contains specific data related to non-fuel products and services. Merchants are not required to report enhanced data for fuel-only transactions.
Level 3 data follows an invoice structure with invoice summary information and invoice line item detail information. Refer to the API Reference for more information on Visa Level 3 Enhanced Data Fields.
Mastercard fleet data
Mastercard delivers Level 2 and Level 3 data together in a single event—either an EnhancedDataEvent or a ClearingEvent—at the end of the business day (ET).
Highnote surfaces this data in the additionalTransactionData field on the event. The payload includes fuel and non-fuel line items, tax data, and fleet identifiers. Refer to the API Reference for more information on Mastercard Enhanced Data Fields.
Simulate an authorization
In the Test environment, authorizations are approved or declined based on your card product logic and authorization controls. Highnote offers two types of authorization controls for fleet payment cards:
- Controls baked into the EMV chip in the physical card
- Controls enforced through Spend Rules and Velocity Controls
EMV chip controls have a product restriction code encoded into the EMV chip to allow fuel purchases and other approved products. The product restriction code may also prevent purchasing non-fleet items, such as food, at fuel stops.
via Visa
Use the following query to simulate a fleet authorization with Visa:
SimulateVisaFleetAuthorization
Query
mutation SimulateVisaFleetAuthorization(
$input: SimulateVisaFleetAuthorizationInput!
) {
simulateVisaFleetAuthorization(input: $input) {
__typename
... on AuthorizationEvent {
id
transaction {
... on Node {
id
}
}
responseCode
requestedAmount {
value
currencyCode
}
cvvResponseCode
merchantDetails {
countryCodeAlpha3
category
name
description
merchantId
categoryCode
address {
postalCode
region
locality
countryCodeAlpha3
}
}
pointOfServiceDetails {
category
cardDataInputCapability
panEntryMode
pinEntryMode
terminalAttendance
isCardHolderPresent
isCardPresent
terminalSupportsPartialApproval
isRecurring
}
additionalNetworkData {
__typename
... on VisaData {
transactionIdentifier
}
}
transactionProcessingType
currentFinancialAccountAvailableToSpendAmount {
currencyCode
value
}
currentFinancialAccountMaximumBalanceAmount {
currencyCode
value
}
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "amount": { "value": 100, "currencyCode": "USD" }, "cardId": "PAYMENT_CARD_ID", "merchantDetails": { "merchantId": "000000000011111", "name": "Safeway", "description": "Safeway - SF", "category": "MISCELLANEOUS_SPECIALTY_RETAIL", "address": { "postalCode": "94105", "region": "CA", "locality": "San Francisco", "countryCodeAlpha3": "USA" } }, "pointOfServiceDetails": { "category": "AUTOMATED_FUEL_DISPENSER", "cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC", "panEntryMode": "MAGNETIC_STRIPE", "pinEntryMode": "PIN_VERIFIED_BY_TERMINAL_DEVICE", "terminalAttendance": "ATTENDED", "isCardHolderPresent": true, "isCardPresent": true, "terminalSupportsPartialApproval": true, "isRecurring": false } } }
Result
{
"data": {
"simulateVisaFleetAuthorization": {
"__typename": "AuthorizationEvent",
"id": "TRANSACTION_EVENT_ID",
"transaction": {
"id": "TRANSACTION_ID"
},
"responseCode": "APPROVED_FOR_PARTIAL_AMOUNT",
"networkResponseCode": "00",
"merchantDetails": {
"merchantId": "000000000011111",
"name": "Safeway",
"description": "Safeway - SF",
"category": "MISCELLANEOUS_SPECIALTY_RETAIL",
"categoryCode": "5514",
"address": {
"postalCode": "94105",
"region": "CA",
"locality": "San Francisco",
"countryCodeAlpha3": "USA"
}
},
"pointOfServiceDetails": {
"category": "AUTOMATED_FUEL_DISPENSER",
"cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC",
"panEntryMode": "MAGNETIC_STRIPE",
"pinEntryMode": "PIN_VERIFIED_BY_TERMINAL_DEVICE",
"terminalAttendance": "ATTENDED",
"isCardHolderPresent": true,
"isCardPresent": true,
"terminalSupportsPartialApproval": true,
"isRecurring": false
},
"additionalNetworkData": {
"__typename": "VisaData",
"transactionIdentifier": "123456"
},
"transactionProcessingType": "GOODS_AND_SERVICES",
"currentFinancialAccountAvailableToSpendAmount": {
"currencyCode": "USD",
"value": 500
},
"currentFinancialAccountMaximumBalanceAmount": {
"currencyCode": "USD",
"value": 30000
},
"requestedAmount": {
"value": 100,
"currencyCode": "USD"
},
"cvvResponseCode": "MATCH"
}
},
"extensions": {
"requestId": "REQUEST_ID"
}
}
via Mastercard
Use the following query to simulate a fleet authorization with Mastercard:
SimulateMastercardFleetAuthorization
Query
mutation SimulateMastercardFleetAuthorization(
$input: SimulateMastercardFleetAuthorizationInput!
) {
simulateMastercardFleetAuthorization(input: $input) {
__typename
... on AuthorizationEvent {
id
transaction {
... on Node {
id
}
}
responseCode
createdAt
requestedAmount {
value
currencyCode
}
approvedAmount {
value
currencyCode
}
cvvResponseCode
merchantDetails {
address {
countryCodeAlpha3
locality
postalCode
region
}
category
categoryCode
countryCodeAlpha3
name
merchantId
description
}
currentFinancialAccountMaximumBalanceAmount {
value
currencyCode
}
currentFinancialAccountAvailableToSpendAmount {
value
currencyCode
}
transactionProcessingType
pointOfServiceDetails {
category
cardDataInputCapability
panEntryMode
pinEntryMode
terminalAttendance
isCardHolderPresent
isCardPresent
isRecurring
terminalSupportsPartialApproval
}
additionalNetworkData {
__typename
... on VisaData {
transactionIdentifier
}
}
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "amount": { "value": 100, "currencyCode": "USD" }, "cardId": "PAYMENT_CARD_ID", "merchantDetails": { "address": { "countryCodeAlpha3": "USA", "locality": "San Francisco", "postalCode": "94105", "region": "CA" }, "countryCodeAlpha3": "USA", "name": "My Awesome Fuel", "merchantId": "merchantId", "category": "AUTOMATED_FUEL_DISPENSERS", "description": "The awesomest awesome fuel dispensers of all time super deluxe" }, "pointOfServiceDetails": { "category": "AUTOMATED_FUEL_DISPENSER", "cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC", "panEntryMode": "MAGNETIC_STRIPE", "pinEntryMode": "PIN_ENTRY_CAPABILITY", "terminalAttendance": "ATTENDED", "isCardHolderPresent": true, "isCardPresent": true, "isRecurring": false, "terminalSupportsPartialApproval": true } } }
Result
{
"data": {
"simulateMastercardFleetAuthorization": {
"__typename": "AuthorizationEvent",
"id": "TRANSACTION_EVENT_ID",
"transaction": {
"id": "TRANSACTION_ID"
},
"responseCode": "APPROVED_FOR_PARTIAL_AMOUNT",
"requestedAmount": {
"value": 100,
"currencyCode": "USD"
},
"approvedAmount": {
"value": 50000,
"currencyCode": "USD"
},
"cvvResponseCode": "MATCH",
"merchantDetails": {
"address": {
"countryCodeAlpha3": "USA",
"locality": "San Francisco",
"postalCode": "94105",
"region": "CA"
},
"category": "AUTOMATED_FUEL_DISPENSERS",
"countryCodeAlpha3": "USA",
"name": "My Awesome Fuel",
"merchantId": "merchantId",
"description": "The awesomest awesome fuel dispensers of all time super deluxe"
},
"currentFinancialAccountMaximumBalanceAmount": {
"value": 500000,
"currencyCode": "USD"
},
"currentFinancialAccountAvailableToSpendAmount": {
"value": 420000,
"currencyCode": "USD"
},
"transactionProcessingType": "GOODS_AND_SERVICES",
"pointOfServiceDetails": {
"category": "AUTOMATED_FUEL_DISPENSER",
"cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC",
"panEntryMode": "MAGNETIC_STRIPE",
"pinEntryMode": "PIN_ENTRY_CAPABILITY",
"terminalAttendance": "ATTENDED",
"isCardHolderPresent": true,
"isCardPresent": true,
"isRecurring": false,
"terminalSupportsPartialApproval": true
},
"additionalNetworkData": null
}
},
"extensions": {
"requestId": "REQUEST_ID",
"rateLimit": {
"cost": 19,
"limit": 60060,
"remaining": 60040
}
}
}
Simulate authorization advice
For purchases at Automated Fuel Dispensers (AFDs), the full transaction amount may not be known at authorization. Instead, a $1 or estimated amount is sent for authorization at the time of purchase, and authorization advice is sent to confirm the total amount at a later time.
Simulating authorization advice is optional. Visa supports a real-time clearing program, which does not require authorization advice. We recommend skipping simulating authorization advice in the following scenarios:
- Simulating a real-time clearing event
- Simulating an in-store pre-pay transaction
- Simulating a transaction where the merchant incorrectly did not send authorization advice
via Visa
Use the following mutation to simulate authorization advice with Visa:
SimulateVisaFleetAuthorizationAdvice
Query
mutation SimulateVisaFleetAuthorizationAdvice(
$input: SimulateVisaFleetAuthorizationAdviceInput!
) {
simulateVisaFleetAuthorizationAdvice(input: $input) {
__typename
... on ReversalEvent {
id
responseCode
originalAmount {
value
currencyCode
}
approvedAmount {
value
currencyCode
}
transaction {
... on Node {
id
}
}
}
... on AuthorizationEvent {
id
transaction {
... on Node {
id
}
}
responseCode
approvedAmount {
value
currencyCode
}
requestedAmount {
value
currencyCode
}
avsResponseCode
postalCodeResponseCode
cvvResponseCode
merchantDetails {
countryCodeAlpha3
category
name
description
merchantId
categoryCode
address {
postalCode
region
locality
countryCodeAlpha3
}
}
pointOfServiceDetails {
category
cardDataInputCapability
panEntryMode
pinEntryMode
terminalAttendance
isCardHolderPresent
isCardPresent
terminalSupportsPartialApproval
isRecurring
}
additionalNetworkData {
__typename
... on VisaData {
transactionIdentifier
}
}
transactionProcessingType
currentFinancialAccountAvailableToSpendAmount {
currencyCode
value
}
currentFinancialAccountMaximumBalanceAmount {
currencyCode
value
}
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "transactionId": "TRANSACTION_ID", "amount": { "value": 1000, "currencyCode": "USD" }, "merchantDetails": { "merchantId": "000000000011111", "name": "Safeway", "description": "Safeway - SF", "category": "MISCELLANEOUS_SPECIALTY_RETAIL", "address": { "postalCode": "94105", "region": "CA", "locality": "San Francisco", "countryCodeAlpha3": "USA" } }, "pointOfServiceDetails": { "category": "AUTOMATED_FUEL_DISPENSER", "cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC", "panEntryMode": "MAGNETIC_STRIPE", "pinEntryMode": "PIN_VERIFIED_BY_TERMINAL_DEVICE", "terminalAttendance": "ATTENDED", "isCardHolderPresent": true, "isCardPresent": true, "terminalSupportsPartialApproval": true, "isRecurring": false } } }
Result
{
"data": {
"simulateVisaFleetAuthorizationAdvice": {
"__typename": "ReversalEvent",
"id": "TRANSACTION_EVENT_ID",
"responseCode": "APPROVED",
"merchantDetails": {
"merchantId": "000000000011111",
"name": "Safeway",
"description": "Safeway - SF",
"category": "MISCELLANEOUS_SPECIALTY_RETAIL",
"categoryCode": "5514",
"address": {
"postalCode": "94105",
"region": "CA",
"locality": "San Francisco",
"countryCodeAlpha3": "USA"
}
},
"pointOfServiceDetails": {
"category": "AUTOMATED_FUEL_DISPENSER",
"cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC",
"panEntryMode": "MAGNETIC_STRIPE",
"pinEntryMode": "PIN_VERIFIED_BY_TERMINAL_DEVICE",
"terminalAttendance": "ATTENDED",
"isCardHolderPresent": true,
"isCardPresent": true,
"terminalSupportsPartialApproval": true,
"isRecurring": false
},
"additionalNetworkData": {
"__typename": "VisaData",
"transactionIdentifier": "123456"
},
"transactionProcessingType": "PAYMENT_DEBIT",
"currentFinancialAccountAvailableToSpendAmount": {
"currencyCode": "USD",
"value": 500
},
"currentFinancialAccountMaximumBalanceAmount": {
"currencyCode": "USD",
"value": 30000
},
"originalAmount": {
"value": 50000,
"currencyCode": "USD"
},
"approvedAmount": {
"value": 1000,
"currencyCode": "USD"
},
"transaction": {
"id": "TRANSACTION_ID"
}
}
},
"extensions": {
"requestId": "REQUEST_ID"
}
}
via Mastercard
Use the following query to simulate authorization advice with Mastercard:
SimulateMastercardFleetAuthorizationAdvice
Query
mutation SimulateMastercardFleetAuthorizationAdvice(
$input: SimulateMastercardFleetAuthorizationAdviceInput!
) {
simulateMastercardFleetAuthorizationAdvice(input: $input) {
__typename
... on ReversalEvent {
id
responseCode
createdAt
approvedAmount {
value
currencyCode
}
transaction {
... on Node {
id
}
}
paymentCard {
id
}
merchantDetails {
address {
countryCodeAlpha3
locality
postalCode
region
}
category
countryCodeAlpha3
name
merchantId
description
}
currentFinancialAccountMaximumBalanceAmount {
value
currencyCode
}
currentFinancialAccountAvailableToSpendAmount {
value
currencyCode
}
transactionProcessingType
pointOfServiceDetails {
category
cardDataInputCapability
panEntryMode
pinEntryMode
terminalAttendance
isCardHolderPresent
isCardPresent
isRecurring
terminalSupportsPartialApproval
}
additionalNetworkData {
__typename
... on VisaData {
transactionIdentifier
}
}
partial
issuerExpiredAuthorization
}
... on AuthorizationEvent {
id
transaction {
... on Node {
id
}
}
responseCode
createdAt
approvedAmount {
value
currencyCode
}
merchantDetails {
address {
countryCodeAlpha3
locality
postalCode
region
}
category
countryCodeAlpha3
name
merchantId
description
}
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "transactionId": "TRANSACTION_ID", "amount": { "value": 10000, "currencyCode": "USD" }, "merchantDetails": { "address": { "countryCodeAlpha3": "USA", "locality": "San Francisco", "postalCode": "94105", "region": "CA" }, "category": "AUTOMATED_FUEL_DISPENSERS", "countryCodeAlpha3": "USA", "name": "My Awesome Fuel", "merchantId": "Merchant Id", "description": "The awesomest awesome fuel dispensers" }, "pointOfServiceDetails": { "category": "AUTOMATED_FUEL_DISPENSER", "cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC", "panEntryMode": "MAGNETIC_STRIPE", "pinEntryMode": "PIN_ENTRY_CAPABILITY", "terminalAttendance": "ATTENDED", "isCardHolderPresent": true, "isCardPresent": true, "isRecurring": false, "terminalSupportsPartialApproval": true } } }
Result
{
"data": {
"simulateMastercardFleetAuthorizationAdvice": {
"__typename": "ReversalEvent",
"id": "TRANSACTION_EVENT_ID",
"responseCode": "APPROVED",
"approvedAmount": {
"value": 40000,
"currencyCode": "USD"
},
"transaction": {
"id": "TRANSACTION_ID"
},
"paymentCard": null,
"merchantDetails": {
"address": {
"countryCodeAlpha3": "USA",
"locality": "San Francisco",
"postalCode": "94105",
"region": "CA"
},
"category": "AUTOMATED_FUEL_DISPENSERS",
"countryCodeAlpha3": "USA",
"name": "My Awesome Fuel",
"merchantId": "Merchant Id",
"description": "The awesomest awesome fuel dispensers"
},
"currentFinancialAccountMaximumBalanceAmount": {
"value": 500000,
"currencyCode": "USD"
},
"currentFinancialAccountAvailableToSpendAmount": {
"value": 490000,
"currencyCode": "USD"
},
"transactionProcessingType": "GOODS_AND_SERVICES",
"pointOfServiceDetails": {
"category": "AUTOMATED_FUEL_DISPENSER",
"cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC",
"panEntryMode": "MAGNETIC_STRIPE",
"pinEntryMode": "PIN_ENTRY_CAPABILITY",
"terminalAttendance": "ATTENDED",
"isCardHolderPresent": true,
"isCardPresent": true,
"isRecurring": false,
"terminalSupportsPartialApproval": true
},
"additionalNetworkData": null,
"partial": true,
"issuerExpiredAuthorization": false
}
},
"extensions": {
"requestId": "REQUEST_ID",
"rateLimit": {
"cost": 19
}
}
}
Simulate clearing
Use the following mutations to simulate fleet clearing events.
via Visa
Visa sends Level 1 and Level 2 data together in clearing events. If the acquirer already provided Level 2 data at authorization time, the clearing event may contain only Level 1 data.
Use the following mutation to simulate clearing with Visa:
SimulateVisaFleetClearing
Query
mutation SimulateVisaFleetClearing($input: SimulateVisaFleetClearingInput!) {
simulateVisaFleetClearing(input: $input) {
__typename
... on ClearingEvent {
id
responseCode
approvedAmount {
value
currencyCode
}
requestedAmount {
value
currencyCode
}
originalAmount {
value
currencyCode
}
merchantDetails {
countryCodeAlpha3
category
name
description
merchantId
categoryCode
address {
postalCode
region
locality
countryCodeAlpha3
}
}
pointOfServiceDetails {
category
cardDataInputCapability
panEntryMode
pinEntryMode
terminalAttendance
isCardHolderPresent
isCardPresent
terminalSupportsPartialApproval
isRecurring
}
additionalNetworkData {
__typename
... on VisaData {
transactionIdentifier
}
}
transactionProcessingType
currentFinancialAccountAvailableToSpendAmount {
currencyCode
value
}
currentFinancialAccountMaximumBalanceAmount {
currencyCode
value
}
additionalTransactionData {
... on VisaFleetL2TransactionData {
id
visaFuelPurchaseType
visaFuelServiceType
visaFuelType
visaFuelQuantity
visaFuelUnitOfMeasure
visaFuelUnitCost
visaFuelNetAmount
visaFuelGrossAmount
visaNonFuelNetAmount
visaNonFuelGrossAmount
visaTaxRate
visaExpandedFuelType
visaAdditionalDataIndicator
visaFleetIdentifier
visaOdometerReading
visaPurchaseIdentifierFormat
visaPurchaseIdentifier
visaFleetEmployeeNumber
visaFleetTrailerNumber
visaFleetCustomPrompt1
visaFleetCustomPrompt2
visaNonFuelProductCodes
}
}
transaction {
... on Node {
id
}
}
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "transactionId": "TRANSACTION_ID", "amount": { "value": 1000, "currencyCode": "USD" }, "merchantDetails": { "merchantId": "000000000011111", "name": "Safeway", "description": "Safeway - SF", "category": "MISCELLANEOUS_SPECIALTY_RETAIL", "address": { "postalCode": "94105", "region": "CA", "locality": "San Francisco", "countryCodeAlpha3": "USA" } }, "pointOfServiceDetails": { "category": "AUTOMATED_FUEL_DISPENSER", "cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC", "panEntryMode": "MAGNETIC_STRIPE", "pinEntryMode": "PIN_VERIFIED_BY_TERMINAL_DEVICE", "terminalAttendance": "ATTENDED", "isCardHolderPresent": true, "isCardPresent": true, "terminalSupportsPartialApproval": true, "isRecurring": false }, "visaFleetL2TransactionData": { "visaFuelPurchaseType": "FUEL_PURCHASE", "visaFuelServiceType": "SELF_SERVICE", "visaFuelType": "UNKNOWN", "visaFuelQuantity": 1000, "visaFuelUnitOfMeasure": "GALLON", "visaFuelUnitCost": 2000, "visaFuelNetAmount": 3000, "visaFuelGrossAmount": 4000, "visaNonFuelNetAmount": 5000, "visaNonFuelGrossAmount": 6000, "visaTaxRate": 7000, "visaExpandedFuelType": "PREMIUM_SUPER", "visaAdditionalDataIndicator": false, "visaFleetIdentifier": "visaFleetIdentifier", "visaOdometerReading": 1234567, "visaPurchaseIdentifierFormat": "ORDER", "visaPurchaseIdentifier": "visaPurchaseIdentifier", "visaFleetEmployeeNumber": "visaFleetEmployeeNDmber", "visaFleetTrailerNumber": "visaFleetTrailerNumber", "visaFleetCustomPrompt1": "visaFleetCustomPrompt1", "visaFleetCustomPrompt2": "visaFleetCustomPrompt2", "visaNonFuelProductCodes": [ "OIL_CHANGE", "WASHER_FLUID", "BRAKE_FLUID", "BATTERIES" ] } } }
Result
{
"data": {
"simulateVisaFleetClearing": {
"__typename": "ClearingEvent",
"id": "TRANSACTION_EVENT_ID",
"responseCode": "APPROVED",
"approvedAmount": {
"value": 1000,
"currencyCode": "USD"
},
"requestedAmount": {
"value": 1000,
"currencyCode": "USD"
},
"originalAmount": {
"value": 1000,
"currencyCode": "USD"
},
"merchantDetails": {
"merchantId": "000000000011111",
"name": "Safeway",
"description": "Safeway - SF",
"category": "MISCELLANEOUS_SPECIALTY_RETAIL",
"categoryCode": "5514",
"address": {
"postalCode": "94105",
"region": "CA",
"locality": "San Francisco",
"countryCodeAlpha3": "USA"
}
},
"pointOfServiceDetails": {
"category": "AUTOMATED_FUEL_DISPENSER",
"cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC",
"panEntryMode": "MAGNETIC_STRIPE",
"pinEntryMode": "PIN_VERIFIED_BY_TERMINAL_DEVICE",
"terminalAttendance": "ATTENDED",
"isCardHolderPresent": true,
"isCardPresent": true,
"terminalSupportsPartialApproval": true,
"isRecurring": false
},
"additionalNetworkData": {
"__typename": "VisaData",
"transactionIdentifier": "123456"
},
"transactionProcessingType": "PAYMENT_DEBIT",
"currentFinancialAccountAvailableToSpendAmount": {
"currencyCode": "USD",
"value": 500
},
"currentFinancialAccountMaximumBalanceAmount": {
"currencyCode": "USD",
"value": 30000
},
"additionalTransactionData": [
{
"id": "ENHANCED_TRANSACTION_EVENTS_ID",
"visaFuelPurchaseType": "FUEL_PURCHASE",
"visaFuelServiceType": "SELF_SERVICE",
"visaFuelType": "UNKNOWN",
"visaFuelQuantity": 1000,
"visaFuelUnitOfMeasure": "GALLON",
"visaFuelUnitCost": 2000,
"visaFuelNetAmount": 3000,
"visaFuelGrossAmount": 4000,
"visaNonFuelNetAmount": 5000,
"visaNonFuelGrossAmount": 6000,
"visaTaxRate": 7000,
"visaExpandedFuelType": "PREMIUM_SUPER",
"visaAdditionalDataIndicator": false,
"visaFleetIdentifier": "visaFleetIdentifier",
"visaOdometerReading": 1234567,
"visaPurchaseIDFormat": "ORDER",
"visaPurchaseIdentifier": "visaPurchaseIdentifier",
"visaFleetEmployeeNumber": "visaFleetEmployeeNDmber",
"visaFleetTrailerNumber": "visaFleetTrailerNumber",
"visaFleetCustomPrompt1": "visaFleetCustomPrompt1",
"visaFleetCustomPrompt2": "visaFleetCustomPrompt2",
"visaNonFuelProductCodes": [
"OIL_CHANGE",
"WASHER_FLUID",
"BRAKE_FLUID",
"BATTERIES"
]
}
],
"transaction": {
"id": "TRANSACTION_ID"
}
}
},
"extensions": {
"requestId": "REQUEST_ID"
}
}
via Mastercard
Mastercard only sends Level 1 data in clearing events. Use the following query to simulate a clearing with Mastercard:
SimulateMastercardFleetClearing
Query
mutation SimulateMastercardFleetClearing(
$input: SimulateMastercardFleetClearingInput!
) {
simulateMastercardFleetClearing(input: $input) {
__typename
... on ClearingEvent {
id
transaction {
... on Node {
id
}
}
responseCode
createdAt
approvedAmount {
value
currencyCode
}
merchantDetails {
address {
countryCodeAlpha3
locality
postalCode
region
}
category
countryCodeAlpha3
name
merchantId
description
}
currentFinancialAccountMaximumBalanceAmount {
value
currencyCode
}
currentFinancialAccountAvailableToSpendAmount {
value
currencyCode
}
transactionProcessingType
pointOfServiceDetails {
category
cardDataInputCapability
panEntryMode
pinEntryMode
terminalAttendance
isCardHolderPresent
isCardPresent
isRecurring
terminalSupportsPartialApproval
}
additionalNetworkData {
__typename
... on VisaData {
transactionIdentifier
}
}
partial
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "transactionId": "TRANSACTION_ID", "amount": { "value": 10000, "currencyCode": "USD" }, "merchantDetails": { "address": { "countryCodeAlpha3": "USA", "locality": "San Francisco", "postalCode": "94105", "region": "CA" }, "category": "AUTOMATED_FUEL_DISPENSERS", "countryCodeAlpha3": "USA", "name": "My Awesome Fuel", "merchantId": "Merchant Id", "description": "The awesomest awesome fuel dispensers" }, "pointOfServiceDetails": { "category": "AUTOMATED_FUEL_DISPENSER", "cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC", "panEntryMode": "MAGNETIC_STRIPE", "pinEntryMode": "PIN_ENTRY_CAPABILITY", "terminalAttendance": "ATTENDED", "isCardHolderPresent": true, "isCardPresent": true, "isRecurring": false, "terminalSupportsPartialApproval": true } } }
Result
{
"data": {
"simulateMastercardFleetClearing": {
"__typename": "ClearingEvent",
"id": "TRANSACTION_EVENT_ID",
"transaction": {
"id": "TRANSACTION_ID"
},
"responseCode": "APPROVED",
"createdAt": "2023-10-10T19:53:20.024Z",
"approvedAmount": {
"value": 10000,
"currencyCode": "USD"
},
"merchantDetails": {
"address": {
"countryCodeAlpha3": "USA",
"locality": "San Francisco",
"postalCode": "94105",
"region": "CA"
},
"category": "AUTOMATED_FUEL_DISPENSERS",
"countryCodeAlpha3": "USA",
"name": "My Awesome Fuel",
"merchantId": "Merchant Id",
"description": "The awesomest awesome fuel dispensers"
},
"currentFinancialAccountMaximumBalanceAmount": {
"value": 500000,
"currencyCode": "USD"
},
"currentFinancialAccountAvailableToSpendAmount": {
"value": 460000,
"currencyCode": "USD"
},
"transactionProcessingType": "GOODS_AND_SERVICES",
"pointOfServiceDetails": {
"category": "AUTOMATED_FUEL_DISPENSER",
"cardDataInputCapability": "MAG_STRIPE_READER_AND_EMV_ICC",
"panEntryMode": "MAGNETIC_STRIPE",
"pinEntryMode": "PIN_ENTRY_CAPABILITY",
"terminalAttendance": "ATTENDED",
"isCardHolderPresent": true,
"isCardPresent": true,
"isRecurring": false,
"terminalSupportsPartialApproval": true
},
"additionalNetworkData": null,
"partial": true
}
},
"extensions": {
"requestId": "REQUEST_ID",
"rateLimit": {
"cost": 18,
"limit": 60060,
"remaining": 60039
}
}
}
Simulate Level 3 enhanced data
Use the following mutations to simulate Level 3 enhanced data events.
via Visa
Visa Level 3 data is typically sent between 24 to 48 hours after the transaction takes place. Merchants are not required to report enhanced data for fuel-only transactions.
Use the following mutation to simulate Visa fleet enhanced data:
SimulateVisaFleetL3EnhancedData
Query
mutation SimulateVisaFleetL3EnhancedData(
$input: SimulateVisaFleetL3EnhancedDataInput!
) {
simulateVisaFleetL3EnhancedData(input: $input) {
__typename
... on EnhancedDataEvent {
id
transaction {
... on Node {
id
}
}
responseCode
additionalTransactionData {
... on VisaFleetL3EnhancedData {
id
discount {
amount {
value
currencyCode
}
signage
treatment
}
duty {
amount {
value
currencyCode
}
signage
}
shipping {
amount {
value
currencyCode
}
signage
taxAmount {
value
currencyCode
}
taxAmountSignage
taxRate
}
tax {
treatment
}
invoice {
referenceNumber
authorizationCode
destinationPostalCode
destinationCountryCode
orderDate
shipFromPostalCode
lineItems {
commodityCode
descriptor
productCode
quantity
unitOfMeasure
unitCost {
value
currencyCode
}
discountPerItem {
value
currencyCode
}
lineItemDetailIndicator
lineItemDiscountTreatment
taxAmount {
value
currencyCode
}
taxRate
lineItemTotal {
value
currencyCode
}
}
}
}
}
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "transactionId": "TRANSACTION_ID", "discount": { "amount": { "value": 100, "currencyCode": "USD" }, "amountSignage": "CREDIT", "treatment": "POST_DISCOUNT" }, "duty": { "amount": { "value": 200, "currencyCode": "USD" }, "amountSignage": "DEBIT" }, "invoice": { "authorizationCode": "authorizationCode", "destinationCountryCode": "USA", "destinationPostalCode": "12345", "orderDate": "2023-01-01", "referenceNumber": "invoiceReferenceNumber", "shipFromPostalCode": "98765", "lineItems": [ { "commodityCode": "BATTERIES", "descriptor": "itemDescriptor", "detailIndicator": "NORMAL", "discountPerItem": { "value": 100, "currencyCode": "USD" }, "discountTreatment": "POST_DISCOUNT", "productCode": "productCode", "quantity": 20000, "taxAmount": { "value": 200, "currencyCode": "USD" }, "taxRate": 1234, "total": { "value": 600, "currencyCode": "USD" }, "unitCost": { "value": 300, "currencyCode": "USD" }, "unitOfMeasure": "unitOfMeasure" } ] }, "shipping": { "amount": { "value": 300, "currencyCode": "USD" }, "amountSignage": "DEBIT", "taxAmount": { "value": 400, "currencyCode": "USD" }, "taxAmountSignage": "CREDIT", "taxRate": 2345 }, "tax": { "treatment": "GLL" } } }
Result
{
"data": {
"simulateVisaFleetL3EnhancedData": {
"__typename": "EnhancedDataEvent",
"id": "TRANSACTION_EVENT_ID",
"transaction": {
"id": "TRANSACTION_ID"
},
"responseCode": "APPROVED",
"additionalTransactionData": [
{
"id": "ENHANCED_DATA_ID",
"discount": {
"amount": {
"value": 100,
"currencyCode": "USD"
},
"signage": "CREDIT",
"treatment": "POST_DISCOUNT"
},
"duty": {
"amount": {
"value": 200,
"currencyCode": "USD"
},
"signage": "DEBIT"
},
"shipping": {
"amount": {
"value": 300,
"currencyCode": "USD"
},
"signage": "DEBIT",
"taxAmount": {
"value": 400,
"currencyCode": "USD"
},
"taxAmountSignage": "CREDIT",
"taxRate": 2345
},
"tax": {
"treatment": "GLL"
},
"invoice": {
"referenceNumber": "invoiceReferenceNumber",
"authorizationCode": "authorizationCode",
"destinationPostalCode": "12345",
"destinationCountryCode": "USA",
"orderDate": "2023-01-01",
"shipFromPostalCode": "98765",
"lineItems": [
{
"commodityCode": "BATTERIES",
"descriptor": "itemDescriptor",
"productCode": "productCode",
"quantity": 20000,
"unitOfMeasure": "unitOfMeasure",
"unitCost": {
"value": 300,
"currencyCode": "USD"
},
"discountPerItem": {
"value": 100,
"currencyCode": "USD"
},
"lineItemDetailIndicator": "NORMAL",
"lineItemDiscountTreatment": "POST_DISCOUNT",
"taxAmount": {
"value": 200,
"currencyCode": "USD"
},
"taxRate": 1234,
"lineItemTotal": {
"value": 600,
"currencyCode": "USD"
}
}
]
}
}
]
}
},
"extensions": {
"requestId": "REQUEST_ID"
}
}
via Mastercard
Mastercard defines enhanced data as Level 2 and Level 3 data. Mastercard Level 2 and Level 3 data is sent at the end of the business day (ET).
Use the following mutation to simulate Mastercard fleet enhanced data:
SimulateMastercardFleetEnhancedData
Query
mutation SimulateMastercardFleetEnhancedData(
$input: SimulateMastercardFleetEnhancedDataInput!
) {
simulateMastercardFleetEnhancedData(input: $input) {
__typename
... on EnhancedDataEvent {
id
transaction {
... on Node {
id
}
}
responseCode
createdAt
additionalTransactionData {
... on MastercardFleetEnhancedData {
__typename
id
fuelBrand
purchaseTime
fuelServiceType
fuelType
fuelUnitPrice {
value
currencyCode
}
fuelUnitOfMeasure
fuelQuantity
fuelSaleAmount {
value
currencyCode
}
odometerReading
vehicleNumber
driverIdentification
productType
fuelDiscountAmount {
value
currencyCode
}
taxAmount1 {
value
currencyCode
}
taxAmount2 {
value
currencyCode
}
lineItems {
productCode
description
unitOfMeasure
unitPrice {
value
currencyCode
}
itemAmount {
value
currencyCode
}
creditOrDebit
}
}
}
responseCode
}
... on UserError {
errors {
errorPath
code
description
}
}
... on AccessDeniedError {
message
}
}
}
Variables
{ "input": { "transactionId": "TRANSACTION_ID", "fuelBrand": "SINCLAIR", "purchaseTime": "1234", "fuelServiceType": "FULL_SERVICE", "fuelType": "PREMIUM", "fuelUnitPrice": { "value": 100, "currencyCode": "USD" }, "fuelUnitOfMeasure": "GALLONS", "fuelQuantity": 12.345, "fuelSaleAmount": { "value": 200, "currencyCode": "USD" }, "odometerReading": "123456", "vehicleNumber": "vehicleNumber", "driverIdentification": "driverIdentification", "productType": "PROMPT_FOR_DRIVER_NUMBER_AND_ODOMETER", "fuelDiscountAmount": { "value": 300, "currencyCode": "USD" }, "taxAmount1": { "value": 400, "currencyCode": "USD" }, "taxAmount2": { "value": 500, "currencyCode": "USD" }, "fuelLocationDetails": { "openTwentyFourHours": true, "eighteenWheelerAccess": true, "dieselSites": true, "interstateAccess": true, "convenienceStore": true, "restaurant": true, "hotel": true, "showers": true, "repairBays": true, "vehicleWash": true, "aviationLocation": true, "marinaLocation": true, "alternativeFuel": true, "payAtPump": true }, "lineItems": [ { "productCode": "BATTERIES", "description": "Really good batteries", "unitOfMeasure": "EACH", "unitPrice": { "value": 600, "currencyCode": "USD" }, "itemAmount": { "value": 700, "currencyCode": "USD" }, "creditOrDebit": "CREDIT" } ] } }
Result
{
"data": {
"simulateMastercardFleetEnhancedData": {
"__typename": "EnhancedDataEvent",
"id": "TRANSACTION_EVENT_ID",
"transaction": {
"id": "TRANSACTION_ID"
},
"additionalTransactionData": [
{
"__typename": "MastercardFleetEnhancedData",
"id": "TRANSACTION_ENHANCED_DATA_ID",
"fuelBrand": "SINCLAIR",
"purchaseTime": "1234",
"fuelServiceType": "FULL_SERVICE",
"fuelType": "PREMIUM",
"fuelUnitPrice": {
"value": 100,
"currencyCode": "USD"
},
"fuelUnitOfMeasure": "GALLONS",
"fuelQuantity": 12.345,
"fuelSaleAmount": {
"value": 200,
"currencyCode": "USD"
},
"odometerReading": "123456",
"vehicleNumber": "vehicleNumber",
"driverIdentification": "driverIdentification",
"productType": "PROMPT_FOR_DRIVER_NUMBER_AND_ODOMETER",
"fuelDiscountAmount": {
"value": 300,
"currencyCode": "USD"
},
"taxAmount1": {
"value": 400,
"currencyCode": "USD"
},
"taxAmount2": {
"value": 500,
"currencyCode": "USD"
},
"lineItems": [
{
"productCode": "BATTERIES",
"description": "Really good batteries",
"unitOfMeasure": "EACH",
"unitPrice": {
"value": 600,
"currencyCode": "USD"
},
"itemAmount": {
"value": 700,
"currencyCode": "USD"
},
"creditOrDebit": "CREDIT"
}
]
}
],
"responseCode": "APPROVED"
}
},
"extensions": {
"requestId": "REQUEST_ID",
"rateLimit": {
"cost": 20,
"limit": 60060,
"remaining": 60036
}
}
}
Automate your integration
To automate your integration, subscribe to the following notification events:
- Payment card authorization
- Payment authorization and clear
- Payment card cleared
- Payment card verification
- Payment card transaction enhanced data
The details provided in the payloads from these events can be used for the following use cases:
- Automate your application or website's transaction processing workflows
- Create account holder notifications and alerts