Fuel API Guide - Integrate
Last updated: Aug 15th, 5:53am
Paydiant is now PayPal's White Label Wallet (WLW).
Use Cases
This section includes transaction flow diagrams for the following Fuel use cases.
Note: Code samples in this guide have been formatted for readability and may not precisely match the format in samples you can obtain on your system.
Standard Use Cases
Standard Fuel Transaction
Fuel Transaction with Access Code
updateFuelEvent Use Cases
These samples show several cases in which the updateFuelEvent
method can be implemented, as well as sample code.
Fuel Only Transaction for a Total Amount of $42.00
This use case shows:
- A Fuel-Only sale for a total amount of $42.00.
- 20 Gallons pumped at $2.10 per gallon.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_FUEL_END",5 "paymentCharge": {6 "merchantTenderData": {7 "tenderLocalDate": "20150219",8 "tenderLocalTime": "084027",9 "merchantTenderId": "7wndyGSotSEO"10 }11 },12 "fuelReceipt": {13 "totalAmount": {14 "amount": 42,15 "currencyCode": "USD"16 },17 "unitsDispensed": 20,18 "fuelAmount": {19 "amount": 42,20 "currencyCode": "USD"21 },22 "fuelTax": {23 "amount": 1,24 "currencyCode": "USD"25 },26 "pricePerUnit": {27 "amount": 2.1,28 "currencyCode": "USD"29 },30 "unitType": "GALLON",31 "fuelGrade": {32 "description": "Premium",33 "id": "3",34 },35 "totalTax": {36 "amount": 1,37 "currencyCode": "USD"38 }39 },40 "reconciliationInfo": {41 "terminalID": "12345678",42 "retailerID": "12345678901",43 "invoiceID": "10001234"44 },45 "storeLocationID": "10001088",46 "pumpNumber" : "1"47 }48}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "SUCCESS",6 "statusDescription": "Success",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": {11 "paymentInstrument": {12 "paymentTender": {13 "accountTypeName": "CREDIT",14 "accountTypeUri": "ippi#154541-147515",15 "networkTypeName": "VISA",16 "networkTypeUri": "NTU#546525151"17 },18 "additionalData": [19 {20 "key": "NickName",21 "value": "TestCredit"22 },23 {24 "key": null,25 "value": null26 }27 ],28 "paymentInstrumentUri": "PIURI#132421",29 "paymentInstrumentId": "PIID#5648",30 "maskedCardNumber": "xxxxxxxxx5487"31 },32 "amount": {33 "amount": 44.95,34 "currencyCode": "USD"35 },36 "merchantTenderData": {37 "tenderLocalDate": "LocalDate",38 "tenderLocalTime": "LocalTime",39 "merchantTenderId": "MerchantTenderId#123"40 },41 "paydiantTenderID": "PAYDIANTTENDERID#8089890",42 "paymentStatus": "APPROVED",43 "paymentStatusCode": 200,44 "externalPaymentStatusCode": "EXTPAYSTATUS#565657",45 "externalPaymentStatusDescription": "EXTPAYSTATUSDESC#998907",46 "externalPaymentAuthCode": "EXTPAYAUTH#121232"47 },48 "paydiantTransactionRefId": " c98eca3b-e37c-4855-bf03-3db69b8ec035"49 }50}
Fuel with Car Wash Purchase
This use case shows:
- $4.95 car wash
- $42.00 in fuel with 20 gallons pumped at $2.10 per gallon.
- Car Wash Code expires in 5 days.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": " c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_FUEL_END",5 "paymentCharge": {6 "merchantTenderData": {7 "tenderLocalDate": "20150219",8 "tenderLocalTime": "084027",9 "merchantTenderId": "7wndyGSotSEO"10 }11 },12 "fuelReceipt": {13 "totalAmount": {14 "amount": 46.95,15 "currencyCode": "USD"16 },17 "unitsDispensed": 20,18 "fuelAmount": {19 "amount": 42,20 "currencyCode": "USD"21 },22 "fuelTax": {23 "amount": 1,24 "currencyCode": "USD"25 },26 "pricePerUnit": {27 "amount": 2.1,28 "currencyCode": "USD"29 },30 "unitType": "GALLON",31 "fuelGrade": {32 "available": true,33 "description": "Premium",34 "id": "3",35 "price": {36 "amount": 2.1,37 "currencyCode": "USD"38 }39 },40 "totalTax": {41 "amount": 1.5,42 "currencyCode": "USD"43 },44 "carWashInfo": {45 "siteResource": {46 "available": true,47 "description": "Premium car wash with Rainbow Soap",48 "id": "4",49 "name": "Premium",50 "itemPrice": {51 "amount": 4.95,52 "currencyCode": "USD"53 },54 "tax": {55 "amount": 0.5,56 "currencyCode": "USD"57 }58 },59 "carWashCode": "123456",60 "carWashCodeExpirationDate": "20150224"61 }62 },63 "reconciliationInfo": {64 "terminalID": "12345678",65 "retailerID": "12345678901",66 "invoiceID": "10001234"67 },68 "storeLocationID": "10001088",69 "pumpNumber" : "1"70 }71}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "SUCCESS",6 "statusDescription": "Success",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": {11 "paymentInstrument": {12 "paymentTender": {13 "accountTypeName": "CREDIT",14 "accountTypeUri": "ippi#154541-147515",15 "networkTypeName": "VISA",16 "networkTypeUri": "NTU#546525151"17 },18 "additionalData": [19 {20 "key": "NickName",21 "value": "TestCredit"22 },23 {24 "key": null,25 "value": null26 }27 ],28 "paymentInstrumentUri": "PIURI#132421",29 "paymentInstrumentId": "PIID#5648",30 "maskedCardNumber": "xxxxxxxxx5487"31 },32 "amount": {33 "amount": 44.95,34 "currencyCode": "USD"35 },36 "merchantTenderData": {37 "tenderLocalDate": "LocalDate",38 "tenderLocalTime": "LocalTime",39 "merchantTenderId": "MerchantTenderId#123"40 },41 "paydiantTenderID": "PAYDIANTTENDERID#8089890",42 "paymentStatus": "APPROVED",43 "paymentStatusCode": 200,44 "externalPaymentStatusCode": "EXTPAYSTATUS#565657",45 "externalPaymentStatusDescription": "EXTPAYSTATUSDESC#998907",46 "externalPaymentAuthCode": "EXTPAYAUTH#121232"47 },48 "paydiantTransactionRefId": " c98eca3b-e37c-4855-bf03-3db69b8ec035"49 }50}
Discounted Fuel Purchase with Car Wash
This sample shows:
- A purchase total amount of $44.95.
- $40.00 in fuel with 20 Gallons pumped at $2.00 per gallon (10 cents per gallon roll back).
- Car wash code expires in 5 days.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": " c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_FUEL_END",5 "paymentCharge": {6 "merchantTenderData": {7 "tenderLocalDate": "20150219",8 "tenderLocalTime": "084027",9 "merchantTenderId": "7wndyGSotSEO"10 }11 },12 "fuelReceipt": {13 "totalAmount": {14 "amount": 44.95,15 "currencyCode": "USD"16 },17 "unitsDispensed": 20,18 "fuelAmount": {19 "amount": 40,20 "currencyCode": "USD"21 },22 "fuelTax": {23 "amount": 1,24 "currencyCode": "USD"25 },26 "pricePerUnit": {27 "amount": 2,28 "currencyCode": "USD"29 },30 "unitType": "GALLON",31 "fuelGrade": {32 "available": true,33 "description": "Premium",34 "id": "3",35 "price": {36 "amount": 2.1,37 "currencyCode": "USD"38 }39 },40 "totalTax": {41 "amount": 1.5,42 "currencyCode": "USD"43 },44 "totalDiscount": {45 "amount": 2,46 "currencyCode": "USD"47 },48 "fuelDiscount" : {49 "fuelDiscountTotal" : {50 "amount" : 2.0,51 "currencyCode" : "USD"52 },53 "discount" : {54 "amount" : 0.10,55 "currencyCode" : "USD"56 },57 "units" : "GALLON"58 },59 "carWashInfo": {60 "siteResource": {61 "available": true,62 "description": "Premium car wash with Rainbow Soap",63 "id": "4",64 "name": "Premium",65 "itemPrice": {66 "amount": 4.95,67 "currencyCode": "USD"68 },69 "tax": {70 "amount": 0.5,71 "currencyCode": "USD"72 }73 },74 "carWashCode": "123456",75 "carWashCodeExpirationDate": "20150224"76 }77 },78 "reconciliationInfo": {79 "terminalID": "12345678",80 "retailerID": "12345678901",81 "invoiceID": "10001234"82 },83 "storeLocationID": "10001088",84 "pumpNumber" : "1"85 }86}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "SUCCESS",6 "statusDescription": "Success",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": {11 "paymentInstrument": {12 "paymentTender": {13 "accountTypeName": "CREDIT",14 "accountTypeUri": "ippi#154541-147515",15 "networkTypeName": "VISA",16 "networkTypeUri": "NTU#546525151"17 },18 "additionalData": [19 {20 "key": "NickName",21 "value": "TestCredit"22 },23 {24 "key": null,25 "value": null26 }27 ],28 "paymentInstrumentUri": "PIURI#132421",29 "paymentInstrumentId": "PIID#5648",30 "maskedCardNumber": "xxxxxxxxx5487"31 },32 "amount": {33 "amount": 44.95,34 "currencyCode": "USD"35 },36 "merchantTenderData": {37 "tenderLocalDate": "LocalDate",38 "tenderLocalTime": "LocalTime",39 "merchantTenderId": "MerchantTenderId#123"40 },41 "paydiantTenderID": "PAYDIANTTENDERID#8089890",42 "paymentStatus": "APPROVED",43 "paymentStatusCode": 200,44 "externalPaymentStatusCode": "EXTPAYSTATUS#565657",45 "externalPaymentStatusDescription": "EXTPAYSTATUSDESC#998907",46 "externalPaymentAuthCode": "EXTPAYAUTH#121232"47 },48 "paydiantTransactionRefId": " c98eca3b-e37c-4855-bf03-3db69b8ec035"49 }50}
Discounted Fuel Purchase with Discount Car Wash
This use case shows:
- Purchase total amount of $43.95.
- $3.95 car wash that was Discounted by $1.00.
- $40.00 in fuel with 20 Gallons pumped at $2.00 per gallon (10 cent per gallon roll back).
- Car Wash code expires in 5 days.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_FUEL_END",5 "paymentCharge": {6 "merchantTenderData": {7 "tenderLocalDate": "20150219",8 "tenderLocalTime": "084027",9 "merchantTenderId": "7wndyGSotSEO"10 }11 },12 "fuelReceipt": {13 "totalAmount": {14 "amount": 43.95,15 "currencyCode": "USD"16 },17 "unitsDispensed": 20,18 "fuelAmount": {19 "amount": 40,20 "currencyCode": "USD"21 },22 "fuelTax": {23 "amount": 1,24 "currencyCode": "USD"25 },26 "pricePerUnit": {27 "amount": 2,28 "currencyCode": "USD"29 },30 "unitType": "GALLON",31 "fuelGrade": {32 "available": true,33 "description": "Premium",34 "id": "3",35 "price": {36 "amount": 2.1,37 "currencyCode": "USD"38 }39 },40 "totalTax": {41 "amount": 1.5,42 "currencyCode": "USD"43 },44 "totalDiscount": {45 "amount": 3,46 "currencyCode": "USD"47 },48 "fuelDiscount": {49 "fuelDiscountTotal": {50 "amount": 2,51 "currencyCode": "USD"52 },53 "discount": {54 "amount": 0.1,55 "currencyCode": "USD"56 },57 "units": "GALLON"58 },59 "carWashInfo": {60 "siteResource": {61 "available": true,62 "description": "Premium car wash with Rainbow Soap",63 "id": "4",64 "name": "Premium",65 "itemPrice": {66 "amount": 3.95,67 "currencyCode": "USD"68 },69 "tax": {70 "amount": 0.5,71 "currencyCode": "USD"72 }73 },74 "carWashCode": "123456",75 "carWashCodeExpirationDate": "20150224",76 "siteResourceDiscount": {77 "amount": 1,78 "currencyCode": "USD"79 }80 }81 },82 "reconciliationInfo": {83 "terminalID": "12345678",84 "retailerID": "12345678901",85 "invoiceID": "10001234"86 },87 "storeLocationID": "10001088",88 "pumpNumber" : "1"89 }90}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "SUCCESS",6 "statusDescription": "Success",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": {11 "paymentInstrument": {12 "paymentTender": {13 "accountTypeName": "CREDIT",14 "accountTypeUri": "ippi#154541-147515",15 "networkTypeName": "VISA",16 "networkTypeUri": "NTU#546525151"17 },18 "additionalData": [19 {20 "key": "NickName",21 "value": "TestCredit"22 },23 {24 "key": null,25 "value": null26 }27 ],28 "paymentInstrumentUri": "PIURI#132421",29 "paymentInstrumentId": "PIID#5648",30 "maskedCardNumber": "xxxxxxxxx5487"31 },32 "amount": {33 "amount": 44.95,34 "currencyCode": "USD"35 },36 "merchantTenderData": {37 "tenderLocalDate": "LocalDate",38 "tenderLocalTime": "LocalTime",39 "merchantTenderId": "MerchantTenderId#123"40 },41 "paydiantTenderID": "PAYDIANTTENDERID#8089890",42 "paymentStatus": "APPROVED",43 "paymentStatusCode": 200,44 "externalPaymentStatusCode": "EXTPAYSTATUS#565657",45 "externalPaymentStatusDescription": "EXTPAYSTATUSDESC#998907",46 "externalPaymentAuthCode": "EXTPAYAUTH#121232"47 },48 "paydiantTransactionRefId": " c98eca3b-e37c-4855-bf03-3db69b8ec035"49 }50}
Submit Secondary ID with Matching Values
This use case shows:
- Submitting the secondary ID
- The value entered on the pump matches the value on the phone
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_SECONDARY_ID_FOR_VALIDATION",5 "secondaryIdentifier": "7890",6 "storeLocationID": "10001088",7 "pumpNumber" : "1"8 }9}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "SUCCESS",6 "statusDescription": "Success",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": null,11 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035"12 }13}
Submit Secondary ID with Non-Matching Values
This use case shows:
- Submit Secondary ID
- Values on pump and phone do not match
- The number of configured retries has not been exceeded.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_SECONDARY_ID_FOR_VALIDATION",5 "secondaryIdentifier": "7890",6 "storeLocationID": "10001088",7 "pumpNumber" : "1"8 }9}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": " INVALID_SECONDARY_ID ",6 "statusDescription": " ID entered into pump did not match ID on phone ",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": null,11 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035"12 }13}
Submit Secondary ID Non-Matching Values and Exceeded Retries
This use case shows:
- Submitting the Secondary ID
- Values on the Pump and Phone do not match
- The number of configured retries has been exceeded.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_SECONDARY_ID_FOR_VALIDATION",5 "secondaryIdentifier": "7890",6 "storeLocationID": "10001088",7 "pumpNumber" : "1"8 }9}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "CANCELED_TRANSACTION",6 "statusDescription": "Transaction has been canceled",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": null,11 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035"12 }13}
Request a Pre-Auth
This use case shows:
- Request for a pre-authorization of $75.00.
1{2 "updateFuelEventRequest" : {3 "paydiantTransactionRefId" : "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule" : "SUBMIT_PRE_AUTH",5 "paymentCharge" : {6 "paymentInstrument" : {7 "paymentInstrumentUri" : "fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360"8 },9 "amount" : {10 "amount" : 75.0,11 "currencyCode" : "USD"12 },13 "merchantTenderData" : {14 "tenderLocalDate" : "20150219",15 "tenderLocalTime" : "084027"16 }17 },18 "reconciliationInfo" : {19 "terminalID" : "12345678",20 "retailerID" : "12345678901",21 "invoiceID" : "10001234"22 },23 "storeLocationID": "10001088",24 "pumpNumber" : "1"25 }26}
1{2 "updateFuelEventResponse" : {3 "messageHeader" : null,4 "status" : {5 "statusCode" : "SUCCESS",6 "statusDescription" : "Success",7 "errors" : [ ]8 },9 "configurationDetails" : [ ],10 "paymentResult" : {11 "paymentInstrument" : {12 "paymentTender" : {13 "accountTypeName" : "CREDIT",14 "accountTypeUri" : "paydiant:payment-account-management.accounttype#Credit",15 "networkTypeName" : "VISA",16 "networkTypeUri" : "paydiant:payment-account-management.networktype#Visa "17 },18 "additionalData" : [],19 "paymentInstrumentUri" : "fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360",20 "paymentInstrumentId" : "cardaccount#17e2e62e-5835",21 "maskedCardNumber" : "xxxxxxxxx5487"22 },23 "amount" : {24 "amount" : 75.0,25 "currencyCode" : "USD"26 },27 "merchantTenderData" : {28 "tenderLocalDate" : "20150219",29 "tenderLocalTime" : "084027",30 "merchantTenderId" : "7wndyGSotSEO"31 },32 "paydiantTenderID" : "c7ypRBGRpbae",33 "paymentStatus" : "AUTH_APPROVED",34 "paymentStatusCode" : 210,35 "externalPaymentStatusCode" : "EXTPAYSTATUS#115151",36 "externalPaymentStatusDescription" : "EXTDESC",37 "externalPaymentAuthCode" : null38 },39 "paydiantTransactionRefId" : "c98eca3b-e37c-4855-bf03-3db69b8ec035"40 }41}
Cancel Transaction
This samples shows a site pump-initiated cancel, not a mobile app-initiated cancel.
1{2 "updateFuelEventRequest": {3 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035",4 "transactionFlowRule": "SUBMIT_FUEL_CANCEL",5 "storeLocationID": "10001088",6 "pumpNumber" : "1"7 }8}
1{2 "updateFuelEventResponse": {3 "messageHeader": null,4 "status": {5 "statusCode": "SUCCESS",6 "statusDescription": "Success",7 "errors": []8 },9 "configurationDetails": [],10 "paymentResult": null,11 "paydiantTransactionRefId": "c98eca3b-e37c-4855-bf03-3db69b8ec035"12 }13}
pumpAuthorization Use Cases
These samples show several cases in which the pumpAuthorization
method can be implemented, as well as sample code.
Simple Pump Authorization with Loyalty
The following JSON sample shows the pump Authorization Request used to process a transaction with the following requirements:
- A third-party loyalty option is available.
- Car wash is not available at this site.
- Offers are not available.
- The customer can select the payment instrument.
1{2 "pumpAuthorizationRequest": {3 "storeLocationID":"12345678",4 "fuelTicket":{5 "selectedPumpNumber":"1",6 "fixedAmount" : [],7 "selectedSiteResources":[ ],8 "printReceipts":true,9 "additionalData":[ ],10 "fuelDiscount":{ }11 },12 "thirdPartyLoyaltyInstrument":{13 "paymentTender":{14 "accountTypeName":"Loyalty",15 "accountTypeUri":"paydiant:payment-account-management.accounttype#Loyalty",16 "networkTypeName":"FuelRewards",17 "networkTypeUri":"paydiant:payment-account-management.networktype#retailerName"18 },1920 "additionalData":[],21 "loyaltyInstrumentUri":"fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360",22 "loyaltyInstrumentId":"cardaccount#17e2e62e-5835",23 "loyaltyId":"4552999912122223"24 },25 "paydiantTransactionRefId":"c98eca3b-e37c-4855-bf03-3db69b8ec035",26 "customerSelectedPaymentInstrument":{27 "paymentTender":{28 "accountTypeName":"CREDIT",29 "accountTypeUri":"paydiant:payment-account-management.accounttype#Credit",30 "networkTypeName":"VISA",31 "networkTypeUri":"paydiant:payment-account-management.networktype#Visa"32 },33 "additionalData":[ ],34 "paymentInstrumentUri":"fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360",35 "paymentInstrumentId":"cardaccount#17e2e62e-5835",36 "altFuelId":"455299",37 "maskedCardNumber" : "xxxxxxxxxxxx1234"38 },39 "walletIssuerId":"RetailerWallet"40 }41 }
1{2"pumpAuthorizationResponse":{3 "status":{4 "statusCode":"200",5 "statusDetails":"SUCCESS"6 },7 "paydiantTransactionRefId":"c98eca3b-e37c-4855-bf03-3db69b8ec035"8 }9}
Pump Authorization with Loyalty
This use case shows:
- Pump Authorization call
- Third Party Loyalty associated by the consumer’s mobile wallet.
1{2 "pumpAuthorizationRequest": {3 "storeLocationID":"12345678",4 "fuelTicket":{5 "selectedPumpNumber":"1",6 "fixedAmount" : [],7 "selectedSiteResources":[ ],8 "printReceipts":true,9 "additionalData":[ ],10 "fuelDiscount":{ }11 },12 "thirdPartyLoyaltyInstrument":{13 "paymentTender":{14 "accountTypeName":"Loyalty",15 "accountTypeUri":"paydiant:payment-account-management.accounttype#Loyalty",16 "networkTypeName":"FuelRewards",17 "networkTypeUri":"paydiant:payment-account-management.networktype#retailerName"18 },1920 "additionData":[],21 "loyaltyInstrumentUri":"fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360",22 "loyaltyInstrumentId":"cardaccount#17e2e62e-5835",23 "loyaltyId":"4552999912122223"24 },25 "paydiantTransactionRefId":"c98eca3b-e37c-4855-bf03-3db69b8ec035",26 "customerSelectedPaymentInstrument":{27 "paymentTender":{28 "accountTypeName":"CREDIT",29 "accountTypeUri":"paydiant:payment-account-management.accounttype#Credit",30 "networkTypeName":"VISA",31 "networkTypeUri":"paydiant:payment-account-management.networktype#Visa"32 },33 "additionalData":[ ],34 "paymentInstrumentUri":"fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360",35 "paymentInstrumentId":"cardaccount#17e2e62e-5835",36 "altFuelId":"455299",37 "maskedCardNumber" : "xxxxxxxxxxxx1234"38 },39 "walletIssuerId":"RetailerWallet"40 }41 }
1{2"pumpAuthorizationResponse":{3 "status":{4 "statusCode":"200",5 "statusDetails":"SUCCESS"6 },7 "paydiantTransactionRefId":"c98eca3b-e37c-4855-bf03-3db69b8ec035"8 }9}
Pump Authorization without Third Party Loyalty
This use case shows:
- Pump Authorization call
- There is no loyalty program associated with this transaction.
1{2 "pumpAuthorizationRequest": {3 "storeLocationID":"12345678",4 "fuelTicket":{5 "selectedPumpNumber":"1",6 "fixedAmount" : [],7 "selectedSiteResources":[ ],8 "printReceipts":true,9 "additionalData":[ ],10 "fuelDiscount":{ }11 },12 "thirdPartyLoyaltyInstrument":[],13 "paydiantTransactionRefId":"c98eca3b-e37c-4855-bf03-3db69b8ec035",14 "customerSelectedPaymentInstrument":{15 "paymentTender":{16 "accountTypeName":"CREDIT",17 "accountTypeUri":"paydiant:payment-account-management.accounttype#Credit",18 "networkTypeName":"VISA",19 "networkTypeUri":"paydiant:payment-account-management.networktype#Visa"20 },21 "additionalData":[ ],22 "paymentInstrumentUri":"fuel:accountmenagement:cardaccount#17e2e62e-5835-41c4-9667-d88068d0a360",23 "paymentInstrumentId":"cardaccount#17e2e62e-5835",24 "altFuelId":"455299",25 "maskedCardNumber" : "xxxxxxxxxxxx1234"26 },27 "walletIssuerId":"RetailerWallet"28 }29 }
1{2"pumpAuthorizationResponse":{3 "status":{4 "statusCode":"200",5 "statusDetails":"SUCCESS"6 },7 "paydiantTransactionRefId":"c98eca3b-e37c-4855-bf03-3db69b8ec035"8 }9}
retrieveSiteInformation Use Cases
These samples show several cases in which the retrieveSiteInformation
method can be implemented, as well as sample code.
Pumps Only
This sample retrieves the site information for a fuel site where:
- The pumps are defined with the minimum required information.
- There is no car wash available.
1{2"retrieveSiteInformationResponse":{3 "storeLocationID":"STLOCBO202",4 "additionalData":[],5 "fuelPumps":[6 {7 "available":true,8 "additionalData":[],9 "fuelGrades":[],10 "fuelType":[],11 "pumpNumber":"PN1"12 },13 {14 "available":true,15 "additionalData":[],16 "fuelGrades":[],17 "fuelType":[],18 "pumpNumber":"PN2"19 },20 {21 "available":true,22 "additionalData":[],23 "fuelGrades":[],24 "fuelType":"DIESEL",25 "pumpNumber":"PN3"26 },27 {28 "available":false,29 "additionalData":[],30 "fuelGrades":[],31 "fuelType":"DIESEL",32 "pumpNumber":"PN4"33 }34 ],35 "latitude":"6.846664",36 "longitude":"79.863775",37 "siteResources":[],38 "status":{39 "statusCode":"200",40 "statusDetails":"SUCCESS"41 }42 }43}
Pumps and Car Wash
This sample shows a fuel site where:
- The pumps are defined with only the required information.
- A car wash is available.
1{2"retrieveSiteInformationResponse":{3 "storeLocationID":"STLOCBO202",4 "additionalData":[],5 "fuelPumps":[6 {7 "available":true,8 "additionalData":[],9 "fuelGrades":[],10 "fuelType":[],11 "pumpNumber":"PN1"12 },13 {14 "available":true,15 "additionalData":[],16 "fuelGrades":[],17 "fuelType":[],18 "pumpNumber":"PN2"19 },20 {21 "available":true,22 "additionalData":[],23 "fuelGrades":[],24 "fuelType":"DIESEL",25 "pumpNumber":"PN3"26 },27 {28 "available":false,29 "additionalData":[],30 "fuelGrades":[],31 "fuelType":[],32 "pumpNumber":"PN4"33 }34 ],35 "latitude":"6.846664",36 "longitude":"79.863775",37 "siteResources":[]38 "siteResources":[39 {40 "available":true,41 "description":"Carwash Normal",42 "additionalData":[43 {44 "key":"SAMPLE_KEY_ONE",45 "value":"sample value"46 },47 {48 "key":"SAMPLE_KEY_TWO",49 "value":"sample value"50 }51 ],52 "id":"CW1",53 "name":"Carwash Normal",54 "itemPrice":{55 "amount":10.0,56 "currencyCode":"USD"57 },58 "tax":{59 "amount":0.0,60 "currencyCode":"USD"61 }62 },63 {64 "available":true,65 "description":"Carwash Super",66 "additionalData":[67 {68 "key":"SAMPLE_KEY_ONE",69 "value":"sample value"70 },71 {72 "key":"SAMPLE_KEY_TWO",73 "value":"sample value"74 }75 ],76 "id":"CW2",77 "name":"Carwash Super",78 "itemPrice":{79 "amount":15.0,80 "currencyCode":"USD"81 },82 "tax":{83 "amount":0.0,84 "currencyCode":"USD"85 }86 },87 {88 "available":false,89 "description":"Carwash Heavy Vehicle",90 "additionalData":[91 {92 "key":"SAMPLE_KEY_ONE",93 "value":"sample value"94 },95 {96 "key":"SAMPLE_KEY_TWO",97 "value":"sample value"98 }99 ],100 "id":"CW3",101 "name":"Carwash Heavy Vehicle",102 "itemPrice":{103 "amount":20.0,104 "currencyCode":"USD"105 },106 "tax":{107 "amount":0.0,108 "currencyCode":"USD"109 }110 },111 {112 "available":true,113 "description":"Carwash Deluxe",114 "additionalData":[115 {116 "key":"SAMPLE_KEY_ONE",117 "value":"sample value"118 },119 {120 "key":"SAMPLE_KEY_TWO",121 "value":"sample value"122 }123 ],124 "id":"CW4",125 "name":"Carwash Deluxe",126 "itemPrice":{127 "amount":20.0,128 "currencyCode":"USD"129 },130 "tax":{131 "amount":0.0,132 "currencyCode":"USD"133 }134 }135 ],136 "status":{137 "statusCode":"200",138 "statusDetails":"SUCCESS"139 }140 }141}
Pumps, Car Wash, and Fuel Info
The following sample retrieves the site information for a fuel site where:
- The full details are defined for the pumps
- A car wash is available.
1{2"retrieveSiteInformationResponse":{3 "storeLocationID":"STLOCBO202",4 "additionalData":[5 {6 "key":"SAMPLE_KEY_ONE",7 "value":"sample value"8 },9 {10 "key":"SAMPLE_KEY_TWO",11 "value":"sample value"12 }13 ],14 "fuelPumps":[15 {16 "available":true,17 "additionalData":[18 {19 "key":"SAMPLE_KEY_ONE",20 "value":"sample value"21 },22 {23 "key":"SAMPLE_KEY_TWO",24 "value":"sample value"25 }26 ],27 "fuelGrades":[28 {29 "available":true,30 "description":"PAYLD1",31 "id":"FG1",32 "price":{33 "amount":1.11,34 "currencyCode":"USD"35 }36 },37 {38 "available":true,39 "description":"PAYLD2",40 "id":"FG2",41 "price":{42 "amount":2.11,43 "currencyCode":"USD"44 }45 },46 {47 "available":false,48 "description":"PAYLD3",49 "id":"FG3",50 "price":{51 "amount":3.11,52 "currencyCode":"USD"53 }54 },55 {56 "available":true,57 "description":"PAYLD4",58 "id":"FG4",59 "price":{60 "amount":4.11,61 "currencyCode":"USD"62 }63 }64 ],65 "fuelType":"PETROL",66 "pumpNumber":"PN1"67 },68 {69 "available":true,70 "additionalData":[71 {72 "key":"SAMPLE_KEY_ONE",73 "value":"sample value"74 },75 {76 "key":"SAMPLE_KEY_TWO",77 "value":"sample value"78 }79 ],80 "fuelGrades":[81 {82 "available":true,83 "description":"PAYLD1",84 "id":"FG1",85 "price":{86 "amount":1.11,87 "currencyCode":"USD"88 }89 },90 {91 "available":true,92 "description":"PAYLD2",93 "id":"FG2",94 "price":{95 "amount":2.11,96 "currencyCode":"USD"97 }98 },99 {100 "available":false,101 "description":"PAYLD3",102 "id":"FG3",103 "price":{104 "amount":3.11,105 "currencyCode":"USD"106 }107 },108 {109 "available":true,110 "description":"PAYLD4",111 "id":"FG4",112 "price":{113 "amount":4.11,114 "currencyCode":"USD"115 }116 }117 ],118 "fuelType":"PETROL",119 "pumpNumber":"PN2"120 },121 {122 "available":true,123 "additionalData":[124 {125 "key":"SAMPLE_KEY_ONE",126 "value":"sample value"127 },128 {129 "key":"SAMPLE_KEY_TWO",130 "value":"sample value"131 }132 ],133 "fuelGrades":[134 {135 "available":true,136 "description":"PAYLD1",137 "id":"FG1",138 "price":{139 "amount":1.11,140 "currencyCode":"USD"141 }142 },143 {144 "available":true,145 "description":"PAYLD2",146 "id":"FG2",147 "price":{148 "amount":2.11,149 "currencyCode":"USD"150 }151 },152 {153 "available":false,154 "description":"PAYLD3",155 "id":"FG3",156 "price":{157 "amount":3.11,158 "currencyCode":"USD"159 }160 },161 {162 "available":true,163 "description":"PAYLD4",164 "id":"FG4",165 "price":{166 "amount":4.11,167 "currencyCode":"USD"168 }169 }170 ],171 "fuelType":"DIESEL",172 "pumpNumber":"PN3"173 },174 {175 "available":false,176 "additionalData":[177 {178 "key":"SAMPLE_KEY_ONE",179 "value":"sample value"180 },181 {182 "key":"SAMPLE_KEY_TWO",183 "value":"sample value"184 }185 ],186 "fuelGrades":[187 {188 "available":true,189 "description":"PAYLD1",190 "id":"FG1",191 "price":{192 "amount":1.11,193 "currencyCode":"USD"194 }195 },196 {197 "available":true,198 "description":"PAYLD2",199 "id":"FG2",200 "price":{201 "amount":2.11,202 "currencyCode":"USD"203 }204 },205 {206 "available":false,207 "description":"PAYLD3",208 "id":"FG3",209 "price":{210 "amount":3.11,211 "currencyCode":"USD"212 }213 },214 {215 "available":true,216 "description":"PAYLD4",217 "id":"FG4",218 "price":{219 "amount":4.11,220 "currencyCode":"USD"221 }222 }223 ],224 "fuelType":"DIESEL",225 "pumpNumber":"PN4"226 }227 ],228 "latitude":"6.846664",229 "longitude":"79.863775",230 "siteResources":[231 {232 "available":true,233 "description":"Carwash Normal",234 "additionalData":[235 {236 "key":"SAMPLE_KEY_ONE",237 "value":"sample value"238 },239 {240 "key":"SAMPLE_KEY_TWO",241 "value":"sample value"242 }243 ],244 "id":"CW1",245 "name":"Carwash Normal",246 "itemPrice":{247 "amount":10.0,248 "currencyCode":"USD"249 },250 "tax":{251 "amount":0.0,252 "currencyCode":"USD"253 }254 },255 {256 "available":true,257 "description":"Carwash Super",258 "additionalData":[259 {260 "key":"SAMPLE_KEY_ONE",261 "value":"sample value"262 },263 {264 "key":"SAMPLE_KEY_TWO",265 "value":"sample value"266 }267 ],268 "id":"CW2",269 "name":"Carwash Super",270 "itemPrice":{271 "amount":15.0,272 "currencyCode":"USD"273 },274 "tax":{275 "amount":0.0,276 "currencyCode":"USD"277 }278 },279 {280 "available":false,281 "description":"Carwash Heavy Vehicle",282 "additionalData":[283 {284 "key":"SAMPLE_KEY_ONE",285 "value":"sample value"286 },287 {288 "key":"SAMPLE_KEY_TWO",289 "value":"sample value"290 }291 ],292 "id":"CW3",293 "name":"Carwash Heavy Vehicle",294 "itemPrice":{295 "amount":20.0,296 "currencyCode":"USD"297 },298 "tax":{299 "amount":0.0,300 "currencyCode":"USD"301 }302 },303 {304 "available":true,305 "description":"Carwash Deluxe",306 "additionalData":[307 {308 "key":"SAMPLE_KEY_ONE",309 "value":"sample value"310 },311 {312 "key":"SAMPLE_KEY_TWO",313 "value":"sample value"314 }315 ],316 "id":"CW4",317 "name":"Carwash Deluxe",318 "itemPrice":{319 "amount":20.0,320 "currencyCode":"USD"321 },322 "tax":{323 "amount":0.0,324 "currencyCode":"USD"325 }326 }327 ],328 "status":{329 "statusCode":"200",330 "statusDetails":"SUCCESS"331 }332 }333}