Booking Web Widget Call

BOKING WEB WIDGET CALL The login Api is to get token to load the trips web boking widget in the browser app within the app using InAppbrower or Webview plugin based on framework used to develop the mobile app, see sample request model and response.

Parameters used to call the web widget is from the response when call for token via the gettoken api.

Note: Enable JavaScript when loading the boing web in the app web view

Trips booking web widget url : http://tripswebwidgetv3test.avitechng.com?/{MerchantCode}/{MerchantHash}&CustomerName={CustomerNam e}&CustomeId={CustomerId}

SAMPLE SNIPPET CODE FOR LOAD THE WEB WIDGET WITHIN APP BROSWER See sample code in the appendix section

BOOKING WEB WIDGET RESPONSE PUSH TO MOBILE APP The booking web is responsible for searching ticket booking, ticket rules, and ticket price confirmation. Ticket price confirmation lock the price for specific time limit for actual ticket booking.

The booking web pass response to merchant mobile app if ticket price confirmation is successful for the mobile to complete the ticket booking request after debiting customer account.

Implementation of Hash Key to Enhance API Security This is to prevent unauthorized access to the backend services, either by a third party or a hacker while vending airline ticket on our platform.

The response from the successful confirm ticket price API, will have a property called "Hash", and this will be a hashed value of the merchantkey, confirmationcode and the ticket fare.

To effectively process this on your backend, kindly combine these elements in the following format: {MerchantKey}_{ConfirmationCode}_{NewPriceWhole}.

Once combined, proceed to hash this concatenated string using the SHA-512 algorithm. The resulting hash should then be converted into a hexadecimal string. By comparing this calculated hash with the hash value provided in the "Hash" property of the response, you can ensure integrity and authenticity of the data.

It's worth noting that your merchant key, a confidential piece of information, remains known solely to you. Consequently, you hold the sole authority to validate this information accurately.

The sample response below is the passenger booking detail from booking web. The passenger detail object will be used for the ticket booking API.

Sample Success Response from booking web widget (One-way booking)

{
    "TripsType": "domestic",
    "TripsMode": "flight",
    "Hash": 
"9a40132daffc0c135a233ffb5447c870532423a6973328388aa7146562b75db1efdd9dbb30a52f87d3dc4723f61231d1a07148e26293b03f32b4ac558141", 
"PassengerDetails": {
        "SelectedFlights": [
            {
                "ReferenceNumber": null,
                "RecommendationID": 4,
                "CombinationID": 1,
                "GdsId": 98,
                "AgentId": 153,
                "FlightRouteIndex": 0
            }
        ],
        "SessionId": "c19ecc72f87646b3b2973dc6284dbd1f",
        "AmountPaid": null,
        "BillingAddress": {
            "ContactName": "Chinyere Amah",
            "ContactEmail": "[email protected]",
            "ContactMobileNo": "+2348098988789",
            "AddressLine1": "",
            "AddressLine2": null,
            "City": "",
            "CountryCode": "NG"
        },
        "PaymentType": null,
        "TicketType": null,
        "AirTravellers": [
            {
                "PassengerTypeCode": "ADT",
                "NamePrefix": "Miss",
                "FirstName": "Chinyere",
                "MiddleName": null,
                "Gender": 1,
                "LastName": "Amah",
                "Email": "",
                "Telephone": null,
                "NumberOfBaggages": 0,
                "NumberOfBaggages1": 0,
                "HandLuggages": 0,
                "HandLuggages1": 0,
                "AmountPaid": null,
                "FrequentFlyerNumber": "",
                "FrequentFlyerAirline": "",
                "BirthDate": "1992-03-06T00:00:00+00:00",
                "Address": {
                    "ContactName": "Chinyere",
                    "ContactEmail": "",
                    "ContactMobileNo": null,
                    "AddressLine1": "",
                    "AddressLine2": null,
                    "City": "",
                    "CountryCode": "NG"
                },
                "Documents": [
                    {
                        "DocType": "DOCS",
                        "InnerDocType": "Passport",
                        "DocID": "344543222",
                        "IssueCountryCode": "KE",
                        "IssueLocation": "KE",
                        "BirthCountryCode": "NG",
                        "EffectiveDate": "2021-04-03T00:00:00",
                        "ExpiryDate": "2027-04-03T00:00:00",
                        "BirthDate": null
                    }
                ],
                "BirthDateString": "06 Mar 1992",
                "GenderName": "Female"
            }
        ],
        "PaymentTexts": [],
        "PromoCode": null,
        "CloseSessionAfterBooking": false,
        "BookingContactName": "Chinyere Amah"
    },
    "TravelInformations": [
        {
            "OperatorName": "FlyForValue Aviation Limited dba Valuejet",
            "DepartureTerminal": "Murtala Muhammed International Airport",
            "ArrivalTerminal": "Nnamdi Azikiwe International Airport",
            "DepartureDate": "2024-06-30T15:10:00",
            "ArrivalDate": "2024-06-30T16:25:00",
            "TicketClass": "Economy",
            "NumberOfPassengers": 1,
            "ContactName": "Chinyere Amah",
            "ContactEmail": "[email protected]"
        }
    ],
    "TicketingDetails": [
        {
            "Price": 80000,
            "ConfirmationCode": "38742|OBYHYG",
            "Hash": "9a40132daffc0c135a233ffb5447c870532423a6973328388aa7146562b75db1efdd9dbb30a52f87d3dc4723f61231d1a07148e26293b03f32b4ac558141" 
        }
    ]
}

Last updated