Hold and pay (XML)
Book without collecting payment, then confirm the hold later. Continues from a priced offer (steps 1 and 2 of Make a test booking).
Currency is USD; use the sandbox Visa test card when paying; see payments.
Booking contacts: leave the primary ContactInfo unreferenced; see contacts.
Step 1: OrderCreate without payment
Section titled “Step 1: OrderCreate without payment”POST /ndc/v21.3/OrderCreateSame CreateOrder and DataLists as a paid create, but omit PaymentFunctions. That is the XML hold.
<?xml version="1.0" encoding="UTF-8"?><IATA_OrderCreateRQ xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersMessage"> <DistributionChain> <DistributionChainLink xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <Ordinal>1</Ordinal> <OrgRole>Seller</OrgRole> <ParticipatingOrg> <OrgID>BZ</OrgID> </ParticipatingOrg> </DistributionChainLink> <DistributionChainLink xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <Ordinal>2</Ordinal> <OrgRole>Carrier</OrgRole> <ParticipatingOrg> <OrgID>MX</OrgID> </ParticipatingOrg> </DistributionChainLink> </DistributionChain> <Request> <CreateOrder xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <AcceptSelectedQuotedOfferList> <SelectedPricedOffer> <OfferRefID>OF-6a15d613-70e5-4277-a889-24e5b2acfbae</OfferRefID> <OwnerCode>MX</OwnerCode> <SelectedOfferItem> <OfferItemRefID>OFI-6a15d613-70e5-4277-a889-24e5b2acfbae-0-ADT</OfferItemRefID> <PaxRefID>PX1</PaxRefID> </SelectedOfferItem> </SelectedPricedOffer> </AcceptSelectedQuotedOfferList> </CreateOrder> <DataLists xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <ContactInfoList> <ContactInfo> <ContactInfoID>CT1</ContactInfoID> <EmailAddress> </EmailAddress> <Phone> <PhoneNumber>8015551212</PhoneNumber> </Phone> </ContactInfo> </ContactInfoList> <PaxList> <Pax> <Individual> <Birthdate>1980-01-01</Birthdate> <GenderCode>M</GenderCode> <GivenName>John</GivenName> <Surname>Doe</Surname> </Individual> <PaxID>PX1</PaxID> <PTC>ADT</PTC> </Pax> </PaxList> </DataLists> </Request></IATA_OrderCreateRQ>The order view comes back unpaid (outstanding balance / payment time limit on the order). Capture OrderID for the next step.
Step 2: OrderChange with payment
Section titled “Step 2: OrderChange with payment”POST /ndc/v21.3/OrderChangeNo ChangeOrderChoice: only Order plus PaymentFunctions. Amount must match the live balance due (CurCode USD):
<?xml version="1.0" encoding="UTF-8"?><IATA_OrderChangeRQ xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersMessage"> <DistributionChain> <DistributionChainLink xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <Ordinal>1</Ordinal> <OrgRole>Seller</OrgRole> <ParticipatingOrg> <OrgID>BZ</OrgID> </ParticipatingOrg> </DistributionChainLink> <DistributionChainLink xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <Ordinal>2</Ordinal> <OrgRole>Carrier</OrgRole> <ParticipatingOrg> <OrgID>MX</OrgID> </ParticipatingOrg> </DistributionChainLink> </DistributionChain> <Request> <Order xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <OrderID>MXYTG780SE6I</OrderID> <OwnerCode>MX</OwnerCode> </Order> <PaymentFunctions xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes"> <PaymentProcessingDetails> <Amount CurCode="USD">59.00</Amount> <Payer> <PayerName> <IndividualName> <GivenName>John</GivenName> <Surname>Doe</Surname> </IndividualName> </PayerName> <PaymentAddress> <PostalAddress> <CityName>Los Angeles</CityName> <CountryCode>US</CountryCode> <CountrySubDivisionName>California</CountrySubDivisionName> <PostalCode>90210</PostalCode> <StreetText>123 Main St</StreetText> </PostalAddress> </PaymentAddress> </Payer> <PaymentMethod> <PaymentCard> <CardBrandCode>VI</CardBrandCode> <CardNumber>4111111111111111</CardNumber> <CardSecurityCode>123</CardSecurityCode> <ExpirationDate>1227</ExpirationDate> </PaymentCard> </PaymentMethod> </PaymentProcessingDetails> </PaymentFunctions> </Request></IATA_OrderChangeRQ>A mismatch on Amount is rejected with ERR-3006 and nothing is charged.
- JSON callers must send
{ "type": "Hold" }explicitly; XML holds by omitting payment. See JSON & XML differences. - To cancel without paying:
ChangeOrderChoice > CancelUnpaidOrder. - JSON walkthrough: Hold and pay (JSON).