tfVPay VCC - Virtual Credit Card

This guide is designed to give a quick start to your implementation with the tfVPay VCC standalone API. This functionality is currently only available to tfPay customers.


How to create a VCC


In order to create a VCC you will need to integrate the following API call:


CreatePrepayVirtualCard Request


XML Field

Description

CommandList

The surrounding tag

-CreatePrepayVirtualCard

The command name

--XmlLoginId

The xml customer login id. See the Login guide

--LoginId

The end user login id. See the Login guide

--Locator (optional)

An alpha-numeric reference of up to 128 characters that customers can use to identify the VCC in their back-office. If not specified, Travelfusion will generate one for you. 

--ExpirationTime

Format is dd/mm/yyyy, the date until which the card can be authorised by a merchant.

--Currency

The currency of the amount to be loaded into the card. Value must be a three letter currency code e.g. GBP.

--Amount

The amount to be loaded into the card. Value must be scaled to 2 decimal places.


Travelfusion can also collect some DBI fields, such as the PCC and PAC of the agent, which can later be provided in the billing reports.


Example

<CommandList>

  <CreatePrepayVirtualCard>

    <XmlLoginId>****</XmlLoginId>

    <LoginId>*****</LoginId>

    <Locator>TEST123</Locator>

    <ExpirationTime>01/12/2021</ExpirationTime>

    <Currency>GBP</Currency>

    <Amount>100.00</Amount>

  </CreatePrepayVirtualCard>

</CommandList>


CreatePrepayVirtualCard Response


XML Field

Description

CommandList

The surrounding tag

-CreatePrepayVirtualCard

The command name

--LoginId

The end user login id. See the Login guide

--Reference

The Travelfusion VCC reference which can be used to locate or cancel the card.

--Locator

An alpha-numeric reference (as previously specified)

--Credit

Contains the amount and currency loaded into the card.

---Amount

The amount loaded into the card. Value is scaled to 2 decimal places.

---Currency

The currency of the amount loaded into the card. Value is a three letter currency code e.g. GBP.

--Debit

Contains the amount and currency taken from the customer account.

---Amount

The amount taken from the customer account. Value is scaled to 2 decimal places.

---Currency

The currency of the amount taken from the customer account. Value is a three letter currency code e.g. GBP.

--Card

Contains details of the card.

---Number

The number of the card.

---SecurityCode

The CVV/CVC code of the card.

---ExpiryDate

The expiry date of the card. Format is mm/yy.

---CardType

The type of card, e.g. MasterCard or Visa Credit, etc.

--Accounts

Contains the state of the accounts held by the customer.


Returned VCC can be used with any card holder name and address, for simplicity Travelfusion may provide such details within the response.


Example

<CommandList>

  <CreatePrepayVirtualCard>

    <LoginId>********</LoginId>

    <NumberOfTaxableTravellers>1</NumberOfTaxableTravellers>

    <Reference>0VR9VWYWP5</Reference>

    <Locator>TEST123</Locator>

    <Credit>

      <Amount>100.00</Amount>

      <Currency>GBP</Currency>

    </Credit>

    <Debit>

      <Amount>100.00</Amount>

      <Currency>GBP</Currency>

    </Debit>

    <Card>

      <Company>***********</Company>

      <NameOnCard>

        <Title>Mr</Title>

        <NamePartList>

          <NamePart>***********</NamePart>

          <NamePart>***********</NamePart>

        </NamePartList>

      </NameOnCard>

      <Number>5275470000008545</Number>

      <SecurityCode>333</SecurityCode>

      <ExpiryDate>03/22</ExpiryDate>

      <CardType>MasterCard</CardType>

    </Card>

    <Address>

      <Company>***********</Company>

      <Flat>***********<Flat>

      <BuildingName>***********</BuildingName>

      <BuildingNumber>***********</BuildingNumber>

      <Street>***********</Street>

      <Locality>***********</Locality>

      <City>***********</City>

      <Province>***********</Province>

      <Postcode>***********</Postcode>

      <CountryCode>GB</CountryCode>

    </Address>

    <Accounts>

      <Account Currency="EUR" Amount="750.60" Flags="WarningThreshold"/>

    </Accounts>

  </CreatePrepayVirtualCard>

</CommandList>


Since VCC’s are tied to prepaid accounts you may encounter errors due to insufficient funds. If this occurs, you will likely receive the following error:


<CommandList>

  <CommandExecutionFailure>

    <CreatePrepayVirtualCard ecode="3-115-10855" etext="Insufficient funds to issue a virtual card through the TF.Payment Service" edate="11/04/2019-09:24"/>

  </CommandExecutionFailure>

  <GeneralInfoItemList>

    <GeneralInfoItem>

      <Name>ClientAddress</Name>

      <Value>************************</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>StartTime</Name>

      <Value>11/04/19-09:24:02</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>EndTime</Name>

      <Value>11/04/19-09:24:02</Value>

    </GeneralInfoItem>

  </GeneralInfoItemList>

</CommandList>


How to cancel tfVPay VCC


The created VCC can be cancelled by using the following XML command:  


CancelPrepayVirtualCard Request

<CommandList>

  <CancelPrepayVirtualCard>

    <XmlLoginId>*******</XmlLoginId>

    <LoginId>*************</LoginId>

    <Reference>[THE_REF_RETURNED_IN_CREATE_CARD_RESPONSE]</Reference>

  </CancelPrepayVirtualCard>

</CommandList>


If a VCC has pending charges an error will be thrown to explain the exact case. Do note that the edetail attribute will vary depending on the state of the card. For example:

  • ‘'Booking is partially reconciled, therefore no cancellation can be accepted.”

  • “Booking has already been cancelled, therefore no further attempts can be accepted.”

  • “Booking is refunded, therefore no cancellation can be accepted.”

  • “Booking is reconciled, therefore no cancellation can be accepted.”


Example

<CommandList>

  <CommandExecutionFailure>

    <CancelPrepayVirtualCard ecode="3-115-10853" etext="There has been an error in processing your request through the TF.Payment Service" edetail="Booking is partially reconciled, therefore no cancellation can be accepted." edate="11/04/2019-09:25"/>

  </CommandExecutionFailure>

  <GeneralInfoItemList>

    <GeneralInfoItem>

      <Name>ClientAddress</Name>

      <Value>************************</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>StartTime</Name>

      <Value>11/04/19-09:25:56</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>EndTime</Name>

      <Value>11/04/19-09:25:58</Value>

    </GeneralInfoItem>

  </GeneralInfoItemList>

</CommandList>


In case of card being authorised the following error will be returned:


Example

<CommandList>

  <CommandExecutionFailure>

    <CancelPrepayVirtualCard ecode="3-115-10859" etext="Card appears to have been charged, therefore cannot be cancelled" edate="11/04/2019-09:36"/>

  </CommandExecutionFailure>

  <GeneralInfoItemList>

    <GeneralInfoItem>

      <Name>ServerAddress</Name>

      <Value>**********************************************</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>ClientAddress</Name>

      <Value>**.***.***.**</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>StartTime</Name>

      <Value>11/04/19-09:36:32</Value>

    </GeneralInfoItem>

    <GeneralInfoItem>

      <Name>EndTime</Name>

      <Value>11/04/19-09:36:34</Value>

    </GeneralInfoItem>

  </GeneralInfoItemList>

</CommandList>


Comments