Frezka - Documentation
Frezka

Midtrans Payment

Estimated reading: 1 minutes

Sign up For Midtrans

  • If you don’t have Midtrans Account you can register from here Sign up

Obtain Midtrans API Keys

Follow the steps below to obtain your Midtrans API keys:

1. Visit the Midtrans.

2. Click on the Login option.

3. Enter your email address and password.

4. Click on Log me in.

Upon successful login, you will be directed to your Dashboard.

Completing Account Information

1. Navigate to Settings > General Settings.

2. Complete the required information.

  • Note:
    • Merchant Name cannot contain any symbols.
    • Merchant URL should be less than 25 characters.

Retrieving API Access Keys

1. Log in to your MAP account.

2. On the Dashboard, go to Settings > Access Keys.

3. Here you will find your:

  • Client Key: Used for frontend API requests.
  • Server Key: Used for backend API requests. Keep it confidential.

Switching Environment

You can switch between environments from the top left Environment drop-down on the dashboard.

  • Sandbox Environment: Use for development and testing. Transactions are not real.
  • Production Environment: Use when ready to accept real payments. Transaction fees may apply.

Note:

  • API keys differ between Production & Sandbox environments.
  • Transaction data and configurations are separated between environments.

Add API Key to Admin Panel

Now you’ve successfully generated keys please navigate to Admin Panel and follow the steps mentioned below

  • Navigate to Settings → Payment Method.
  • Enable the switch for Midtrans Payment.
  • Chose mode of the key.
  • Paste Client Key under Site Id field.
  • Submit the changes.

Remove Midtrans Payment

Two ways to remove Midtrans payment gateway

1. Permanent removal from code

1. Open your pubspec.yaml file.

2. Locate the following lines and remove them:

  midpay:
git:
url: https://github.com/iqonic-design/midpay.git
ref: main

3. Save the file and run the following command to update your project:

flutter pub get

4. Remove any code related to Midtrans in your project to ensure no references remain.

NOTE

If you have remove dependency from pubspec.yaml then hit the pub get command. now, remove the code related to midpay.

2. Temporary disablement (recommended for temporary use cases)

1. Open the Admin Panel of your application.

2. Navigate to: Settings → Payment Method.

3. Locate the midpay option and turn off the toggle to disable it temporarily.