Travelfusion Direct Connect XML API > Guidelines > tfPay - Payment Travel Innovation & Settlement >
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
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
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>