PAYSTORY CANCELLATION GUIDE - minglepay/paystory_global GitHub Wiki

Cancellation Installation

  • Cancellation request

    • Set the mid and merchantKey used for payment.
    • When the payment is successful, the tid received in response can be used to cancel the payment.
    • If you want to receive cancellation result data as Back-End , check configuration and data information in the "โšกGet Data From Back-End" section.
    • ๐Ÿ’ก If tid was not saved due to TimeOut or other reasons, you can request cancellation with the order number (ordNo) instead of tid.
  • HashData configuration

    ๐Ÿ”’ When requesting cancellation, the integrity of the request data is verified using
    encrypted hashdata.

Parameter Algorithm Plain text
encData Hex(Sha256) mid + ediDate + canAmt + merchant key(merchantKey)

  • Cancellation request parameters

URL : https://pg.minglepay.co.kr/payment/cancel
Content-Type : application/x-www-form-urlencoded; charset=utf-8
Data Type : String

Parameter Description Required Size(Byte)
mid ${{\color{Red}\huge{\textsf{*}}}}$ Merchant ID O 10 Fixed
tid ${{\color{Red}\huge{\textsf{*}}}}$ Transaction ID O 30
canAmt ${{\color{Red}\huge{\textsf{*}}}}$ Cancel amount O 15
canId Cancel requester ID 10
canMsg ${{\color{Red}\huge{\textsf{*}}}}$ Cancel reason O 100
partCanFlg ${{\color{Red}\huge{\textsf{*}}}}$ Cancel type 0: Full cancel, 1: Partial cancel O 20
encData ${{\color{Red}\huge{\textsf{*}}}}$ Hash256 encrypted value O 256
ediDate ${{\color{Red}\huge{\textsf{*}}}}$ Request date (yyyymmddhhmmss) O 14
ordNoChk ${{\color{Red}\huge{\textsf{*}}}}$ โ€œYโ€ : used with ordNo when transaction ID of payment is unknown.
( Default : N)
Optional 1
ordNo ${{\color{Red}\huge{\textsf{*}}}}$ order ID of payment
๐Ÿ’ก In case of cancel request with โ€œordNoโ€
Optional 40
charset ${{\color{Red}\huge{\textsf{*}}}}$ Character encoding method
UTF-8(default), EUC-KR
Optional 10

  • Cancellation response parameters

Content-Type: application/json
Data Type : String

Parameter Description Size (Byte)
resultCd Cancel result code 2001: success, Other failures (In case of card payment ) 10
resultMsg Cancel result message 100
payMethod Payement method (CARD) 20
tid Transaction ID (Cancellation)
โœ… in case of partial cancellation, transactrion id is created and returned separately.
โš  Do Not confuse with โ€œoTidโ€
30
mid Merchant ID 20
ordNo Merchant order ID 40
cancelYN Transaction type
N : authorization, Y : Cancellation
1
amt Cancel amount 15
appDtm Cancel date 14
appNo Authorization number 20
charSet UTF-8(default), EUC-KR 10
encData Hash256 encrypted value 256
oTid Transaction ID (Authorization) 30
ediDate Request date (yyyymmddhhmmss) 14



โš ๏ธ **GitHub.com Fallback** โš ๏ธ