Core Integration
This page covers concepts shared across all Fiuu Mobile XDK frameworks: environment configuration, express mode, and channel filtering. For the full app-to-app sequence (XDK → gateway → wallet app → deeplink + IPN), see E-Wallet Payment Flow.
You must be a registered Fiuu merchant to obtain credentials for testing or production. Contact sales@fiuu.com.
Environment Configuration
The XDK supports multiple environments via the mp_core_env parameter. It is a string value ("1", "2", "3", or "4"). If not set, Production V2 is used by default.
mp_core_env | Environment | Base URL |
|---|---|---|
"1" | Production - V1 | https://pay.fiuu.com/RMS/API/xdk/ |
"2" | Production - V2 | https://xdk.fiuu.com/ |
"3" | UAT - V2 | https://uat-xdk.fiuu.com/ |
"4" | Sandbox - V2 | https://sandbox-xdk.fiuu.com/ |
| (default) | Production - V2 | https://xdk.fiuu.com/ |
Example (Flutter):
paymentDetails['mp_core_env'] = '4'; // Sandbox
Example (Android Java):
paymentDetails.put(PaymentActivity.mp_core_env, "4");
When using Sandbox (mp_core_env = "4"), use your Sandbox mp_merchant_ID and mp_verification_key. For Production ("2" or default), use your production credentials.
Express Mode
Express mode bypasses the Fiuu XDK payment selection page and goes directly to a specific payment screen.
Requirements:
- Set
mp_express_modetotrue. - Set
mp_channelto a valid subscribed channel code.
Examples:
// Express Mode to FPX Maybank
paymentDetails['mp_express_mode'] = true;
paymentDetails['mp_channel'] = 'maybank2u';
// Express Mode to Touch 'n Go
paymentDetails['mp_express_mode'] = true;
paymentDetails['mp_channel'] = 'TNG-EWALLET';
- You can only select channels you are subscribed to.
- Credit channels cannot use express mode due to security requirements.
Channel codes are listed in the channel list.
Show Selected Channels Only
To restrict which payment methods appear on the channel listing page, use mp_allowed_channels:
paymentDetails['mp_allowed_channels'] = ['TNG-EWALLET', 'maybank2u'];
This shows only Touch 'n Go and Maybank2u on the listing page.
To hide specific channels (lower priority than mp_allowed_channels):
paymentDetails['mp_disabled_channels'] = ['credit'];
Pre-select a Channel
Set mp_channel to a specific channel code to pre-select it on the payment screen:
paymentDetails['mp_channel'] = 'credit'; // Pre-select credit card
paymentDetails['mp_channel_editing'] = true; // Allow user to change channel
Use multi to show all subscribed channels:
paymentDetails['mp_channel'] = 'multi';
Starting the Payment Module
Each framework has its own API to launch the XDK. The general pattern is:
- Build the payment details object.
- Call the framework-specific start method.
- Handle the result callback.
| Framework | Start Method |
|---|---|
| Flutter | await MobileXDK.start(paymentDetails) |
| React Native | fiuupayment.startFiuu(paymentDetails, successCallback, errorCallback) |
| Expo | startMolpay(paymentDetails, callback) |
| Android (Java/Kotlin) | Launch PaymentActivity with XDKPaymentDetails extra |
| Swift | FiuuXDKController(with: paymentDetails).startXDK { ... } |
| .NET MAUI | Launch FiuuActivity with serialized payment details |
The React Native wrapper validates mp_merchant_ID, mp_verification_key, and mp_amount in JavaScript and native code before launching the payment UI. Missing values are returned to errorCallback as a plain string.
See your framework's integration guide for complete code examples.
Google Pay Environment
For Google Pay testing:
- Set
mp_core_envto"4"(Sandbox). - Use Sandbox
mp_merchant_IDandmp_verification_key. - Set
mp_sandbox_modetotrueif applicable. - Optionally restrict payment methods with
mp_gpay_channel(e.g.['SHOPEEPAY', 'TNG-EWALLET', 'CC']for Malaysia).
For production Google Pay, you must request production access from Google. See the Android Library guide for details.