Sending lodging data with the iframe

Background
Before starting this tutorial, make sure you understand the following topics from the Quick start section:

Merchants in the lodging industry can pass certain parameters.

Only card-based requests are allowed, but you can use both the ecommerce or retail flows for terminal or remote.

The entire lodging object is optional. However, the following are all the supported parameters:

  • Advanced Deposit (lodging.advanceDeposit)
  • Check-in Date (lodging.checkInDate)
  • Check-out Date (lodging.checkOutDate)
  • No Show (lodging.noShow)
  • Room Number (lodging.roomNumber)
  • Room Rate (lodging.roomRate)
  • Folio Number (customer.orderNumber)
  1. Prepare the Iframe

    Follow steps 1-2 of the Creating a card checkout page with the iframe tutorial.

  2. Request a One-time-use Token

    Request an e-commerce one-time-use token.

    Include the lodging object and the folio number in the body of your request.

    📘

    Note

    Folio number must be sent in the customer object, labeled orderNumber.

    curl -X POST https://api.nexiopaysandbox.com/pay/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "data": {
        "amount": 29.99,
        "currency": "USD",
        "lodging": {
          "advanceDeposit": true,
          "checkInDate": "2018-12-31",
          "checkOutDate": "2019-01-05", 
          "roomNumber": 14, 
          "roomRate": 143.99
        },
        "customer": {
          "orderNumber": 4566
        }
      }
    }'
    

  3. Load the Iframe

    Follow steps 4-6 of the Creating a card checkout page with the iframe tutorial.