Ticket-level Capture

10.Ticket-level Capture

This API facilitates ticket-level capture for automatic captures. After updating AID data, Velocity captures the amount internally and passes the information to PSPs for payment processing. Thereafter, it is passed to the merchant system. You do not need call the capture API. Call the update-order-data API to facilitate ticket-level auto-capture.

Use the following API to capture ticket-level information.

Path NamePath Details
End Point[Velocity URL]/mpoint/ update-order-data
Format/Content Typetext/xml
AuthenticationHTTP basic access authentication

10.1 Request

The code below is a sample request for the Order Ticket API.

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <update-order-data>
        <transaction id="12345" order-no="FIU9YA">
            <orders>
                <line-item>
                    <product order-ref="ABC1234" sku="product-ticket">
                        <type>100</type>
                        <name>ONE WAY</name>
                        <description>MNL-CEB</description>
                        <airline-data>
                            <profiles>
                                <profile>
                                    <seq>1</seq>
                                    <title>Mr</title>
                                    <first-name>dan</first-name>
                                    <last-name>dan</last-name>
                                    <type>ADT</type>
                                    <contact-info>
                                        <email>[email protected]</email>
                                        <mobile country-id="640">9187231231</mobile>
                                    </contact-info>
                                    <additional-data>
                                        <param name="loyality_id">345rtyu</param>
                                    </additional-data>
                                </profile>
                            </profiles>
                            <billing-summary>
                                <fare-detail>
                                    <fare>
                                        <profile-seq>1</profile-seq>
                                        <description>adult</description>
                                        <currency>PHP</currency>
                                        <amount>60</amount>
                                        <product-code>ABF</product-code>
                                        <product-category>FARE</product-category>
                                        <product-item>Base fare for adult</product-item>
                                    </fare>
                                </fare-detail>                               
                            </billing-summary>
                            <trips>
                                <trip tag="1" seq="1">
                                    <origin external-id="MNL" country-id="640" time-zone="+08:00" terminal="1">Ninoy Aquino International Airport</origin>
                                    <destination external-id="CEB" country-id="640" time-zone="+08:00" terminal="2">Mactan Cebu International Airport</destination>
                                    <departure-time>2021-03-07T19:35:00Z</departure-time>
                                    <arrival-time>2021-03-07T21:05:00Z</arrival-time>
                                    <booking-class>Z</booking-class>
                                    <service-level>Economy</service-level>
                                    <transportation code="5J" number="1">
                                        <carriers>
                                            <carrier code="5J" type-id="Aircraft Boeing-737-9">
                                                <number>563</number>
                                            </carrier>
                                        </carriers>
                                    </transportation>
                                    <additional-data>
                                        <param name="fare_basis">we543s3</param>
                                    </additional-data>
                                </trip>
                            </trips>
                        </airline-data>
                    </product>
                    <amount>125056</amount>
                    <quantity>1</quantity>
                    <additional-data>
                        <param name="key">value</param>
                    </additional-data>
                </line-item>
                <line-item>
                    <product order-ref="ABC1237" sku="product-ticket">
                        <type>200</type>
                        <name>ONE WAY</name>
                        <description>MNL-CEB</description>
                        <airline-data>
                            <profiles>
                                <profile>
                                    <seq>1</seq>
                                    <title>Mr</title>
                                    <first-name>dan</first-name>
                                    <last-name>dan</last-name>
                                    <type>ADT</type>
                                    <contact-info>
                                        <email>[email protected]</email>
                                        <mobile country-id="640">9187231231</mobile>
                                    </contact-info>
                                    <additional-data>
                                        <param name="loyality_id">345rtyu</param>
                                    </additional-data>
                                </profile>
                            </profiles>
                            <billing-summary>                            
                                <add-ons>
                                    <add-on>
                                        <profile-seq>1</profile-seq>
                                        <trip-tag>2</trip-tag>
                                        <trip-seq>2</trip-seq>
                                        <description>adult</description>
                                        <currency>PHP</currency>
                                        <amount>60</amount>
                                        <product-code>ABF</product-code>
                                        <product-category>FARE</product-category>
                                        <product-item>Base fare for adult</product-item>
                                    </add-on>
                                </add-ons>
                            </billing-summary>
                            <trips>
                                <trip tag="1" seq="1">
                                    <origin external-id="MNL" country-id="640" time-zone="+08:00" terminal="1">Ninoy Aquino International Airport</origin>
                                    <destination external-id="CEB" country-id="640" time-zone="+08:00" terminal="2">Mactan Cebu International Airport</destination>
                                    <departure-time>2021-03-07T19:35:00Z</departure-time>
                                    <arrival-time>2021-03-07T21:05:00Z</arrival-time>
                                    <booking-class>Z</booking-class>
                                    <service-level>Economy</service-level>
                                    <transportation code="5J" number="1">
                                        <carriers>
                                            <carrier code="5J" type-id="Aircraft Boeing-737-9">
                                                <number>563</number>
                                            </carrier>
                                        </carriers>
                                    </transportation>
                                    <additional-data>
                                        <param name="fare_basis">we543s3</param>
                                    </additional-data>
                                </trip>
                            </trips>
                        </airline-data>
                    </product>
                    <amount>125056</amount>
                    <quantity>1</quantity>
                    <additional-data>
                        <param name="key">value</param>
                    </additional-data>
                </line-item>             
            </orders>
        </transaction>
    </update-order-data>
</root>

This API must be called for each transaction associated with the order number separately. Each request contains one or more line-item that are associated with the order-ref (ticket/emd number).

Refer to the examples listed below:

Payment MethodOrder # PNRABC $1000UATP Card $100 Request 1VISA Card $900 Request 2
Transaction IDTransaction 1Transaction 2
Ticket Number
1 line-item
50500
Ticket Number
2 line-item
47525450
Ticket Number
3 line-item
47525450

Following are the description of the fields under update-order-data:

ParameterTypeRequiredDescription
transaction/ @idIntegerYesThe identification number of a transaction
Transaction/order-nostringYesOrder number associated with the transaction.
ordersnodeYesContains one or more line-item.
For details of all the fields under orders refer to the AID - Airline Itinerary Integration Guide.

10.2 Response

The response of this API can be either a successful or a failed transaction.

10.2.1 Success

You receive the following response for a successful transaction:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <status code="100">Operation Success</status>
</root>

10.2.2 Fail

You receive the following response for a failed transaction:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <status code="99">Operation Failed</status>
</root>