Description
The updateToken request will be used to modify existing transaction data.
URL: https://secure1.sandbox.directpay.online/API/v7/index.php
Response
The method will return the operation result.
Variables to send:
Parameter | Data type | Description | |
Request | Text | updateToken | Mandatory |
CompanyToken | Token | Token you got from 3G to operate this API | Mandatory |
TransactionToken | Token | Transaction token as accepted from the createToken. | Mandatory |
PaymentAmount | money | Transaction amount, up to 2 decimal | Optional |
| money | Transaction | Optional |
CompanyRef | Text | Company reference number | Optional |
CustomerEmail | Text | E-mail of the customer to send the link | Optional |
CustomerFirstName | Text | Customer name | Optional |
CustomerLastName | Text | Customer last name | Optional |
CustomerAddress | Text | Customer address | Optional |
CustomerCity | Text | Customer city | Optional |
CustomerCountry | ISO code | Customer country ISO 2 letter code | Optional |
CustomerDialCode | ISO code | Customer country ISO 2 letter code | Optional |
CustomerPhone | Number | Customer Phone number | Optional |
CustomerZip | Text | Customer zip code | Optional |
CompanyAccRef | Text | Internal accounting reference number | Optional |
UserToken | Token | To define who created the transaction | Optional |
| XML (String) | Additional Airlines transaction props | Optional |
Additional Airlines Fields Prams:
Additional Airline Fields Prams:
Parameter | Data type | Description | Is Mandatory |
TicketType DocumentType DateIssued IATACarrierCode IATATravelAgencyNbr TicketCarrierName TicketIssuerCityName PassengerCount ConjTicketIndicator ElecTicketIndicator TicketNumber FlightLegDetails Travelers | Text Text DateTime Text Text Text Text Numeric Text Text Text XML (String) XML (String) | Ticket Type Document Type Date Issued IATA Carrier Code IATA Travel Agency Number Ticket Carrier Name Ticket Issuer City Name Number of Passengers Conjunction Ticket Indicator Electronic Ticket Indicator Exchanged/Original Ticket No or PNR Flight Leg Details Traveler Details | Optional Optional Mandatory Mandatory Optional Optional Optional Optional Optional Optional Mandatory Optional Optional |
Traveler Details Prams:
Parameter | Data type | Description | Is Mandatory |
TravelerFirstName | Text | First name | Mandatory |
TravelerLastName | Text | Last name | Mandatory |
TravelerPhone | Text | Phone number | Optional |
TravelerPhonePrefix | Numeric | Phone number prefix (without +) | Optional |
TravelerDateOfBirth | DateTime | Traveler Date Of Birth | Optional |
TravelerCountryCode | Text | Traveler Country Code | Optional |
Flight Leg Details Prams:
Parameter | Data type | Description | Is Mandatory |
FlightDescription | Text | The description of the payment made | Mandatory |
FlightType | Number | Service type number according to the options accepted from DPO | Mandatory |
FightDate | DateTime | Service date of the booked service | Mandatory |
FlightFrom | Text | 3 letters departure airport code | Mandatory |
FightTo | Text | 3 letters destination airport code | Mandatory |
FlightRef | Text | Service Reference | Optional |
CarrierCode | Text | IATA carrier code | Mandatory |
ServiceClass | Text | Service Class | Mandatory |
FlightNumber | Text | Flight Number | Mandatory |
FareBasisCode | Text | Fare Basis Code | Mandatory |
StopOverCode | Text | Stop Over Code | Mandatory |
Action updateToken Available For Transaction statuses
Status ID | Status Name |
---|---|
2 | Sent |
3 | Queued |
4 | Website Pending |
5 | Prep |
10 | Pending |
12 | Authorised |
Request example
<?xml version="1.0" encoding="utf-8"?> <API3G> <CompanyToken>68B90B5E-25F6-4146-8AB1-C7A3A0C41A7F</CompanyToken> <Request>updateToken</Request> <TransactionToken>EC9E975A-A7A2-4031-8972-BF123CDD9EDD</TransactionToken> <PaymentAmount>44</PaymentAmount> <PaymentMarkupMDRFee>2.93</PaymentMarkupMDRFee> <CompanyRef>DPO1212</CompanyRef> <CustomerEmail>test@directpay.online</CustomerEmail> <CustomerFirstName>Steven dsa</CustomerFirstName> <CustomerLastName>Muallem</CustomerLastName> <CustomerAddress>Rose Avenue 6 </CustomerAddress> <CustomerCity>Nairobi</CustomerCity> <CustomerCountry>KE</CustomerCountry> <CustomerDialCode>KE</CustomerDialCode> <CustomerPhone>4433332312</CustomerPhone> <CustomerZip>121212</CustomerZip> <CompanyAccRef>DPO3232</CompanyAccRef> <UserToken>3DBC6853-8352-4902-8370-C6B38C379999E</UserToken> <AdditionalAirlineFields> <TicketType>TICKET_PURCHASE</TicketType> <DocumentType>ADDITIONAL_COLLECTION</DocumentType> <DateIssued>2013/12/20 20:00</DateIssued> <IATACarrierCode>CP</IATACarrierCode> <IATATravelAgencyNbr>56451855</IATATravelAgencyNbr> <TicketCarrierName>KenyaAirways</TicketCarrierName> <TicketIssuerCityName >Nairobi</TicketIssuerCityName> <PassengerCount>3</PassengerCount> <ConjTicketIndicator>12233</ConjTicketIndicator> <ElecTicketIndicator>1A848F</ElecTicketIndicator> <TicketNumber>45678945675</TicketNumber> <FlightLegDetails> <FlightLeg> <FlightDescription>Flight from TelAviv to CapeTown</FlightDescription> <FlightType>45</FlightType> <FlightDate>2013/12/20</FlightDate> <FlightFrom>TLV</FlightFrom> <FlightTo>CPT</FlightTo> <FlightRef>1234ABC</FlightRef> <CarrierCode>AI</CarrierCode> <ServiceClass>A</ServiceClass> <FlightNumber>1045</FlightNumber> <FareBasisCode>SPRSVR</FareBasisCode> <StopOverCode>X</StopOverCode> </FlightLeg> <FlightLeg> <FlightDescription>Flight from CapeTown to TelAviv</FlightDescription> <FlightType>45</FlightType> <FlightDate>2013/12/21 16:00</FlightDate> <FlightFrom>CPT</FlightFrom> <FlightTo>TLV</FlightTo> <FlightRef>1234ABC</FlightRef> <CarrierCode>AI</CarrierCode> <ServiceClass>A</ServiceClass> <FlightNumber>1045</FlightNumber> <FareBasisCode>SPRSVR</FareBasisCode> <StopOverCode>X</StopOverCode> </FlightLeg> </FlightLegDetails> <Travelers> <Traveler> <TravelerFirstName>John</TravelerFirstName> <TravelerLastName>Doe</TravelerLastName> <TravelerPhone>45640404</TravelerPhone> <TravelerPhonePrefix>123</TravelerPhonePrefix> <TravelerDateOfBirth>2001/12/21</TravelerDateOfBirth> <TravelerCountryCode>US</TravelerCountryCode> </Traveler> <Traveler> <TravelerFirstName>Rose</TravelerFirstName> <TravelerLastName>Doe</TravelerLastName> </Traveler> </Travelers> </AdditionalAirlineFields> </API3G> |
Respond:
The server will respond for the updateToken request according to the following results:
Parameter | Data type | Description |
Code | 3 digits code | A code will be sent with the result of the request |
Explanation | Text | Free text of the result |
ExtraInfo | Text | Free text of the result (Info error details) |
Response codes:
Code | Explanation |
000 | Token been updated |
999 | Custom error message |
804 | Error in XML |
950 | Request missing transaction level mandatory fields |
955 | Request missing transaction level mandatory additional fields |
Success Response Example
<?xml version="1.0" encoding="UTF-8"?> <API3G> <Code>000</Code> <Explanation>Token been updated</Explanation> </API3G> |
Fail Response Example
<?xml version="1.0" encoding="UTF-8"?> <API3G> <Code>999</Code> <Explanation>Transaction invalid</Explanation> </API3G>