Build Status

A Flutter plugin for using the iamport for payment on Android and iOS.

List of features

  • Nice pay
  • Authenticate for phone
  • Code optimization


To get things up and running, you'll have to declare a pubspec dependency in your Flutter project. Also some minimal Android & iOS specific configuration must be done, otherise your app will crash.

On your Flutter project

See the installation instructions on pub


In order to use the iamport interworking module in iOS, you need to set the following items.

AndroidManifest permission

  <uses-permission android:name="android.permission.INTERNET" />
        android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning"


In order to use the iamport interworking module in iOS, you have to set the following 3 items.

1. App Scheme Setting

You need to set the URL identifier to use when returning after payment in the external payment application (eg PACO, ShinhanPanPay).


2. Registration of external app list

3rd party app(example) You need to register your external apps list so that you can run it


3. App Transport Security Setting



class Params {
  String pg;
  String pay_method;
  bool escrow;
  String merchant_uid;
  String name;
  int amount;
  Object custom_data;
  int tax_free;
  int vat;
  String currency;
  String language;
  String buyer_name;
  String buyer_tel;
  String buyer_email;
  String buyer_addr;
  String buyer_postcode;
  String notice_url;
  Display display;

  bool digital;
  String vbank_due;
  String m_redirect_url;
  String app_scheme;
  String biz_num;

  String customer_uid;
  bool popup;
  bool naverPopupMode;

  static Map<String, dynamic> toMap(Params json) {
    return {
      'pay_method': json.pay_method,
      'merchant_uid': json.merchant_uid,
      'amount': json.amount,

  Params.fromJson(Map<String, dynamic> json) {
    this.pay_method = json['pay_method'];
    this.merchant_uid = json['merchant_uid'];
    this.amount = json['amount'];


1. Common / Regular billing usage example

import 'package:flutter/material.dart';
import 'package:flutter_iamport/iamport_view.dart'; // Import iamport payment module.
import 'package:flutter_iamport/model/Params.dart';

class Payment extends StatelessWidget {
    callback(String url) { /* [Required] After the payment is finished, change the router and deliver the result. */
        Map<String, dynamic> args = {
        'success' :  Uri.splitQueryString(url)['success'],
        'impUid' : Uri.splitQueryString(url)['imp_uid'],
        'errorMsg' : Uri.splitQueryString(url)['error_msg'],
        Navigator.pushReplacementNamed(context, '/PaymentResult', arguments: args);

    /* [Required] Enter the data required for payment. */    
    Params state = Params.fromJson({
      'pg': 'html5_inicis',
      'pay_method': 'card',
      'name': '아임포트 결제데이터 분석',
      'merchant_uid': 'mid_${DateTime.now().millisecondsSinceEpoch}',
      'app_scheme': 'example',
      'amount': 39000,
      'buyer_name': '홍길동',
      'buyer_tel': '01012345678',
      'buyer_email': 'example@naver.com',
      'buyer_addr': '서울시 강남구 신사동 661-16',
      'buyer_postcode': '06018',

    Widget build(BuildContext context) {
        return IamportView(
            appBar: new AppBar(
            title: const Text('Pament'),
            param: data,
            userCode: "iamport",
            callback: this.callback);