⌨️Naver Pay (Standard)
Naver Pay simple payment integration guide
Last updated
Naver Pay simple payment integration guide
Last updated
Refer to the Naver Pay settings page to configure the PG settings.
To open the payment window, call JavaScript SDK IMP.request_pay(param, callback).
In PC browsers, callback is invoked after calling IMP.request_pay(param, callback)
. In mobile browsers, the page is redirected to m_redirect_url.
pg
*** **string
PG code
If not specified and this is the only PG setting that exists, default PG
is automatically set.
If there are multiple PG settings, set to naverpay
.
merchant_uid
*** **string
Order ID
Must be unique for each request.
amount
*** **integer
Payment amount
Must be an integer (not string)
naverUseCfm``
string
Expiration date (string in yyyyMMdd format, must be on or after the date of payment).
Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets).
name
*
string
Product name
If multiple products are defined in the naverProducts
parameter, Naver Pay automatically appends and 2 others
. Hence, set this to the name of the first product (naverProducts[0].name
) in the array.
naverPopupMode``
boolean
Option to proceed via popup window
If false
, payment process will proceed via page redirection and you must specify m_redirect_url
.
m_redirect_url
string
Redirect URL
URL to redirect to after payment approval when using redirection method (naverPopupMode
: false).
naverPurchaserName
string
Name of the purchaser
Only required for merchants who have been instructed to enter this information at the time of the Naver Pay contract because the product falls under a high-risk industry.
naverPurchaserBirthday``
string
Purchaser's DOB (yyyyMMdd)
Only required for merchants who have been instructed to enter this information at the time of the Naver Pay contract because the product falls under a high-risk industry.
naverChainId
string
Enter the value received from Naver Pay only for group-type merchants that operate two or more services with the same partner ID.
Non-target merchants are not entered.
naverProducts
*
array
Product information
Same as the productItems
parameter defined in Naver Pay manual.
(If omitted, request will fail Naver Pay's inspection.)
naverProducts
is an array of objects consisting of the following 6 properties:
categoryType
(Required): Refer to NPay Developers
categoryId
(Required): Refer to NPay Developers
uid
(Required) : Merchant created product ID in general. Refer to NPay Developers
name
(Required) : Product name
count
(Required) : Selected quantity
sellerId
(Optional) : Unique ID used by merchants to identify sub-merchants (uppercase and lowercase letters and numbers allowed)
Only required for mail order brokerage merchants who have been instructed to enter this information at the time of the Naver Pay contract.
Not required for other merchants.
payReferrer
(Optional) : Funnel path to Naver Pay. Enter only when in partnership agreement with other services on the Naver platform. Refer to NPay Developers.
Must return error message as-is
After calling the payment window (IMP.request_pay), if the payment process is interrupted by clicking the “Cancel” button at the bottom of the payment window, or if payment fails due to reasons such as insufficient balance, exceeding the limit, or less than 100 won, the reason for failure (error_msg) is included in the payment result (response object/query parameter) returned via callback (popup mode) or m_redirect_url (redirect mode). This error message must be returned to the user as it is without processing. If you do not comply with this rule, Naver Pay will request for correction during inspection.
Example: Assuming that error_msg is “Insufficient balance”, it should not be returned to the user as “Payment failed. Reason for failure:" + "Insufficient balance".
Must implement exception handling for payment amount under 100 won
You must implement exception handling for payment amount less than 100 won, the minimum amount for Naver Pay.
Example: Must return a 'less than minimum amount (100 won)' error message to the user.