Registry / payments / iamport

iamport

JSON →
library0.4.0jsnpmunverified

Node.js SDK for I'amport REST API (v0.4.0, deprecated). This package provides a promise-based client to interact with I'amport payment gateway services, including payment lookup, cancellation, subscription management, and certification. It is the official Node.js SDK but has been deprecated since March 2026. Users are advised to migrate to PortOne V1 REST API or fork the repository. The package ships TypeScript types and supports Node.js >= 0.12.x. Key differentiator: it wraps the full I'amport REST API in a fluent, promise-based interface. However, it is outdated and no longer maintained, with potential security vulnerabilities in dependencies.

npm install iamport
INSTALL
IMPORT
SIG · IAMPORT
I
iamport
paymentsjavascriptv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Iamport
import Iamport from 'iamport'
const Iamport = require('iamport').Iamport
Package uses CommonJS default export. ESM import works in Node 12+ with esModuleInterop.
Iamport constructor
new Iamport({ impKey: '...', impSecret: '...' })
new Iamport({ api_key: '...', api_secret: '...' })
Options object expects 'impKey' and 'impSecret', not underscored names.
payment.getByImpUid
const result = await iamport.payment.getByImpUid({ imp_uid: '...' })
iamport.payment.getByImpUid('imp_uid')
All methods expect a single params object, not positional arguments.

Initialize the Iamport client with API credentials and retrieve payment details by Iamport unique ID.

import Iamport from 'iamport'; const iamport = new Iamport({ impKey: process.env.IAMPORT_API_KEY ?? '', impSecret: process.env.IAMPORT_API_SECRET ?? '' }); async function main() { try { const payment = await iamport.payment.getByImpUid({ imp_uid: 'your_imp_uid' }); console.log('Payment:', payment); } catch (error) { console.error('Error:', error); } } main();
Debug
Known issues
deprecatedThis package is deprecated as of March 2026. No further updates or support will be provided.
fix
Migrate to PortOne V1 REST API (https://developers.portone.io/api/rest-v1?v=v1) or fork this repository.
affects: >=0.0.0
gotchaThe underlying HTTP client 'request' is deprecated and may have known security vulnerabilities. It is not actively maintained.
fix
Consider using a modern HTTP client (e.g., axios, node-fetch) if forking or migrating.
affects: >=0.0.0
gotchaAll API methods expect a single parameters object; passing arguments directly (e.g., string) will fail silently or throw undefined errors.
fix
Always pass an object like { imp_uid: '...' }.
affects: >=0.0.0
deprecatedThe REST API endpoint and OpenAPI spec (openapi.json) may become outdated. Changes in I'amport API are not reflected.
fix
Check the PortOne API documentation for changes.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: Iamport is not a constructor
Using require('iamport') without default import in CommonJS, or incorrect import syntax.
fix
Use 'const Iamport = require('iamport').default' in CommonJS, or 'import Iamport from 'iamport'' in ESM.
Error: RequestError: Error: connect ECONNREFUSED
API endpoint unreachable or network issue; I'amport server may be down or blocked.
fix
Check network connectivity, firewall settings, and ensure the API endpoint is correct (https://api.iamport.kr).
Error: Unauthorized
Invalid or missing API key/secret in the constructor options.
fix
Verify your I'amport API credentials are correct and set via environment variables IAMPORT_API_KEY and IAMPORT_API_SECRET.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
requestrequiredHTTP client for API calls, now deprecated and may have vulnerabilities
Agent activity
30 hits · last 30 days
node
28
Resources
iamport — npm install iamport · libregistry