Booking Flow with Payment Proxy
This document explains how to integrate the Payment Proxy into your booking workflow when using the NewSkies API.
Overview
The Payment Proxy is designed to handle payment operations separately from the main booking flow. This separation ensures PCI-DSS compliance by isolating payment processing through a dedicated, secure proxy.
Booking Flow Diagram
|
π PHASE 1: CREATE BOOKING (Use SoapApi or DigitalApi Proxy) |
||
| Step | Action | Description |
|---|---|---|
| 1 | Availability Search | Search for available flights based on origin, destination, and dates |
| 2 | Sell (Select Flights) | Create booking by selecting flights. Booking is now "in state" (session-based) |
| 3 | Add Passengers | Add passenger details (names, contact information, etc.) |
| 4 | Add SSRs | Add special services (baggage, seats, meals, etc.) |
|
π³ PHASE 2: PAYMENT PROCESSING β οΈ SWITCH TO PAYMENT PROXY β οΈ |
||
| Step | Action | Description |
|---|---|---|
| 5 | Add Payment |
Switch to Payment Proxy URL:POST /flight/newskies/payment/rest/api/nsk/v5/booking/paymentsProcess payment through PCI-DSS compliant proxy |
|
β
PHASE 3: FINALIZE BOOKING β οΈ SWITCH BACK TO BOOKING PROXY β οΈ |
||
| Step | Action | Description |
|---|---|---|
| 6 | Commit Booking | Commit the booking to database. Generates PNR. Booking becomes permanent |
| 7 | Follow-up Actions (optional) |
Send confirmation emails, generate documents, trigger post-booking workflows |
Visual Flow Summary
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Application β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β PHASE 1: Create Booking β
β ββββββββββββββββββββββββ β
β β’ Availability Search β
β β’ Sell Flights β
β β’ Add Passengers β
β β’ Add SSRs β
β β
β Proxy: SoapApi/DigitalApi β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β PHASE 2: Payment Processing β
β ββββββββββββββββββββββββ β
β β’ Add Payment β
β β
β Proxy: Payment Proxy β οΈ β
β (PCI-DSS Compliant) β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β PHASE 3: Finalize Booking β
β ββββββββββββββββββββββββ β
β β’ Commit Booking β
β β’ Follow-up Actions β
β β
β Proxy: SoapApi/DigitalApi β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β Booking Complete β
β PNR Generated β
βββββββββββββββββββββββββββββββββββββββββ
Detailed Steps (Example, not a full working workflow)
Phase 1: Create Booking (Use SoapApi or DigitalApi Proxy)
-
Availability Search
- Endpoint:
GET /api/nsk/v1/availability/search - Search for available flights based on origin, destination, and dates
- Endpoint:
-
Sell (Select Flights)
- Endpoint:
POST /api/nsk/v1/booking/sell - Create a booking by selecting flights from availability results
- This creates a booking "in state" (session-based, not yet committed)
- Endpoint:
-
Add Passengers
- Endpoint:
POST /api/nsk/v1/booking/passengers - Add passenger details (names, contact information, etc.)
- Endpoint:
-
Add SSRs (Special Service Requests)
- Endpoint:
POST /api/nsk/v1/booking/ssrs - Add ancillary services like:
- Baggage
- Seat selections
- Meals
- Other special services
- Endpoint:
Phase 2: Payment Processing (Switch to Payment Proxy)
Important: At this point, switch from the booking proxy URL to the Payment Proxy URL.
-
Add Payment
For Digital API (REST):
- Endpoint:
POST /flight/newskies/payment/rest/api/nsk/v5/booking/payments - Provide payment details (credit card, voucher, etc.)
- The proxy automatically strips
/restand routes to the secure payment backend
For SOAP API:
- Endpoint:
POST /flight/newskies/payment/soap - Include
SOAPActionheader - Send SOAP envelope with payment details
Example Request (Digital API):
{ "amount": 250.00, "currencyCode": "USD", "paymentFields": { "ACCTNO": "4111111111111111", "EXPDATE": "12/2025", "CC::AccountHolderName": "John Doe", "CC::VerificationCode": "123" } } - Endpoint:
Phase 3: Finalize Booking (Switch Back to SoapApi or DigitalApi Proxy)
Important: After payment is processed, switch back to the original booking proxy URL.
-
Commit Booking
- Endpoint:
POST /api/nsk/v1/booking/commit - Commits the booking to the database
- Generates PNR (Passenger Name Record)
- Booking is no longer "in state" and becomes permanent
- Endpoint:
-
Follow-up Actions (Optional)
- Send confirmation emails
- Generate booking documents
- Trigger post-booking workflows
- Retrieve booking details for display
Key Points
Session Management
- The booking remains "in state" (session-based) throughout the process
- The same session token must be used across all three phases
- Session token is typically passed via Authorization headers (DigitalApi) or xml-requests (SoapApi)
Proxy Switching
- Phase 1 & 3: Use SoapApi or DigitalApi Proxy URL
- Phase 2: Use Payment Proxy URL (
/flight/newskies/payment) - The session token ensures continuity across proxy switches
Security & PCI-DSS Compliance
- Payment data only flows through the PCI-DSS compliant Payment Proxy
- The booking proxy never handles sensitive payment information
- This separation ensures compliance with payment card industry standards
Error Handling
- If payment fails, the booking remains "in state"
- You can retry payment or modify the booking
- Only commit the booking after successful payment
- Uncommitted bookings may expire based on session timeout
Best Practices
- Always validate payment success before committing the booking
- Maintain session continuity across proxy switches
- Never log sensitive payment data (card numbers, CVV, etc.)
Troubleshooting
Common Issues
Issue: Session lost when switching proxies
- Solution: Ensure session token is properly passed in headers across all requests
Issue: 404 errors on payment endpoint
- Solution: Verify you're using the correct Payment Proxy URL and path format
Support
For technical support or questions about the payment integration flow, please contact the API Support Team.
