Sale with Lodging Details {#ttp-sis-pymnt-svcs-cloud-sale-lodging-intro}
========================================================================

Use this information to process a sale transaction with lodging details in Cloud mode. This transaction includes required lodging details as part of the sale transaction.

Endpoints
---------

**Test:** `POST https://terminalstest.visaacceptance.com/v1/cloud/transactions`  
**Production:** `POST https://terminals.visaacceptance.com/v1/cloud/transactions`

Required Fields for a Sale with Lodging Details {#ttp-sis-pymnt-svcs-cloud-sale-lodging-reqfields}
==================================================================================================

serialNumber
:
Set this field to the serial number of the terminal.

request.type
:
Set this field to `PaymentRequest`.

request.merchantReferenceCode
:
Set this field 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).

request.amountDetails.amount
:
Set this field to the transaction amount.

request.amountDetails.currency
:
Set this field to the currency code.

Optional Fields for a Sale with Lodging Details {#ttp-sis-pymnt-svcs-cloud-sale-lodging-optfields}
==================================================================================================

Use one or more of the optional fields to include additional details in the transaction.

request.lodgingDetails.duration
:
Set this field to the number of nights of the lodging stay.

request.lodgingDetails.checkInDate
:
Set this field to the check-in date in MMDDYY format.

request.lodgingDetails.checkOutDate
:
Set this field to the check-out date in MMDDYY format.

request.lodgingDetails.guestSmokingPreference
:
Set this field to `Y` or `N` to indicate the guest's smoking preference.

request.lodgingDetails.numberOfGuests
:
Set this field to the number of guests.

request.lodgingDetails.numberOfRoomsBooked
:
Set this field to the number of rooms booked.

request.lodgingDetails.guestName
:
Set this field to the name of the guest.

request.lodgingDetails.roomLocation
:
Set this field to the room location description.

request.lodgingDetails.roomTaxElements
:
Set this field to the applicable room tax elements.

request.lodgingDetails.roomBedType
:
Set this field to the type of bed in the room.

request.lodgingDetails.roomRateType
:
Set this field to the room rate type.

request.lodgingDetails.specialProgramCode
:
Set this field to the special program code.

request.lodgingDetails.dailyRoomRate1
:
Set this field to the daily room rate for the first rate tier.

request.lodgingDetails.dailyRoomRate2
:
Set this field to the daily room rate for the second rate tier.

request.lodgingDetails.dailyRoomRate3
:
Set this field to the daily room rate for the third rate tier.

request.lodgingDetails.roomNights1
:
Set this field to the number of nights at the first rate tier.

request.lodgingDetails.roomNights2
:
Set this field to the number of nights at the second rate tier.

request.lodgingDetails.roomNights3
:
Set this field to the number of nights at the third rate tier.

request.lodgingDetails.corporateClientCode
:
Set this field to the corporate client code.

request.lodgingDetails.promotionalCode
:
Set this field to the promotional code.

request.lodgingDetails.additionalCoupon
:
Set this field to an additional coupon code.

request.lodgingDetails.travelAgencyCode
:
Set this field to the travel agency code.

request.lodgingDetails.travelAgencyName
:
Set this field to the name of the travel agency.

request.lodgingDetails.customerServicePhoneNumber
:
Set this field to the customer service phone number.

request.lodgingDetails.tax
:
Set this field to the total tax amount.

request.lodgingDetails.prepaidCost
:
Set this field to the prepaid cost amount.

request.lodgingDetails.foodAndBeverageCost
:
Set this field to the food and beverage cost.

request.lodgingDetails.roomTax
:
Set this field to the room tax amount.

request.lodgingDetails.adjustmentAmount
:
Set this field to the adjustment amount.

request.lodgingDetails.phoneCost
:
Set this field to the phone cost.

request.lodgingDetails.restaurantCost
:
Set this field to the restaurant cost.

request.lodgingDetails.roomServiceCost
:
Set this field to the room service cost.

request.lodgingDetails.miniBarCost
:
Set this field to the mini bar cost.

request.lodgingDetails.laundryCost
:
Set this field to the laundry cost.

request.lodgingDetails.miscellaneousCost
:
Set this field to the miscellaneous cost.

request.lodgingDetails.giftShopCost
:
Set this field to the gift shop cost.

request.lodgingDetails.movieCost
:
Set this field to the movie cost.

request.lodgingDetails.healthClubCost
:
Set this field to the health club cost.

request.lodgingDetails.valetParkingCost
:
Set this field to the valet parking cost.

request.lodgingDetails.cashDisbursementCost
:
Set this field to the cash disbursement cost.

request.lodgingDetails.nonRoomCost
:
Set this field to the non-room cost.

request.lodgingDetails.businessCenterCost
:
Set this field to the business center cost.

request.lodgingDetails.loungeBarCost
:
Set this field to the lounge or bar cost.

request.lodgingDetails.transportationCost
:
Set this field to the transportation cost.

request.lodgingDetails.gratuityCost
:
Set this field to the gratuity cost.

request.lodgingDetails.conferenceRoomCost
:
Set this field to the conference room cost.

request.lodgingDetails.audioVisualCost
:
Set this field to the audio/visual equipment cost.

request.lodgingDetails.banquetCost
:
Set this field to the banquet cost.

request.lodgingDetails.internetAccessCost
:
Set this field to the internet access cost.

request.lodgingDetails.earlyCheckOutCost
:
Set this field to the early check-out cost.

request.lodgingDetails.nonRoomTax
:
Set this field to the non-room tax amount.

REST Example: Sale with Lodging Details {#ttp-sis-pymnt-svcs-cloud-sale-lodging-ex-rest}
========================================================================================

Request

```
{
    "serialNumber": "1850000000",
    "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"
        }
    }
}
```

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."
}
```

