On This Page
Sale with Lodging Details
Use this information to process a sale transaction with lodging details in Local mode.
This transaction includes required lodging details as part of the sale transaction.
Endpoints
The endpoint is the same for the test and production environments.
Test:
wss://{terminal IP address:port number}/
Production:
wss://{terminal IP address:port number}/
Required Fields for a Sale with Lodging Details
- type
- Set the value toPaymentRequest.
- merchantReferenceCode
- Set the value to a unique, user-defined reference code. The code can consist of up to 50 alphanumeric characters, underscores (_), and dashes (-). Avoid using formatting that resembles a telephone number (XXX-XXX-XXXX) or a Social Security number (XXX-XX-XXXX).
- amountDetails.amount
- Set the value to the transaction amount.
- amountDetails.currency
- Set the value to the currency code.
Optional Fields for a Sale with Lodging Details
Use one or more of the optional fields to include additional details in the
transaction.
- lodgingDetails.duration
- Set this field to the number of nights of the lodging stay.
- lodgingDetails.checkInDate
- Set this field to the check-in date in MMDDYY format.
- lodgingDetails.checkOutDate
- Set this field to the check-out date in MMDDYY format.
- lodgingDetails.guestSmokingPreference
- Set this field to Y or N to indicate the guest's smoking preference.
- lodgingDetails.numberOfGuests
- Set this field to the number of guests.
- lodgingDetails.numberOfRoomsBooked
- Set this field to the number of rooms booked.
- lodgingDetails.guestName
- Set this field to the name of the guest.
- lodgingDetails.roomLocation
- Set this field to the room location description.
- lodgingDetails.roomTaxElements
- Set this field to the applicable room tax elements.
- lodgingDetails.roomBedType
- Set this field to the type of bed in the room.
- lodgingDetails.roomRateType
- Set this field to the room rate type.
- lodgingDetails.specialProgramCode
- Set this field to the special program code.
- lodgingDetails.dailyRoomRate1
- Set this field to the daily room rate for the first rate tier.
- lodgingDetails.dailyRoomRate2
- Set this field to the daily room rate for the second rate tier.
- lodgingDetails.dailyRoomRate3
- Set this field to the daily room rate for the third rate tier.
- lodgingDetails.roomNights1
- Set this field to the number of nights at the first rate tier.
- lodgingDetails.roomNights2
- Set this field to the number of nights at the second rate tier.
- lodgingDetails.roomNights3
- Set this field to the number of nights at the third rate tier.
- lodgingDetails.corporateClientCode
- Set this field to the corporate client code.
- lodgingDetails.promotionalCode
- Set this field to the promotional code.
- lodgingDetails.additionalCoupon
- Set this field to an additional coupon code.
- lodgingDetails.travelAgencyCode
- Set this field to the travel agency code.
- lodgingDetails.travelAgencyName
- Set this field to the name of the travel agency.
- lodgingDetails.customerServicePhoneNumber
- Set this field to the customer service phone number.
- lodgingDetails.tax
- Set this field to the total tax amount.
- lodgingDetails.prepaidCost
- Set this field to the prepaid cost amount.
- lodgingDetails.foodAndBeverageCost
- Set this field to the food and beverage cost.
- lodgingDetails.roomTax
- Set this field to the room tax amount.
- lodgingDetails.adjustmentAmount
- Set this field to the adjustment amount.
- lodgingDetails.phoneCost
- Set this field to the phone cost.
- lodgingDetails.restaurantCost
- Set this field to the restaurant cost.
- lodgingDetails.roomServiceCost
- Set this field to the room service cost.
- lodgingDetails.miniBarCost
- Set this field to the mini bar cost.
- lodgingDetails.laundryCost
- Set this field to the laundry cost.
- lodgingDetails.miscellaneousCost
- Set this field to the miscellaneous cost.
- lodgingDetails.giftShopCost
- Set this field to the gift shop cost.
- lodgingDetails.movieCost
- Set this field to the movie cost.
- lodgingDetails.healthClubCost
- Set this field to the health club cost.
- lodgingDetails.valetParkingCost
- Set this field to the valet parking cost.
- lodgingDetails.cashDisbursementCost
- Set this field to the cash disbursement cost.
- lodgingDetails.nonRoomCost
- Set this field to the non-room cost.
- lodgingDetails.businessCenterCost
- Set this field to the business center cost.
- lodgingDetails.loungeBarCost
- Set this field to the lounge or bar cost.
- lodgingDetails.transportationCost
- Set this field to the transportation cost.
- lodgingDetails.gratuityCost
- Set this field to the gratuity cost.
- lodgingDetails.conferenceRoomCost
- Set this field to the conference room cost.
- lodgingDetails.audioVisualCost
- Set this field to the audio/visual equipment cost.
- lodgingDetails.banquetCost
- Set this field to the banquet cost.
- lodgingDetails.internetAccessCost
- Set this field to the internet access cost.
- lodgingDetails.earlyCheckOutCost
- Set this field to the early check-out cost.
- lodgingDetails.nonRoomTax
- Set this field to the non-room tax amount.
REST Example: Sale with Lodging Details
Request
{ "type": "PaymentRequest", "merchantReferenceCode": "058ed6c3430e436dab91b782f4113fd2", "amountDetails": { "amount": "500.00", "currency": "USD" }, "lodgingDetails": { "duration": 3, "checkInDate": "030125", "checkOutDate": "030425", "guestSmokingPreference": "N", "numberOfGuests": 2, "numberOfRoomsBooked": 1, "guestName": "John Doe", "roomLocation": "Ocean View", "roomTaxElements": "VAT", "roomBedType": "KING", "roomRateType": "CORPORATE", "specialProgramCode": "1", "dailyRoomRate1": "150.00", "dailyRoomRate2": "160.00", "dailyRoomRate3": "170.00", "roomNights1": 1, "roomNights2": 1, "roomNights3": 1, "corporateClientCode": "CORP123456", "promotionalCode": "PROMO2025", "additionalCoupon": "DISCOUNT10", "travelAgencyCode": "TA789", "travelAgencyName": "Premium Travel Agency", "customerServicePhoneNumber": "1-800-555-0199", "tax": "45.00", "prepaidCost": "200.00", "foodAndBeverageCost": "125.00", "roomTax": "30.00", "adjustmentAmount": "15.00", "phoneCost": "8.00", "restaurantCost": "95.00", "roomServiceCost": "40.00", "miniBarCost": "25.00", "laundryCost": "18.00", "miscellaneousCost": "12.00", "giftShopCost": "35.00", "movieCost": "10.00", "healthClubCost": "20.00", "valetParkingCost": "30.00", "cashDisbursementCost": "5.00", "nonRoomCost": "40.00", "businessCenterCost": "15.00", "loungeBarCost": "55.00", "transportationCost": "75.00", "gratuityCost": "45.00", "conferenceRoomCost": "120.00", "audioVisualCost": "65.00", "banquetCost": "180.00", "internetAccessCost": "12.00", "earlyCheckOutCost": "20.00", "nonRoomTax": "25.00" } }
Mid-Transaction Status Updates
During the transaction, you might receive one or more update responses indicating the
current status of the transaction. You can choose to display these updates on your
point-of-sale (POS) system.
{ "type": "TransactionStatusResponse", "message": "Status update to display.", "canBeAborted": true/false }
Response to a Successful Request
{ "type": "PaymentResponse", "message": "Payment approved", "transactionDetails": { "id": "8ccb150a88bd4c6f9a00a687f39ca97d", "merchantReferenceCode": "058ed6c3430e436dab91b782f4113fd2", "submitTimeUtc": "2024-09-20T08:15:12+0000", "captured": true, "amountDetails": { "amount": "500.00", "currency": "USD", "capturedAmount": "500.00", "refundableAmount": "500.00" } }, "processingDetails": { "status": "APPROVED", "verificationMethod": "NONE", "entryMode": "NFC_ICC", "card": { "expirationMonth": "12", "expirationYear": "2025", "type": "VISA", "maskedPan": "476173XXXXXX0119", "countryCode": "840" } }, "additionalInformation": { "requestId": "7268201146336069504011" }, "linkedOperations": [], "receipts": { "merchantReceipt": { "preformattedReceipt": "Merchant Receipt\nTest\nSample Street 123\n34351 New York\nUnited States\n12345678\n\nPayment\nUSD$500.00\n\nPlease retain receipt!\n\nCard: Payworks VISA\nAccount: **** **** **** 0119\nEntry Mode: Contactless\nAID: A0000000031010\nVerification: No Verification\n\nTransaction: 546712\nAuthorization: 831000\nMerchant ID: ************st051\nTerminal ID: ****7069\n\n\n8ccb150a88bd4c6f9a00a687f39ca97d\n\n4:15:12 AM: 9/20/2024\n\n\n", "receiptData": { "signatureLineRequired": false, "lines": { "MERCHANT_DETAILS_PUBLIC_NAME": { "label": "Name", "value": "Test" }, "MERCHANT_DETAILS_ADDRESS": { "label": "Address", "value": "Sample Street 123" }, "MERCHANT_DETAILS_ZIP": { "label": "Zip", "value": "34351" }, "MERCHANT_DETAILS_CITY": { "label": "City", "value": "New York" }, "MERCHANT_DETAILS_COUNTRY": { "label": "Country", "value": "United States" }, "MERCHANT_DETAILS_CONTACT": { "label": "Contact", "value": "12345678" }, "MERCHANT_DETAILS_ADDITIONAL_INFORMATION": { "label": "Additional Information", "value": "" }, "PAYMENT_DETAILS_SCHEME_OR_LABEL": { "label": "Card", "value": "Payworks VISA" }, "PAYMENT_DETAILS_MASKED_ACCOUNT": { "label": "Account", "value": "**** **** **** 0119" }, "PAYMENT_DETAILS_EMV_APPLICATION_ID": { "label": "AID", "value": "A0000000031010" }, "PAYMENT_DETAILS_SOURCE": { "label": "Entry Mode", "value": "Contactless" }, "PAYMENT_DETAILS_CUSTOMER_VERIFICATION": { "label": "Verification", "value": "No Verification" }, "CLEARING_DETAILS_TRANSACTION_IDENTIFIER": { "label": "Transaction", "value": "546712" }, "CLEARING_DETAILS_AUTHORIZATION_CODE": { "label": "Authorization", "value": "831000" }, "CLEARING_DETAILS_MERCHANT_IDENTIFIER": { "label": "Merchant ID", "value": "************st051" }, "CLEARING_DETAILS_TERMINAL_ID": { "label": "Terminal ID", "value": "****7069" }, "RECEIPT_TYPE": { "label": "Receipt Type", "value": "Merchant Receipt" }, "TRANSACTION_TYPE": { "label": "Type", "value": "Payment" }, "SUBJECT": { "label": "Description", "value": "" }, "IDENTIFIER": { "label": "PWID", "value": "8ccb150a88bd4c6f9a00a687f39ca97d" }, "AMOUNT_AND_CURRENCY": { "label": "Amount", "value": "USD$500.00" }, "DATE": { "label": "Date", "value": "9/20/2024" }, "TIME": { "label": "Time", "value": "4:15:12 AM" }, "STATUS_TEXT": { "label": "Information", "value": "Please retain receipt!" } }, "tipLineRequired": false, "totalLineRequired": false } }, "customerReceipt": { "preformattedReceipt": "Cardholder Receipt\nTest\nSample Street 123\n34351 New York\nUnited States\n12345678\n\nPayment\nUSD$500.00\n\nPlease retain receipt!\n\nCard: Payworks VISA\nAccount: **** **** **** 0119\nEntry Mode: Contactless\nAID: A0000000031010\nVerification: No Verification\n\nTransaction: 546712\nAuthorization: 831000\nMerchant ID: ************st051\nTerminal ID: ****7069\n\n\n8ccb150a88bd4c6f9a00a687f39ca97d\n\n4:15:12 AM: 9/20/2024\n\n\n", "receiptData": { "signatureLineRequired": false, "lines": { "MERCHANT_DETAILS_PUBLIC_NAME": { "label": "Name", "value": "Test" }, "MERCHANT_DETAILS_ADDRESS": { "label": "Address", "value": "Sample Street 123" }, "MERCHANT_DETAILS_ZIP": { "label": "Zip", "value": "34351" }, "MERCHANT_DETAILS_CITY": { "label": "City", "value": "New York" }, "MERCHANT_DETAILS_COUNTRY": { "label": "Country", "value": "United States" }, "MERCHANT_DETAILS_CONTACT": { "label": "Contact", "value": "12345678" }, "MERCHANT_DETAILS_ADDITIONAL_INFORMATION": { "label": "Additional Information", "value": "" }, "PAYMENT_DETAILS_SCHEME_OR_LABEL": { "label": "Card", "value": "Payworks VISA" }, "PAYMENT_DETAILS_MASKED_ACCOUNT": { "label": "Account", "value": "**** **** **** 0119" }, "PAYMENT_DETAILS_EMV_APPLICATION_ID": { "label": "AID", "value": "A0000000031010" }, "PAYMENT_DETAILS_SOURCE": { "label": "Entry Mode", "value": "Contactless" }, "PAYMENT_DETAILS_CUSTOMER_VERIFICATION": { "label": "Verification", "value": "No Verification" }, "CLEARING_DETAILS_TRANSACTION_IDENTIFIER": { "label": "Transaction", "value": "546712" }, "CLEARING_DETAILS_AUTHORIZATION_CODE": { "label": "Authorization", "value": "831000" }, "CLEARING_DETAILS_MERCHANT_IDENTIFIER": { "label": "Merchant ID", "value": "************st051" }, "CLEARING_DETAILS_TERMINAL_ID": { "label": "Terminal ID", "value": "****7069" }, "RECEIPT_TYPE": { "label": "Receipt Type", "value": "Cardholder Receipt" }, "TRANSACTION_TYPE": { "label": "Type", "value": "Payment" }, "SUBJECT": { "label": "Description", "value": "" }, "IDENTIFIER": { "label": "PWID", "value": "8ccb150a88bd4c6f9a00a687f39ca97d" }, "AMOUNT_AND_CURRENCY": { "label": "Amount", "value": "USD$500.00" }, "DATE": { "label": "Date", "value": "9/20/2024" }, "TIME": { "label": "Time", "value": "4:15:12 AM" }, "STATUS_TEXT": { "label": "Information", "value": "Please retain receipt!" } }, "tipLineRequired": false, "totalLineRequired": false } } }, "lodgingDetails": { "duration": 3, "checkInDate": "030125", "checkOutDate": "030425", "guestSmokingPreference": "N", "numberOfGuests": 2, "numberOfRoomsBooked": 1, "guestName": "John Doe", "roomLocation": "Ocean View", "roomTaxElements": "VAT", "roomBedType": "KING", "roomRateType": "CORPORATE", "specialProgramCode": "1", "dailyRoomRate1": "150.00", "dailyRoomRate2": "160.00", "dailyRoomRate3": "170.00", "roomNights1": 1, "roomNights2": 1, "roomNights3": 1, "corporateClientCode": "CORP123456", "promotionalCode": "PROMO2025", "additionalCoupon": "DISCOUNT10", "travelAgencyCode": "TA789", "travelAgencyName": "Premium Travel Agency", "customerServicePhoneNumber": "1-800-555-0199", "tax": "45.00", "prepaidCost": "200.00", "foodAndBeverageCost": "125.00", "roomTax": "30.00", "adjustmentAmount": "15.00", "phoneCost": "8.00", "restaurantCost": "95.00", "roomServiceCost": "40.00", "miniBarCost": "25.00", "laundryCost": "18.00", "miscellaneousCost": "12.00", "giftShopCost": "35.00", "movieCost": "10.00", "healthClubCost": "20.00", "valetParkingCost": "30.00", "cashDisbursementCost": "5.00", "nonRoomCost": "40.00", "businessCenterCost": "15.00", "loungeBarCost": "55.00", "transportationCost": "75.00", "gratuityCost": "45.00", "conferenceRoomCost": "120.00", "audioVisualCost": "65.00", "banquetCost": "180.00", "internetAccessCost": "12.00", "earlyCheckOutCost": "20.00", "nonRoomTax": "25.00" } }
Response to an Unsuccessful Request
When the request is unsuccessful, you receive an error response with details.
{ "type": "ErrorResponse", "message": "Error message to display.", "developerDescription": "Detailed description of error." }