1. CheckRefund
PKFARE Flight Buyer API
  • Guides
    • Quick Start
    • Tricks for Playing with PKFARE API
    • Book air tickets with ancillaries
    • Raise refund requests
    • Raise change requests
    • Receive flight rescheduled notification
    • Add Paid Bags after the Booking
    • Branded Fare Integration Guide
  • API Reference
    • Air ticket booking APIs
      • TicketIssuanceNotify_V2
      • Shopping V10
      • PrecisePricing V12
      • Penalty V4
      • PreciseBooking V8
      • CancelOrder
      • OrderPricing V6
      • Ticketing
      • OrderDetail V14
      • RequestTicketing
      • ModifyOrderStatus
    • Ancillary booking APIs
      • AncillaryStatusPush
      • AncillaryPricing V6
      • AncillaryBooking
      • CancelAncillaryOrder
      • AncillaryTicketing
      • AncillaryOrderDetail
    • Flight schedule change APIs
      • ScheduleChangeNotify
      • GetScheduleChangeReply
      • GetScheduleChangeList
      • AcknowledgeScheduleChange
      • AcceptScheduleChange
    • Refund APIs
      • RefundResultNotify
      • ReimbursedResultNotify
      • Refund Pricing
      • CheckRefundPricing
      • RefundRequest
      • CheckRefund
      • CheckReimbursed
      • DownloadAttachmentFile API
      • UploadAttachmentFile API
    • Change APIs
      • ChangeResultPush
      • Change Reshop
      • Change Request
      • Change Passenger Info
      • Change Reprice
      • ChangeRepricePush
    • Void APIs
      • ReimbursedResultPush
      • VoidRequest
    • Cache APIs
      • CacheShopping
      • ValidateItinerary API
    • APIs with all versions
      • CheckInInfoPush
      • Raise change requests Copy
      • Shopping
        • Shopping
        • Shopping_V2
        • Shopping_V4
        • Shopping V7
        • Shopping V9
        • Shopping V8
      • PrecisePricing
        • PrecisePricing
        • PrecisePricing_V2
        • PrecisePricing_V6
        • PrecisePricing V9
        • PrecisePricing V10
        • PrecisePricing V11
      • Penalty
        • Penalty
        • Penalty V2
        • Penalty V3
      • PreciseBooking
        • PreciseBooking
        • PreciseBooking_V2
        • PreciseBooking_V5
        • PreciseBooking V6
        • PreciseBooking V7
      • OrderPricing
        • OrderPricing_V2
        • OrderPricing V4
        • OrderPricing V5
      • Ticketing
        • Ticketing
      • TicketNumPush
        • TicketingNumPush
        • TicketingNumPush_V2
        • TicketingNumPush_V3
        • TicketIssuanceNotify
      • CancelOrder
        • CancelOrder
      • OrderDetail
        • OrderDetail_V2
        • OrderDetail_V3
        • OrderDetail_V4
        • OrderDetail_V5
        • Json_OrderDetail_V7
        • Json_OrderDetail_V8
        • OrderDetail V9
        • OrderDetail V13
      • AncillaryPricing
        • AncillaryPricing
        • AncillaryPricing V5
      • AncillaryBooking
        • AncillaryBooking
      • CancelAncillaryOrder
        • CancelAncillaryOrder
      • AncillaryTicketing
        • AncillaryTicketing_V2
      • AncillaryStatusPush
        • AncillaryStatusPush
      • AncillaryOrderDetail
        • AncillaryOrderDetail
      • RequestTicketing
        • RequestTicketing
      • ScheduleChangeNotify
        • ScheduleChangeNotify
      • GetScheduleChangeList
        • GetScheduleChangeList
      • AcknowledgeScheduleChange
        • AcknowledgeScheduleChange
      • AcceptScheduleChange
        • AcceptScheduleChange
      • GetScheduleChangeReply
        • GetScheduleChangeReply
      • RefundPricing
        • RefundPricing
      • CheckRefundPricing
        • CheckRefundPricing
      • RefundRequest
        • RefundRequest
      • RefundResultNotify
        • RefundResultNotify
      • CheckRefund
        • CheckRefund
      • ReimbursedResultNotify
        • ReimbursedResultNotify
      • CheckReimbursed
        • CheckReimbursed
      • UploadAttachmentFile
        • UploadAttachmentFile
      • DownloadAttachmentFile
        • DownloadAttachmentFile
      • ChangeReshop
        • ChangeReshop
      • ChangeRequest
        • ChangeRequest
      • ChangePassengerInfo
        • ChangePassengerInfo
      • VoidRequest
        • VoidRequest
        • VoidRequest_V2
      • ReimbursedResultPush
        • ReimburseResultPush_V2
  • Development Instructions
    • Signature
    • Order Status Explanation
    • Booking errors explanation and suggestions
    • Price Breakdown Explanation
    • Airlines available from PKFARE
    • PKFARE Operation Notice
    • How to retrieve airlines'PNR and ticket numbers
    • PKFARE Buyer API solutionId Usage Guide
  • Notice
    • Release Note
  • Schemas
    • Schemas
      • ShoppingReq
      • Result«ShoppingResult»
      • Authentication
      • SearchDTO
      • JourneysDTO_1
      • PassengersDTO
      • ShoppingResult
      • SegmentsDTO
      • SolutionsDTO
      • BaggageDTO
      • ConditionsDTO
      • ChangeDTO
      • OtherDTO
      • RefundDTO
      • JourneysDTO
      • SegmentInfoDTO
  1. CheckRefund

CheckRefund

1 Document Description#

1.1 Function#

This API is used to inquire about the progress of the refund order refund. The purchaser initiates a request based on the refund order number. After the application and verification is successful, the refund progress information will be returned.
Note This API provides Postman examples, which you can obtain by contacting your account manager.

1.2 Target Reader#

The RefundRequest interface documentation is intended for web developers, maintenance and managers with some web development skills, an understanding of one of the major development languages such as Java, Python, ASP.NET, PHP, Node.js, and a basic knowledge of HTTP network protocols.

1.3 Charater Encoding#

The character code of this API is UTF-8.

1.4 URLs#

EnvironmentURL
Test environmenthttp://api.pkfare.com/refund-api/checkRefund
Prod environmenthttp://{{apiHost}}/refund-api/checkRefund
Notes The production environment call address is provided after you finish the API development and testing, and before the official launch. You can replace the {{apiHost}} in the production environment call address with the provided domain name.

1.5 Http Method#

POST

1.6 Request Header#

keyvalue
Content-Typeapplication/x-www-form-urlencoded

1.7 Response Header#

keyvalue
Content-Typeapplication/json

2 Request#

2.1 Schema#

Param nameDescriptionType
paramThe value after Base64 encoding the Basic Request. The Basic Request is a JSON-structured data, and the detailed explanation is provided in the following text.Text

2.1.1 Basic Request#

Sample
{
    "authentication": {
        "partnerId": "GuLC2tpartnerId",
        "sign": "994209932ddsign"
    },
    "data": {
        "orderNum": "916783298501993902"
    }
}
nametyperequireddescription
authenticationObjectyesIdentity information, refer to 2.1.2.
dataObjectyesFile information,refer to 2.1.3

2.1.2 Authentication#

nametyperequireddescription
partnerIdStringyespartnerID
signStringyesSignature, refer to sections 4.1 and 4.2 for the signature method.

2.1.3 Data#

nametyperequireddescription
orderNumStringYesPKFARE order number- refund order

2.2 Sample of Request Construction Process#

2.2.1 Request Sample#

{
    "authentication": {
        "partnerId": "GuLC2tDO2iox9iu4partnerId",
        "sign": "994209932dd3sign"
    },
    "data": {
        "orderNum": "916783298501993902"
    }
}

2.2.2 Base64 Encryption#

eyJhdXRoZW50aWNhdGlvbiI6eyJwYXJ0bmVySWQiOiIyY0d1TEMydERPMmlveDlpdTQ1REtZU3I5bVE9Iiwic2lnbiI6ImM0OTk0MjA5OTMyZGQzN2E4MWM5NTFmMDA0YzcwYmU3In0sImRhdGEiOnsib3JkZXJOdW0iOiI5MTY3ODMyOTg1MDE5OTM5MDIifX0=

2.2.3 Post Request#

POST http://open.pkfare.com/refund-api/checkRefund
Content-Type: application/x-www-form-urlencoded

param=eyJhdXRoZW50aWNhdGlvbiI6eyJwYXJ0bmVySWQiOiIyY0d1TEMydERPMmlveDlpdTQ1REtZU3I5bVE9Iiwic2lnbiI6ImM0OTk0MjA5OTMyZGQzN2E4MWM5NTFmMDA0YzcwYmU3In0sImRhdGEiOnsib3JkZXJOdW0iOiI5MTY3ODMyOTg1MDE5OTM5MDIifX0=

3 Response#

3.1 Response Sample#

{
    "errorCode": "0",
    "errorMsg": "ok",
    "data": {
        "orderNum": "916783298501993902",
        "parentOrderNum": "916783298501993901",
        "refOrderNum": "9167832985019939",
        "createTime": "2023-03-10 10:04:02",
        "passengerPriceList": [
            {
                "segmentList": [
                    {
                        "segmentNo": 2,
                        "departure": "YVR",
                        "arrival": "MEX",
                        "flightNum": "AC996",
                        "cabinClass": "ECONOMY",
                        "bookingCode": "P"
                    }
                ],
                "lastName": "YANG",
                "firstName": "TIFFANYBVC",
                "cardType": "P",
                "cardNum": "E07700466",
                "sex": "F",
                "birthday": "1990-08-23"
            }
        ],
        "refundType": "0",
        "refundReason": "0",
        "orderStatus": "Under review",
        "pnr": "NGLVYT",
        "platingCarrier": "AC",
        "journeys": [
            {
                "journeyTime": 815,
                "segments": [
                    {
                        "airline": "AC",
                        "flightNum": "996",
                        "equipment": "7M8",
                        "cabinClass": "ECONOMY",
                        "bookingCode": "P",
                        "departure": "YVR",
                        "arrival": "MEX",
                        "departureTerminal": "",
                        "arrivalTerminal": "",
                        "departureDate": "2023-02-17",
                        "arrivalDate": "2023-02-17",
                        "departureTime": "16:30",
                        "arrivalTime": "23:50",
                        "flightTime": 440,
                        "codeShare": "N"
                    }
                ],
                "departureTime": "10:15",
                "arrivalTime": "23:50",
                "departureDate": "2023-02-17",
                "arrivalDate": "2023-02-17"
            }
        ]
    }
}

3.2 Response Parameters#

nametyperequireddescription
errorCodeStringYeserror code,refer to error code list
errorMsgStringNoerror message
warningMsgStringNowarning message
dataObjectNoThe returned data, this parameter is not empty only when the error code returns "0", refer to section 3.2.1.

3.2.1 data#

nametyperequireddescription
orderNumStringyesPKFARE order number
parentOrderNumStringno【PKFARE】The previous order before refunded; e.g. it can be a change order or an original order.
refOrderNumStringyes【PKFARE】reference order number, There may be multiple orders under this order, including after-sales orders
createTimeStringyesThe time when the order is created,format: yyyy-MM-dd HH:mm:ss,
passengerPriceListArrayyesPrice information,refer to 3.2.2
refundTypeIntegeryesRefund Type:0-Voluntary, 1-Involuntary
refundReasonIntegeryesRefund reasons:0-Personal Reason, 1-Illness Reason, 2-Schedule Change Reason, 3-Crisis Reason, 4-Visa Refusal
orderStatusStringyesorder status
pnrStringnoPNR
airPnrStringnoairlines PNR
platingCarrierStringyesplating carrier
journeysArrayyesJourney information,refer to 3.2.3

3.2.2 passengerPriceList#

nametyperequireddescription
segmentListArrayyessegment information,refer to 3.2.4
lastNameStringyeslast name
firstNameStringyesfirst name
cardTypeStringnoidentification type
cardNumStringnoID number
cardExpiredDateStringnoID expirate date
nationalityStringyesnationality【2-letter code】
psgTypeStringyespassenger type
sexStringyessex
birthdayStringyesDate of birth,format[yyyy-MM-dd]
solutionsArraynoinformation for refundable price,refer to 3.2.5

3.2.3 journeys#

nametyperequireddescription
journeyTimeLongyesjournet time,unit:minute
transferCountIntegernotransfer count
departureDateStringyesdeparture date [yyyy-mm-dd](local time)
arrivalDateStringyesarrival date [yyyy-mm-dd](local time)
departureTimeStringyesdeparture time [hh:mm](local time)
arrivalTimeStringyesarrival time [hh:mm](local time)
segmentsArrayyessegment information,refer to 3.2.6

3.2.4 segmentList#

nametyperequireddescription
segmentNoIntegeryessegment sequence
departureStringyesdeparture airport
arrivalStringyesarrival airport
flightNumStringyesflight number
cabinClassStringyescabin class
bookingCodeStringyesbooking code
pnrStringnoPNR
airPnrStringnoairlines PNR
ticketNumStringnoticket number

3.2.5 solutions#

nametyperequireddescription
currencyStringyescurrency
paidAmountBigDecimalyespaid amount
usedAmountBigDecimalyesused amount
nonRefundableAmountBigDecimalyesnonrefundable amount(Includes airline penalties, non-refundable taxes, and supplier ticketing service fees)
refundServiceFeeBigDecimalyesrefund service fees(PKFARE)
refundAmountBigDecimalyesrefundable amount
FormOfPaymentStringyespayment method:Depends on payment method, Airline voucher, Depends on refund result, EMD
voucherNumberStringnoEMD code if it is EMD
voucherFileIdStringnoThe voucher's file ID will be responded based on the Voucher type.
voucherCurrencyStringnocurrency for the voucher
voucherAmountBigDecimalnorefundable amount for the voucher
voucherValidFromStringnoFor Airline Voucher or EMD, return the expiration starting date of the refund voucher
voucherValidEndStringnoFor Airline Voucher or EMD, return the expiration ending date of the refund voucher
useForObject[Integer]noFor Airline Voucher or EMD, return the subsequent use scenarios: 1 - ticketing, 2 - change, 3 - ancillary.
usageLimitationIntegernouser limitation: 0 - not confirmed, 1-only the previous passenger, 2-no limitation

3.2.6 segments#

nametyperequireddescription
airlineStringyesairlines iata code
flightNumStringyesflight number
equipmentStringyesequipment
cabinClassStringyescabin code
bookingCodeStringyesbooking code
departureStringyesdeparture airport
arrivalStringyesarrival airport
departureTerminalStringnodeparture airport terminal
arrivalTerminalStringnoarrival airport terminal
departureDateStringyesdeparture date [yyyy-mm-dd](local time)
arrivalDateStringyesarrival date [yyyy-mm-dd](local time)
departureTimeStringyesdeparture time [hh:mm](local time)
arrivalTimeStringyesarrival time [hh:mm](local time)
flightTimeIntegeryesflight time,unit:minute
stayTimeIntegernostay time,unit:minute
codeShareStringyescodeshared flight [Y-Yes, N-No]
opFltNoStringnooperating flight number
opFltAirlineStringnooperating airlines
stopoverStringnostopover airport

4 sign#

4.1 Parameters#

partnerId,partnerKey

4.2 sign#

Combine partnerId and partnerKey to make an MD5 encryption on final value.
Sign = MD5 (partnerId + partnerKey).
Sample
partnerId: abcdefg123456
partnerKey: jkHKhkikdhy258dffj
Sign = MD5(abcdefg123456jkHKhkikdhy258dffj) = d7e99ae9d5c3c7d7113aced071e3ca08

5 Appendix#

5.1 Error Code List#

error codeerror messagedescription
0oksuccess
S001System errorSystem error
P001xxx is illegalillegal parameter
P001xxx is missingmissing parameters
B002Partner is not existsPartner is not exists
B003Illegal signIllegal signature
B048Invalid buyerinvalid buyer
B035Concurrency limited. Please contact PKFARE API support team for assistant.Concurrency limited. Please contact PKFARE API support team for assistant.
B037Order is not existOrder is not exist
B141Order is not a refund order.Order is not a refund order.
Modified at 2025-02-24 02:18:34
Previous
RefundResultNotify
Next
ReimbursedResultNotify