NICEPAY API
...
Payment API
API Virtual Account

Registration - API Virtual Account

11min

About API Virtual Account Registration



Virtual Account is one of s offered at . s have more options via ATM, SMS ing, Internet ing, and Mobile ing using this method. There are real-time s that are sent automatically to as soon as completes .



Virtual Account Length Number Specification

As explained on Virtual Account Structure, length of VA number that can be created varies from each .

The length of VA can be determined according to needs as long as VA number does not exceed maximum length capacity that includes and prefix. The following is a table of requirements for VA length number for some s.

Bank

NICEPAY + Bank Prefix Length

Max Total VA

BCA

8

23

BRI

8

18

Mandiri

8

19

Maybank

8

16

BNI

7

16

Permata & Syariah

7

16

CIMB

7

19

Danamon

7

16

HANA

7

16

BJB

7

16

BNC

11

19

DKI

9

16

Note:

  • + Prefix Length is number length requirement for and prefix numbers.

A Case Study:

If you as a want to integrate Mandiri VA, then you are required to provide a space of 8 digits for VA prefix which consists of and prefix.

Later, number after prefix will be divided into 2 types according to type of VA you want to create.

  1. Fixed VA: You can customize number after VA prefix number that refers to as ID or merFixAcctId with a note that number is no longer than maximum 19 digits length for VA numbers from Mandiri.
  2. Normal VA: You cannot customize number after VA prefix number because that number will be generated automatically and randomly by with a note that number is no longer than maximum 19 digits length for VA numbers from Mandiri.

The default length of VA number is 16 digits. Unless there are a special schemes from s, , and s.

Although each may have different length of VA number, s are considered to be able to accommodate a VA number lengths maximum of 30 digits in a row.



API Virtual Account Registration



 Registration aims so that can connect to a with a from . So, that has to provide and hosted from side can integrate with from .

API Endpoint

/nicepay/direct/v2/registration

Request Method

POST

Description

Performs Transaction Regist to

Merchant Token

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

Request Format

application/json



Request Parameter for Registration Virtual Account



The following is a list of s for requesting registration of . This is used through platform as one of stages so that 's can connect with s from .

Parameter

Type

Size

Description

Example / Notes

timeStamp

Required

N

14

Request Timestamp (YYYYMMDDHH24MISS)

20221214151286

iMid

Required

AN

10

 ID



NORMALTEST

payMethod

Required

N

2

02

currency

Required

A

3

Currency



IDR

amt

Required

N

12

Amount



10000

referenceNo

Required

ANS

40

's Reference Number



ordNo20221214151286

goodsNm 

Required

AN

100

Goods Name



Goods For Testing

billingNm 

Required

A

100

Buyer Name

John Doe

billingPhone 

Required

N

15

Buyer Phone Number



081288998899

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



12800

billingCountry 

Required

A

10

Billing Country





cartData 

JSONstring

4000

Cart Data

{}

bankCd 

Required for VA

A

4

Bank Code



CENA

vacctValidDt 

Required

N

8

VA Expiry Date (YYYYMMDD)



20221231

vacctValidTm 

Required

N

6

VA Expiry Time (HH24MISS)

235959

merFixAcctId 

Required

AN

40

 Reserved VA ID



-

userIP

Required for CC, E-Wallet, Payloan,QRIS

AN

15

User IP



127.0.0.1

dbProcessUrl

Required

ANS

255

Notification URL



https://ptsv2.com/t/merchant/post/

merchantToken

Required

AN

255

 Token



c94d31f554faea1c5f28617dd0a9de70fcb4dc8de55a343bb887d032d95dd60a

deliveryNm

A

30

Delivery Name

deliveryPhone

N

15

Delivery Phone

081288998899

deliveryAddr

AN

100

Delviery Address

Jln. Raya Kasablanka Kav.88

deliveryCity

A

50

Delivery City

South Jakarta

deliveryState

A

50

Delivery State

DKI Jakarta

deliveryPostCd

N

10

Delivery Post Code

12800

deliveryCountry

A

10

Delivery Country



description

AN

100

Transaction Description

Testing Registration

reqDomain

ANS

100

Request Domain

merchant.com

reqServerIP

ANS

15

Request Server IP

127.0.0.1

userSessionID

AN

100

User Session ID

697D6922C961070967D3BA1BA5699C2C

userAgent

ANS

100

User Agent

Mozilla

userLanguage

A

2

User Language

en-US

 visit Virtual Account (VA) to learn general about s. The s below contain additional regarding Registration .



Response Parameter for Registration Virtual Account



The following is a response from request results to register .

Parameter

Type

Size

Description

Example / Notes

resultCd

N

14

Result Code

0000

resultMsg

AN

255

Result Message: Error Code

SUCCESS

tXid

AN

30

Transaction ID

NORMALTEST02202212141509411648

referenceNo

ANS

40

 Reference Number

ordNo20221214151286

payMethod

N

2

02

amt

N

12

 Amount

1000

transDt 

N

8

Transaction Date (YYYYMMDD)

20221214

transTm

N

6

Transaction Time (HH24MISS)

150941

description

AN

100

Description

Testing Registration 

bankCd

AN

4

Bank Code

CENA

vacctNo

N

20

VA Number

9912304000001486

mitraCd

AN

4

Mitra Code

null

payNo

N

12

Payment Number

null

currency

AN

3

Currency

IDR

goodsNm

AN

100

Goods Name

Goods For Testing 

billingNm

A

100

Buyer Name

John Doe

vacctValidDt

N

8

VA Expiry Date (YYYYMMDD)

20221231

vacctValidTm

N

6

VA Expiry Time (HH24MISS)

235959

payValidDt

N

8

Expiry Date (YYYYMMDD)

null

payValidTm

N

6

Expiry Time (HH24MISS)

null

requestURL

ANS

360

Request URL

null

paymentExpDt

N

8

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



Sample JSON Registrasi Virtual Account


JSON Request
JSON Response
Java Request