Worldticket API DOCUMENTATION

Payment and Ticketing

The purpose is to make a payment for existing booking and issue tickets.

Table of Contents

Base URLs

Environment URL
Production https://api.worldticket.net
Test https://test-api.worldticket.net

Endpoints

Supported Payment Types

Payment Type OTA Code
Credit card 5
Cash 1
Debit credit account 4

Make Payment for Issuing a Ticket

Basic Request Format

With JWT Authentication

curl -X POST \
  'https://test-api.worldticket.net/ota/v2015b/OTA_AirDemandTicketRQ' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Content-Type: application/json' \
  -d @AirDemandTicketRQ.json

With API Key Authentication

curl -X POST \
  'https://test-api.worldticket.net/ota/v2015b/OTA_AirDemandTicketRQ' \
  -H 'X-API-Key: {api_key}' \
  -H 'Content-Type: application/json' \
  -d @AirDemandTicketRQ.json

HTTP Headers

Attach the following headers to OTA requests.

Header Description Example
Authorization Bearer token for JWT authentication Bearer {access_token}
X-API-Key API key for key-based authentication {api_key}
Content-Type Request content type application/json

Note: Use either Authorization (JWT) OR X-API-Key (API key), not both.

JSON Request

📋 JSON Request Template
{
  "version": "2.001",
  "pos": {
    "source": [
      {
        "bookingChannel": {
          "type": "OTA"
        },
        "requestorID": {
          "type": "5",
          "id": "{agent_id}",
          "name": "{agency_id}"
        },
        "isocountry": "US",
        "isoCurrency": "USD"
      }
    ]
  },
  "demandTicketDetail": {
    "messageFunction": [
      {
        "function": "ET"
      }
    ],
    "bookingReferenceID": {
      "id": "{record_locator}",
      "type": "14",
      "companyName": {
        "code": "{airline_code}",
        "companyShortName": "{tenant_name}"
      }
    },
    "paymentInfo": [
      {
        "paymentType": "5",
        "creditCardInfo": [
          {
            "cardHolderName": "{cardholder_name}"
          }
        ],
        "currencyCode": "USD",
        "amount": 100.00
      }
    ]
  }
}
✅ Example
{
  "version": "2.001",
  "pos": {
    "source": [
      {
        "bookingChannel": {
          "type": "OTA"
        },
        "requestorID": {
          "type": "5",
          "id": "AGENT123",
          "name": "AGENCY1"
        },
        "isocountry": "US",
        "isoCurrency": "USD"
      }
    ]
  },
  "demandTicketDetail": {
    "messageFunction": [
      {
        "function": "ET"
      }
    ],
    "bookingReferenceID": {
      "id": "ABC123",
      "type": "14",
      "companyName": {
        "code": "DX",
        "companyShortName": "DX"
      }
    },
    "paymentInfo": [
      {
        "paymentType": "5",
        "creditCardInfo": [
          {
            "cardHolderName": "JOHN DOE"
          }
        ],
        "currencyCode": "USD",
        "amount": 300.00
      }
    ]
  }
}

JSON Response

✅ Example
{
  "success": {},
  "bookingReferenceID": {
    "companyName": {
      "companyShortName": "DX",
      "code": "DX"
    },
    "type": "14",
    "id": "ABC123"
  },
  "ticketItemInfo": [
    {
      "passengerName": {
        "namePrefix": ["MR"],
        "givenName": ["JOHN"],
        "middleName": [],
        "surname": "DOE",
        "nameSuffix": [],
        "nameTitle": [],
        "passengerTypeCode": "ADT"
      },
      "conjunctiveTicket": [],
      "ticketNumber": "3333330012345",
      "type": "E_TICKET",
      "itemNumber": "1",
      "totalAmount": 300.00,
      "paymentType": "5",
      "netAmount": 270.00
    }
  ],
  "timeStamp": "2024-10-30T10:00:00.000Z",
  "version": 2.001,
  "retransmissionIndicator": false
}

Payment with Cash

JSON Request

✅ Example
{
  "version": "2.001",
  "pos": {
    "source": [
      {
        "bookingChannel": {
          "type": "OTA"
        },
        "isocountry": "US",
        "isoCurrency": "USD"
      }
    ]
  },
  "demandTicketDetail": {
    "messageFunction": [
      {
        "function": "ET"
      }
    ],
    "bookingReferenceID": {
      "id": "7YF3OW",
      "type": "14",
      "companyName": {
        "code": "DX",
        "companyShortName": "DX"
      }
    },
    "paymentInfo": [
      {
        "paymentType": "1",
        "currencyCode": "USD",
        "amount": 39.73
      }
    ]
  }
}

JSON Response

✅ Example
{
  "success": {},
  "bookingReferenceID": {
    "companyName": {
      "companyShortName": "DX",
      "code": "DX"
    },
    "type": "14",
    "id": "7YF3OW"
  },
  "ticketItemInfo": [
    {
      "passengerName": {
        "namePrefix": [
          "MR"
        ],
        "givenName": [
          "QA"
        ],
        "middleName": [],
        "surname": "TESTER",
        "nameSuffix": [],
        "nameTitle": [],
        "passengerTypeCode": "ADT"
      },
      "conjunctiveTicket": [],
      "ticketNumber": "2772770020247",
      "type": "E_TICKET",
      "itemNumber": "",
      "totalAmount": 40.73,
      "paymentType": "1",
      "netAmount": 31.76
    }
  ],
  "timeStamp": "2025-11-19T10:07:32.521Z",
  "version": 2.001,
  "retransmissionIndicator": false
}

Payment with Debit-Credit Account

Get Available Debit-Credit Accounts

curl -X GET \
  'https://test-api.worldticket.net/sms-gateway/debit-credit/accounts' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Content-Type: application/json'

Response

[
  {
    "id": 2,
    "accountName": "W1 CPH Support",
    "ownerId": 109148,
    "ownerName": "W1 CPH Support",
    "active": true,
    "status": "ACTIVE",
    "currencyCode": "DKK",
    "creditLimit": 2000.00000,
    "availableCredit": 6395.94000,
    "balance": 4395.94,
    "amountToBeInvoiced": 0,
    "handlers": [
      {
        "handlerId": 292005,
        "handlerName": "W1 CPH Support",
        "handlerType": "OFFICE"
      }
    ]
  }
]

Payment with Debit-Credit Account

JSON Request

✅ Example
{
  "version": "2.001",
  "pos": {
    "source": [
      {
        "bookingChannel": {
          "type": "OTA"
        },
        "isocountry": "US",
        "isoCurrency": "USD"
      }
    ]
  },
  "demandTicketDetail": {
    "messageFunction": [
      {
        "function": "ET"
      }
    ],
    "bookingReferenceID": {
      "id": "4NE5AY",
      "type": "14",
      "companyName": {
        "code": "DX",
        "companyShortName": "DX"
      }
    },
    "paymentInfo": [
      {
        "paymentType": "4",
        "creditCardInfo": [
          {
            "cardHolderName": "dpa_dca"
          }
        ]
      }
    ]
  }
}

JSON Response

✅ Example
{
    "success": {},
    "bookingReferenceID": {
        "companyName": {
            "companyShortName": "DX",
            "code": "DX"
        },
        "type": "14",
        "id": "4NE5AY"
    },
    "ticketItemInfo": [
        {
            "passengerName": {
                "namePrefix": [
                    "MR"
                ],
                "givenName": [
                    "QA"
                ],
                "middleName": [],
                "surname": "TESTER",
                "nameSuffix": [],
                "nameTitle": [],
                "passengerTypeCode": "ADT"
            },
            "conjunctiveTicket": [],
            "ticketNumber": "2772770020361",
            "type": "E_TICKET",
            "itemNumber": "",
            "totalAmount": 4.48,
            "paymentType": "17",
            "netAmount": 0.00
        }
    ],
    "timeStamp": "2025-12-01T02:41:10.482Z",
    "version": 2.001,
    "retransmissionIndicator": false
}

Currency Conversion

Payment currency can be different from booking currency.

Get Conversion Rate

curl -X GET \
  'https://test-api.worldticket.net/sms-gateway/currencies/convert?currency_from={from_currency}&currency_to={to_currency}&amount={amount}' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Content-Type: application/json'

Response

The endpoint returns the converted amount as a BigDecimal number:

81.07