Credit Card API

The Credit Card API provides the client with the ability to send credit card payment details through the API. These additional parameters will work in conjunctions with the following requests and responses:

  • AddBookingRequest
  • AddBookingItemRequest
  • ModifyBookingRequest
  • SearchBookingResponse

Example Add Booking request including credit card details

The XML message below gives a sample of the expected elements needed by the API to execute an Add Booking Request with credit card details.

<?xml version="1.0" encoding="UTF-8"?>
<Request xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "cbsapi.xsd">
    <Source>
        <RequestorID
            Client = "1"
            EMailAddress = "client@net.com"
            Password = "xxx"/>
        <RequestorPreferences>
            <RequestMode>SYNCHRONOUS</RequestMode>
        </RequestorPreferences>
    </Source>
    <RequestDetails>
        <AddBookingRequest>
            <BookingReference>UNIQUE_REFERENCE</BookingReference>
            <PaxNames>
                <PaxName PaxId = "1">Mr Smith</PaxName>
                <PaxName PaxId = "2">Mrs Smith</PaxName>
            </PaxNames>
            <BookingItems>++++ Booking Item Parameters ++++</BookingItems>
            <CreditCard CardType = "VS">
                <CardHolderName>Mr Smith</CardHolderName>
                <AddressLine1>Gullivers House</AddressLine1>
                <AddressLine2>27 Goswell Road</AddressLine2>
                <CityName>London</CityName>
                <State>MD</State>
                <Zip>EC1M 7GT</Zip>
                <Country>GB</Country>
                <CardNumber>1234567812345678</CardNumber>
                <CardCV2>123</CardCV2>
                <ExpiryMonth>12</ExpiryMonth>
                <ExpiryYear>2009</ExpiryYear>
                <ValidMonth>01</ValidMonth>
                <ValidYear>2006</ValidYear>
                <CardIssueNumber></CardIssueNumber>
            </CreditCard>
        </AddBookingRequest>
    </RequestDetails>
</Request>

Credit Card attributes/parameters

The request can contain the following attributes/parameters for the credit card parameter: 

Parameters

Description

 

Attribute

Description

 

CardType

Mandatory. 2-digit code that specifies the type of credit card being used.

CardHolderName

Mandatory. Contains the name and surname of the card holder as shown on the credit card.

AddressLine1

 

Mandatory. Contains the partial or full address details of the card holder.

AddressLine2

Optional. Contains part of the address details of the card holder.

CityName

Mandatory. Contains the name of the city the card holder is a resident of.

State

Optional. Contains the 2-digit code of the state within which the city lies.

Zip

Optional. Contains the post code of the card holder’s address.

Country

Mandatory. Contains the ISO country code of the country the card holder is a resident of.

CardNumber

Mandatory. Contains the card holder’s credit card number.

CardCV2

Optional. Contains the CV2 number of the credit card if available and required.

ExpiryMonth

Mandatory. Contains the month at the end of which the credit card will expire.

ExpiryYear

Mandatory. Contains the year of expiry of the credit card.

ValidMonth

Optional. Contains the month from which on the credit card is valid.

ValidYear

Optional. Contains the year from which on the credit card is valid.

CardIssueNumber

Optional. Contains the card issue number.

Search Booking request

Please refer to the Booking API document for the full details of the SearchBookingRequest parameters. The additional parameter shown below will enable you to retrieve the payment details:

Parameter

Description

ShowPaymentStatus

Optional. If set to true all payment details for the booking will re returned.


Booking responses including payment details

The XML message below gives a sample of the expected elements returned by the API for an AddBooking, AddBookingItem or ModifyBooking request that contains payment details:

<?xml version="1.0" encoding="UTF-8"?>
<Response ResponseReference = " REF_758-1128-654563548009534">
    <ResponseDetails Language = "en">
        <BookingResponse>
            <BookingReferences>
                <BookingReference ReferenceSource = "client">BOOK12</BookingReference>
                <BookingReference ReferenceSource = "api">56789</BookingReference>
            </BookingReferences>
            <BookingCreationDate>2006-07-29</BookingCreationDate>
            <BookingDepartureDate>2006-08-17</BookingDepartureDate>
            <BookingName><![CDATA[Mr John Doe]]></BookingName>
            <BookingPrice
                Currency = "GBP"
                Gross = "344.00"
                Commission = "34.40"
                Nett = "309.60"/>
            <BookingStatus Code = "C"><![CDATA[Confirmed]]></BookingStatus>
            <BookingPaymentStatus>
                <BalanceAmount Currency = "GBP">
                    <![CDATA[344.00]></BalanceAmount>
                    <MaskedCardNumber>************1234</MaskedCardNumber>
                    <CardType>VS</CardType>
                    </BookingPaymentStatus>
                    <PaxNames>
                    <PaxName PaxId="1"><![CDATA[Mr John Doe]]>
                </BalanceAmount>
            </BookingPaymentStatus>
            <BookingItems>++++ Booking Item Parameters ++++</BookingItems>
        </BookingResponse>
    </ResponseDetails>
</Response>

The XML message below gives a sample of the expected elements returned by the API when the ShowPaymentStatus parameter has been passed through with the SearchBookingRequest:

 

<?xml version="1.0" encoding="UTF-8"?>
<Response ResponseReference = " REF_758-1128-654563548009535">
    <ResponseDetails Language = "en">
        <SearchBookingResponse>
            <Bookings>
                <Booking>
                    <BookingReferences>
                        <BookingReference ReferenceSource = "client">BOOK12</BookingReference>
                        <BookingReference ReferenceSource = "api">56789</BookingReference>
                    </BookingReferences>
                    <BookingDepartureDate>2003-07-29</BookingDepartureDate>
                    <BookingName><![CDATA[Mr John Doe]]></BookingName>
                    <BookingPrice
                        Currency = "GBP"
                        Gross = "344.00"
                        Commission = "34.40"
                        Nett = "309.60"/>
                    <BookingStatus Code = "C"><![CDATA[Confirmed]]></BookingStatus>
                    <BookingPaymentStatus>
                        <BalanceAmount Currency = "GBP">
                            <![CDATA[0]></BalanceAmount>
                            <LastTransactionAmount Currency="GBP"><![CDATA[ 6800 ]]>
                        </BalanceAmount>
                        <MaskedCardNumber>************1234</MaskedCardNumber>
                        <CardType>VS</CardType>
                        <LastTransactionTime>2006-10-09T15:42:29</LastTransactionTime>
                        <Success>true</Success>
                        <AcquirerId>JC</AcquirerId>
                    </BookingPaymentStatus>
                </Booking>
            </Bookings>
        </SearchBookingResponse>
    </ResponseDetails>
</Response>

 

Credit Card attributes/parameters

The response can contain the following attributes/parameters for the credit card parameter:

Element

Description

BalanceAmount

This specifies the amount that still needs to be paid in order for the booking to be fully paid.

LastTransactionAmount

This specifies the amount paid during the last transaction.

MaskedCardNumber

This specifies the last 4 digits of the credit card number that was used to make the last transaction.

CardType

This specifies the credit card type that was used to make the last transaction.

LastTransactionTime

This specifies the date and time the last transaction was made.

Success

This specifies whether the last transaction was successful.

AcquirerID

This specifies the acquirer used for the last transaction.

ErrorCode

If an error occurred during the last transaction this will specify the code of the error.

 

 

 

 

 

 

 

Docs Navigation