NICEPAY API
...
Checkout API
Registration - API Checkout

E-Wallet - API Checkout

20min

About E-Wallet - API Checkout Payment



This

 uses by

s to request a

to


for



using


.



Process Flow



General

General E-Wallet Flow
General E-Wallet Flow


Flow description after




:

  1. The
    
    requests
    
    to
    
    
    .
  2. The
    
    sends
    
    
    request using Registration
    
    to
    
    .
  3. 
    
    sends
    
    response of
    
    regist to
    
    
    .
  4. The
    
    sends
    
    
    
    to
    
    .
  5. 
    
    requests
    
    to
    
    
    
    .
  6. The
    
    
    generates
    
    
    .
  7. 
    
    stores
    
    
    
    .
  8. During
    
    s:
    • If
      
      
      is using OVO
      
      , then
      
      
      
      will send
      
      to
      
      related application to makes a
      
      .
    • If
      
      
      is using another
      
      (excluding OVO and AstraPay), then
      
      
      
      will redirects
      
      to
      
      
      's
      
      
      . After that,
      
      
      must login using their related
      
      account before
      
      ing
      
      
      
      .
  9. The
    
    sends
    
    
    to
    
    
    
    .
  10. The
    
    
    receives
    
    
    .
  11. The
    
    
    sends a
    
    to
    
    .
  12. 
    
    receives
    
    
    .
  13. 
    
    sends
    
    
    to
    
    
    .
  14. The
    
    receives
    
    
    .
  15. The
    
    requests a
    
    check to
    
    .
  16. 
    
    sends
    
    response of
    
    checking to
    
    
    .
  17. The
    
    receives
    
    final
    
    .
  18. The
    
    sends an
    
    confirmation to
    
    
    .



AstraPay

AstraPay E-Wallet Flow
AstraPay E-Wallet Flow


Flow description during payments:

  1. If
    
    
    doesn't have AstraPay account yet.
    • The
      
      requests
      
      to
      
      
      .
    • The
      
      sends
      
      Registration
      
      (nicepay/api/linkEnable.do) to
      
      .
    • 
      
      sends
      
      account link request to AstraPay.
    • AstraPay receives
      
      request sent by
      
      .
    • AstraPay sends
      
      response of redirect URL to
      
      
      's
      
      to
      
      .
    • 
      
      sends
      
      response of
      
      
      's redirect URL to
      
      
      .
    • The
      
      displays registration
      
      to
      
      
      .
    • The
      
      
      s with
      
      account registration.
    • The
      
      sends
      
      account registration to AstraPay.
    • AstraPay validates
      
      account.
    • AstraPay sends a
      
      to
      
      .
    • 
      
      sends a
      
      to
      
      
      .
    • The
      
      sends a
      
      that
      
      account already registered to
      
      
      .
  2. The
    
    requests
    
    to
    
    
    .
  3. The
    
    requests (nicepay/api/linkInitiate.do)
    
    to
    
    .
  4. 
    
    requests
    
    
    to AstraPay.
  5. AstraPay generates
    
    
    .
  6. AstraPay sends
    
    response of redirect URL to
    
    .
  7. 
    
    sends
    
    response of
    
    
    redirect URL to
    
    .
  8. The
    
    redirects
    
    
    to AstraPay's
    
    
    .
  9. The
    
    verifies
    
    
    .
  10. The
    
    makes
    
    to AstraPay.
  11. AstraPay performs
    
    verification.
  12. AstraPay sends a callback to
    
    .
    • 
      
      sends
      
      response to
      
      
      .
    • 
      
      displays
      
      response of callback to
      
      
      .
  13. AstraPay sends a
    
    to
    
    .
    • 
      
      receives
      
      
      .
    • 
      
      sends
      
      to
      
      
      .
    • The
      
      receives
      
      
      .
  14. The
    
    requests a
    
    
    check to
    
    .
  15. 
    
    sends
    
    response to
    
    
    .
  16. The
    
    receives
    
    final
    
    .
  17. The
    
    updates
    
    
    to
    
    
    .



Differences in Checkout Process Flow (Redirect)

The



has two different flows, namely asynchronous and synchronous. In

asynchronous

flow,

s need input credentials to enter


's application before making

s. Meanwhile, for a synchronous

,

s don't need to input

application's credentials first and can immediately make

s via


s sent to


's application.

The difference in these flows can be seen from

 two


flows below.

Asynchronous Process Flow

Asynchronous on the E-Wallet Process Flow
Asynchronous on the E-Wallet Process Flow


Flow description after checkout of the order:

  1. The
    
    requests
    
    to
    
    
    .
  2. The
    
    sends a
    
    request by using Registration
    
    to
    
    .
  3. 
    
    sends
    
    response of Registration
    
    to
    
    
    .
  4. The
    
    requests
    
    
    to
    
    .
  5. 
    
    requests
    
    to
    
    
    
    .
  6. The
    
    
    generates
    
    
    .
  7. 
    
    stores
    
    
    
    .
  8. If
    
    
    uses another
    
    (excluding OVO and AstraPay), then
    
    
    
    will redirect
    
    
    to
    
    
    's
    
    
    .
  9. The
    
    login to
    
    related
    
    account before making
    
    .
  10. The
    
    sends
    
    
    to
    
    
    
    .
  11. The
    
    
    receives
    
    
    .
  12. The
    
    
    sends a
    
    to
    
    .
  13. 
    
    receives
    
    
    .
  14. 
    
    sends a
    
    to
    
    
    .
  15. The
    
    receives
    
    
    .
  16. The
    
    requests
    
    checking to
    
    .
  17. 
    
    sends a response of
    
    checking to
    
    
    .
  18. The
    
    receives
    
    final
    
    .
  19. The
    
    sends an
    
    confirmation to
    
    
    .



Synchronous Process Flow

Synchronous on the E-Wallet Process Flow
Synchronous on the E-Wallet Process Flow


Flow description after checkout of the order:

  1. The
    
    requests
    
    to
    
    
    .
  2. The
    
    sends a
    
    using Registration
    
    to
    
    .
  3. 
    
    sends a response of
    
    regist to
    
    
    .
  4. The
    
    sends
    
    
    to
    
    .
  5. 
    
    requests
    
    to
    
    
    
    .
  6. The
    
    
    generates
    
    
    .
  7. 
    
    stores
    
    
    
    .
  8. The
    
    
    (OVO) will send a
    
    to
    
    related application to make
    
    s.
  9. The
    
    sends
    
    to
    
    
    
    .
  10. The
    
    
    receives
    
    .
  11. The
    
    
    sends a
    
    to
    
    .
  12. 
    
    receives
    
    
    .
  13. 
    
    sends
    
    s to
    
    
    .
  14. The
    
    receives
    
    
    .
  15. The
    
    requests
    
    checking to
    
    .
  16. 
    
    sends a response from
    
    checking to
    
    
    .
  17. The
    
    receives
    
    final
    
    .
  18. The
    
    sends an
    
    confirmation to
    
    
    .



NICEPAY Secure Payment Page E-Wallet


Secure Payment Page
Secure Payment Page


The image above is a



sample with an

method using

Secure

Page.

E-Wallet  - Secure Payment Page
E-Wallet - Secure Payment Page


After



of


registration request completes, you can continue



until settlement by following

guidelines in

E-Wallet Payment Guide.

Note for ShopeePay and OVO

, to provide a better user experience to


, please give a warning message for


to open via mobile devices.

Success  - Secure Payment Page
Success - Secure Payment Page




API Checkout Transaction Payment



API URL

/nicepay/redirect/v2/payment

Request Method

Redirect-GET

Header

Content-Type: application/Form-UrlEncoded



Request Parameters for Payment



Parameter

Type

Size

Description

Remark

paymentURL

Required

ANS

14



 URL



https://dev.nicepay.co.id/nicepay/redirect/v2/payment

tXid

Required

AN

30

Transaction ID



TNICEEW05100202212201020014087

Note for ShopeePay and OVO

, to better user experience to


, please request give a warning message for


to open by mobile devices.



Response Parameters (CallbackUrl) - Payment



Parameter

Type

Size

Description

Remark

resultCd

N

4

0000

resultMsg

AN

255

Result Message: Error Code

SUCCESS

tXid

AN

30

Transaction ID

IONPAYTEST00202212201351474222



When Success

referenceNo

ANS

40

Order Number

ordNo20221220131215



When Success

payMethod

E-Wallet, Payloan

N

2

05



When Success

amt

N

12

Transaction Amount

5000



When Success

transDt

Only CC (Additional)

N

8

Transaction Date (YYYYMMDD)

20221220



When Success

transTm

CC

N

6

Transaction Time (HH24MISS)

135201



When Success

mitraCd

Direct Debit, E-Wallet, Payloan

A

4

Mitra Code

DANA



When Success

callBackUrl

ANS

255



 Result URL

https://webhook.site/7bef799f-ebe2-4328-a7b3-6d53deedca27



When Success

Note: Response

 will be sent through callbackUrl with Content-type: application/json and method: POST Parameter.

Sample Parameter for CallbackUrl API Checkout Payment



On



in

,

response from

request that gets hit is

Callback URL.

URL Request
Response Callback




CallBack Handling API Checkout Payment



When Your callback already received callbackUrl, we recommended



to do


verification using

Status Inquiry - API Checkout.

CallBack Handling is very important to minimize

 Fraud act, we highly recommend


to do

verification using callBack parameter.

Callback Handling Flow
Callback Handling Flow

URL CallBack
Response CallBack