Frequently Asked Questions

What is a merchant server?

Midtrans Mobile SDK requires merchant to have a server-side implementation to store SERVER_KEY and make charge request. As an implementation reference, please take a look at this wiki.


What is MERCHANT_BASE_URL?

It is the URL of your merchant server (backend).


Why did I get Mixpanel token error?

This error will not happen if you use the build that we have provided on maven. If for some reason you don't want to use the build that we have provided, you need to add your own mixpanel token by signing up to mixpanel first.


Why did I get this error "Access denied due to unauthorized transaction, please check client or server key"?

Please check whether you have used the correct client key and server key. The keys should also match the environment such that sandbox keys are used for sandbox environment, and production keys for production. If the keys are already correct but you still get the same error, make sure you have put the correct merchant server URL (MERCHANT_BASE_URL).


Why did I get response message "Token not found" when trying to do checkout?

Please make sure you have installed correct SDK and supplied corresponding credentials. In sandbox environment, please make sure that you use sandbox keys (client key and server key) and sandbox version of SDK (the name of SDK using postfix “-SANDBOX” eg: com.midtrans:uikit:1.16.0-SANDBOX).


Why did I get a blank screen when trying to do checkout?

First, please make sure you've already used our latest version of SDK (at least v1.15.3). If you still face this problem, please either do one of these two solutions : (1) supply user detail to SDK, or (2) use UIKitCustomSetting. Please refer to this guide on how to do one of them.


I got an error when trying to do checkout.

First, please make sure you've already used our latest version of SDK. Then, please examine the error log captured in Logcat or other error reporting.

If the error looks like this :

E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NoSuchMethodError: No virtual method load(Ljava/lang/Integer;)Lcom/bumptech/glide/DrawableTypeRequest; in class Lcom/bumptech/glide/RequestManager; or its super classes (declaration of 'com.bumptech.glide.RequestManager' appears in /data/app/id.packageaplikasi.app-1/base.apk:classes3.dex)

This is a known issue, likely due to the use of Glide v3.7 as the image loader library in our mobile SDK. If your app also uses Glide, make sure to use the same version (or at least v3.x) to avoid this error. We are currently working to ensure that this type of version clashing does not occur in the future.


Modify base theme to avoid error

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> </style>

If the error looks like this :


java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yourcompany.appname/com.midtrans.sdk.uikit.activities.UserDetailsActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

Disable ActionBar in your app and use Toolbar instead. It requires you to modify your base theme.

For more information regarding this particular error, please refer to this Stack Overflow post.


I would like to test Card Points. Is there any testing credential that I can use?

You can use this card number for testing in Sandbox environment :

  • BNI Point : 4105 0586 8948 1467
  • Mandiri Fiestapoin : 4617 0069 5974 6656

The expiry and CCV are the same like any other testing cards. Please refer to this section to see other testing credential.


Why can't Gojek App be opened from my app when using iOS SDK?

There is a case where the Gojek app is not detected while using our iOS SDK. You will need to add LSApplicationQueriesSchemes key to your app's Info.plist


Add LSApplicationQueriesSchemes key with this value:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>gojek</string>
</array>

How to get pdf_url ?

pdf_url is an response property that provide url to download instruction of VA payment. Here's how to get pdf_url : String pdfUrl = transactionResponse.getPdfUrl()