NICEPAY API
...
API Credit Card
Registration - API Credit Card

Pre-Auth & Capture - Registration API Credit Card

9min

About Pre-Auth & Capture



Pre-Auth & Capture is another feature from where can hold or do Pre-Auth beforehand from paid fund from .

Then, You need to validate for that fund also known as Capture so that fund logs into Your account. If you want to do Capture after Pre-Auth expired time finished, then that will considered as Void, and that fund will return to Your .

So, we recommend doing Capture as soon as possible before Pre-Auth expiry time finished.

Learn about feature with PreAuth & Capture on Pre-Authorization & Capture in Credit Card.



Pre-Auth & Capture - Registration Credit Card API



API Endpoint

/nicepay/direct/v2/registration

Request Method

POST

Description

Pre-Auth & Capture

Merchant Token

SHA256(timeStamp+iMid+referenceNo+amt+merchantKey)

Request Format

application/json



Request Parameter Pre-Auth & Capture Registration



The first step that should do is to activate Pre-Auth & Capture feature to register beforehand on this Registration.

This need to be done so You can get tXid that will use later to with Pre-Auth .

Parameter

Type

Size

Description

Example / Notes

timeStamp

Required

N

14

Request Timestamp (YYYYMMDDHH24MISS)

20221202141217

iMid

Required

AN

10

 ID



IONPAYTEST

payMethod

Required

N

2

01

currency

Required

A

3

Currency



IDR

amt 

Required

N

12

Amount

(number not in float format)

10000 (Total sum amount goods from cartData)

referenceNo

Required

ANS

40

's Reference Number



ordNo20221202141217

goodsNm 

Required

AN

100

Goods Name



Testing Transaction

billingNm

Required

A

100

Buyer Name



John Doe

billingPhone

Required

N

15

Buyer Phone Number



2112345678

billingEmail

Required

ANS

40

Buyer E-mail



billingAddr

Required

AN

100

Buyer Address



Jln. Raya Kasablanka Kav.88

billingCity

Required

A

50

Buyer City



South Jakarta

billingState

Required

A

50

Billing State



DKI Jakarta

billingPostCd

Required

N

10

Billing Post Number



14350

billingCountry

Required

A

10

Billing Country





cartData

Required

JSONstring

4000

Cart Data



{}

instmntType

Required

N

2

1 (For PreAuth & Recurring default 1)

instmntMon

Required

N

2

Installment Month 1: 1 Month/Full , if instmntType: null/1

1 (For PreAuth & Recurring default 1)

recurrOpt

Required

N

2

0: Automatic Cancel 1: Do not cancel 2: Do not make token

2

dbProcessUrl

Required

ANS

255

Notification URL



https://merchant.com/dbProcessUrl

userIP

Required for CC, E-Wallet, Payloan, QRIS

AN

15

User IP

127.0.0.1

merchantToken

Required

AN

255

 Token



c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae

description

AN

100

Transaction Description

Test Transaction

userSessionID

AN

100

User Session ID

userSessionID

userAgent

ANS

100

User Agent

Mozilla

userLanguage

A

2

User Language

en-US



Response Parameter Pre-Auth Token Registration



The following is response from registration request result for Pre-Auth & Capture type that already with .

The result needed to to next from this response result is only tXid.

To to next stage, please visit Pre-Auth & Capture - Payment API Credit Card .

Parameter

Type

Size

Description

Example / Notes

resultCd

N

4

Result Code

0000

resultMsg

AN

255

Result Message: Error Code

SUCCESS

tXid

AN

30

Transaction ID

PACTEST00101202206241007570327

referenceNo

ANS

40

 Reference Number

ordNo20221215101254

payMethod

N

2

01

amt

N

12

 Amount

10000

transDt

N

8

Transaction Date (YYYYMMDD)

20221212

transTm

N

6

Transaction Time (HH24MISS)

121212

description

AN

100

Transaction Description

Testing Transaction

bankCd

A

4

Bank Code

null

vacctNo

N

20



null

mitraCd

A

4

Mitra Code

null

payNo

N

12

CVS Number

null

currency

A

3

Currency

IDR

goodsNm

AN

100

Goods Name

Goods For Testing Transaction

billingNm

A

100

Buyer Name

John Doe

vacctValidDt

N

8

VA Expiry Date (YYYYMMDD)

null

vacctValidTm

N

6

VA Expiry Time (HH24MISS)

null

payValidDt

N

8

Expiry Date (YYYYMMDD)

null

payValidTm

N

6

Expiry Time (HH24MISS)

null

requestURL

ANS

360

Request URL

null

paymentExpDt

N

6

QR Expiry Date (YYYYMMDD)

null

paymentExpTm

N

6

QR Expiry Time (HH24MISS)

null

qrContent

ANS

360

QR String in Plain Text

null

qrUrl

ANS

360

URL for QR Image, Valid for 5 minutes

null

 check NICEPAY Code to know common code also response code on or other s.



Sample JSON Credit Card Pre-Auth & Capture Registration


Form-UrlEncoded
JSON Response
Java Request