1. CheckRefundPricing
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. CheckRefundPricing

CheckRefundPricing

1 Document Description#

1.1 Function#

This API is used through RefundPricingId returned by the RefundPricing interface for the active query of the refund price.
Note This API provides Postman examples, which you can obtain by contacting your account manager.

1.2 Target Reader#

The CheckRefundPricing 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/refundPricing/check
Prod environmenthttp://{{apiHost}}/refundPricing/check
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": {
        "sign": "sign",
        "partnerId": "partnerId="
    },
    "data": {
        "refundPricingId": "16786982431662414"
    }
}
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
refundPricingIdStringyesrefundPricingId that returnd by refundPricing API

2.2 Sample of Request Construction Process#

2.2.1 Request Sample#

{
    "authentication": {
        "sign": "sign",
        "partnerId": "partnerId="
    },
    "data": {
        "refundPricingId": "16786982431662414"
    }
}

2.2.2 Base64 Encryption#

eyJhdXRoZW50aWNhdGlvbiI6eyJzaWduIjoiMzhkZTNjMTYyZGZhYjJjZmIwNWZlMDdkNzMzMDhhODAiLCJwYXJ0bmVySWQiOiJvalJ3Nkh2V0VEWWFGNkJQY0lDb1FHSlNYaHc9In0sImRhdGEiOnsicmVmdW5kUHJpY2luZ0lkIjoiMTY3ODY5ODI0MzE2NjI0MTQifX0=

2.2.3 Post Request#

POST http://open.pkfare.com/refundPricing/check
Content-Type: application/x-www-form-urlencoded

param=eyJhdXRoZW50aWNhdGlvbiI6eyJzaWduIjoiMzhkZTNjMTYyZGZhYjJjZmIwNWZlMDdkNzMzMDhhODAiLCJwYXJ0bmVySWQiOiJvalJ3Nkh2V0VEWWFGNkJQY0lDb1FHSlNYaHc9In0sImRhdGEiOnsicmVmdW5kUHJpY2luZ0lkIjoiMTY3ODY5ODI0MzE2NjI0MTQifX0=

3 Response#

3.1 Response Sample#

{
    "errorCode": "0",
    "errorMsg": "ok",
    "data": {
        "needUploadFileId": 0,
        "orderNum": "916777559161841201",
        "refundPriceId": "16786982431662414",
        "refundPricingStatus": "refund pricing",
        "refundReason": 0,
        "refundType": 0,
        "lastComfirmTime": "2022-02-03 13:00:00",
        "passengerPriceList": [
            {
                "birthday": "2003-06-05",
                "cardNum": "G47350571",
                "cardType": "P",
                "firstName": "Justin",
                "lastName": "Lopez",
                "sex": "M",
                "ticketNum": "123456",
                "solutions": {
                    "currency": "USD",
                    "paidAmount": 1.00,
                    "usedAmount": 1.00,
                    "nonRefundableAmount": 1.00,
                    "refundServiceFee": 1.00,
                    "refundAmount": 1.00,
                    "FormOfPayment": "PrePay"
                },
                "segmentList": [
                    {
                        "arrival": "SIN",
                        "bookingCode": "Z",
                        "cabinClass": "ECONOMY",
                        "departure": "KUL",
                        "flightNum": "AK703",
                        "pnr": "YMERBD",
                        "airPnr": "YMERBD",
                        "segmentNo": 1,
                        "ticketNum": "1677755872384"
                    }
                ]
            }
        ]
    }
}

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
refundPriceIdStringyesrefund price ID
refundPricingStatusStringyesrefund status: 1-Refund Pricing and Supplier Pricing,2-Refund Priced, 3-Canceled
orderNumStringyesPKFARE order number
lastComfirmTimeStringnolast mintue to confirm refund; YYYY-MM-DD HH:MM (UTC+0)
passengerPriceListArrayyesthe flight segments that are refunded and price information
refundTypeIntegeryesrefund type:0-Voluntary, 1-Involuntary -
refundReasonIntegeryesreasons for refund:0-Personal Reason, 1-Illness Reason, 2-Schedule Change Reason, 3-Crisis Reason, 4-Visa Refusal
needUploadFileIdIntegeryesWhen submit refund request, sometimes the supporting documents are needed, including passport photo and so on; 0-no need; 1-need

3.2.2 passengerPriceList#

nametyperequireddescription
segmentListArrayyessegment information,refer to 3.2.4
lastNameStringyeslast name
firstNameStringyesfirst name
cardTypeStringnoidentification type
cardNumStringnoID number
sexStringyesID expirate date
birthdayStringyesnationality【2-letter code】
solutionsArraynopassenger type

3.2.3 segmentList#

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

3.2.4 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

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
P001xxx is illegalinvalid parameters
B002Partner is not existsPartner is not exists
B003Illegal signIllegal sign
B048Invalid buyerInvalid buyer
B137RefundPricingId is not existRefundPricingId is not exist
S001System errorSystem error
Modified at 2025-02-24 02:19:42
Previous
RefundPricing
Next
RefundRequest