NICEPAY API
...
API Version 2 (V2)
Checkout API

Cancel - API Checkout

7min

About API Checkout Cancel



This uses to cancel that will ongoing. Specific to VA, can only cancel before makes . After is cancelled, must register again from beginning through Registration - API Checkout.



API Checkout Cancel



API URL

/nicepay/direct/v2/cancel

Request Method

POST

Header

Content-Type: application/json

Merchant Token

SHA256 (timestamp+ iMid+ tXid+ amt+ merchantKey)



Request Parameters



Parameter

Type

Size

Description

Remark

timeStamp

Required

N

14

 Request Timestamp

20221219111294

tXid

Required

AN

30

Transaction ID



NORMALTEST00202212191104443483

iMid

Required

AN

10

 ID



NORMALTEST

payMethod

Required

N

2

02

cancelType

Required

N

2



1

merchantToken

Required

AN

255

 Token



63d44f80942cc915f6d736995797470ac2918a9f88b6fb762608541145e65bd8

amt

Required

N

12

 Amount



10000

cancelMsg

Required

AN

255

Cancel Message

Request Cancel

preauthToken

AN

100

Pre-Auth Token

d4ef98b26f917a697691807cf…

referenceNo

Optional For CC

ANS

40

 Cancel Number

CancelNo20160525000-52104

cancelServerIp

AN

15

Server IP

127.0.0.1

cancelUserId

AN

30

User ID

Admin

cancelUserIp

AN

15

User IP

127.0.0.1

cancelUserInfo

AN

100

User Information

Test Cancel

cancelRetryCnt

N

2

Retry Count

5

worker

AN

10

Worker

Worker



Response Parameters



Parameter

Type

Size

Description

Remark

resultCd

N

4

0000

resultMsg

AN

255

Result Message: Error Code

SUCCESS

tXid

AN

30

Transaction ID

NORMALTEST00202212191104443483



When Success

referenceNo

ANS

40

 Order Number

ORDER20221012080918



When Success

transDt

N

8

Transaction Date

20221219



When Success

transTm

N

6

Transaction Time

110444



When Success

amt

N

12

Amount

10000



When Success

description

AN

255

Description



canceltXid

AN

30

Cancel Transaction ID



cancelTrxSn

AN

32

Cancel Transaction Number



cancelReferenceNo

Optional For CC

AN

40

 Cancel Number





Sample JSON for API Checkout Cancel


JSON Request
JSON Response
Java Request