Switching to Production Mode
This document is designed to assist you in switching from Sandbox environment to Production environment, in order to start accepting real world payment for your business. This is also known as "Going Live".
1. Login to Your Midtrans Production Environment Dashboard
To login to your Midtrans Production environment, follow the steps given below.
- Login to your account at https://dashboard.midtrans.com.
- refer to Access Midtrans Administration Portal for more details.
- Select Production Environment from top-left environment switcher dropdown.
- refer to Switching Environment for more details.
2. Checking Your Production Account
To make sure your production account is active, follow the steps given below.
- On the home page, go to SETTINGS > SNAP PREFERENCES.
- SNAP Preferences page is displayed.
- Select Payment Channels tab.
- A list of active payment methods is displayed.
3. Retrieving Server Key and Client Key
Go to SETTINGS > ACCESS KEYS. Server Key and Client Key for Production environment and Sandbox environment are different. For more information, refer to Retrieving API access keys.
4. Configuring the Integration
Please select which one of integration method you are using:
Language Libraries
If you are using Language Libraries provided by Midtrans (Midtrans PHP, Midtrans Ruby, Midtrans NodeJS, and so on), follow the steps given below.
On Backend
- Replace
isProduction
variable on Backend with valuetrue
. - Replace
ServerKey
variable value on the Backend with the Server Key retrieved from Step 3 above.
On Frontend
If you are using Snap
Find where you include snap.js script tag:
- From script url, remove the
.sandbox
tohttps://app.midtrans.com/snap/snap.js
. - Replace
data-client-key
attribute value with your production Client Key.
<script type="text/javascript"
src="https://app.midtrans.com/snap/snap.js"
data-client-key="<INSERT-CLIENT-KEY>"></script>
If you are using Core API
Find where you include midtrans-new-3ds.min.js script tag:
- Replace
data-environment
attribute value withproduction
. - Replace
data-client-key
attribute value with your production Client Key.
<script id="midtrans-script"
src="https://api.midtrans.com/v2/assets/js/midtrans-new-3ds.min.js"
data-environment="production"
data-client-key="<INSERT-CLIENT-KEY>"
type="text/javascript"></script>
Manual API Request
If you are directly integrating by direct API call/request:
On Backend
- Replace API domain destination to Production API on Backend by removing
.sandbox
from the domain.- For example, change the API domain from
app.sandbox.midtrans.com/
toapp.midtrans.com/
.
- For example, change the API domain from
- Replace the
ServerKey
variable value used for API auth on the Backend with the Server Key retrieved from Step 3 above.
On Frontend
If you are using Snap
Find where you include snap.js script tag:
- From script url, remove the
.sandbox
tohttps://app.midtrans.com/snap/snap.js
. - Replace
data-client-key
attribute value with your production Client Key.
<script type="text/javascript"
src="https://app.midtrans.com/snap/snap.js"
data-client-key="<INSERT-CLIENT-KEY>"></script>
If you are using Core API
Find where you include midtrans-new-3ds.min.js script tag:
- Replace
data-environment
attribute value withproduction
. - Replace
data-client-key
attribute value with your production Client Key.
<script id="midtrans-script"
src="https://api.midtrans.com/v2/assets/js/midtrans-new-3ds.min.js"
data-environment="production"
data-client-key="<INSERT-CLIENT-KEY>"
type="text/javascript"></script>
WordPress WooCommerce
- Login to your website as an administrator.
- Go to Midtrans plugin configuration page.
- Go to Settings > Payment.
- Select Production from Environment drop-down list.
- Enter the Merchant Key.
- Enter Client Key with the Client Key retrieved from Step 3 above.
- Enter Server Key with the Server Key retrieved from Step 3 above.
Your website is now integrated with Midtrans. For more information, refer to Configuring WooCommerce Plugin Notification.
Magento
- Login to your website as an administrator.
- Go to Midtrans plugin configuration page.
- Go to Sales > Payment Method.
- Select Production from Environment drop-down list.
- Enter Sandbox Client Key.
- Enter Sandbox Server Key.
- Enter Production Server Key with the Server Key retrieved from Step 3 above.
- Enter Production Client Key with the Client Key retrieved from Step 3 above.
Your website is now integrated with Midtrans. For more information, refer to Configuring Magento CMS Notification.
PrestaShop
- Login to your website as an administrator.
- Go to the Midtrans plugin configuration page.
- Select Production from Environment drop-down list.
- Enter the Merchant ID.
- Enter Client Key with the Client Key retrieved from Step 3 above.
- Enter Server Key with the Server Key retrieved from Step 3 above.
Your website is now integrated with Midtrans. For more information, refer to Configuring PrestaShop CMS Notification.
OpenCart
- Login to your website as an administrator.
- Go to the Midtrans plugin configuration page.
- Enter the Merchant Id.
- Select Production from Environment drop-down list.
- Enter Client Key with the Client Key retrieved from Step 3 above.
- Enter Server Key with the Server Key retrieved from Step 3 above.
Your website is now integrated with Midtrans. For more information, refer to Configuring OpenCart CMS Notification.
WordPress Easy Digital Download
- Login to your website as an administrator.
- Go to the Midtrans plugin configuration page.
- Go to Settings > Payment Gateway > General.
- Enter the Merchant ID.
- Enter Production Server Key with the Server Key retrieved from Step 3 above.
- Enter Production Client Key with the Client Key retrieved from Step 3 above.
- Enter Sandbox Server Key.
- Enter Sandbox Client Key.
Your website is now integrated with Midtrans. For more information, refer to Configuring WordPress Easy Digital Download CMS Notification.
WHMCS
- Login to your website as an administrator.
- Go to the Midtrans plugin configuration page.
- Enter Midtrans Client Key with the Client Key retrieved from Step 3 above.
- Enter Midtrans Server Key with the Server Key retrieved from Step 3 above.
- Select Production Mode checkbox.
- Click Save Changes.
Your website is now integrated with Midtrans. For more information, refer to Configuring WHMCS CMS Notification.
Drupal
- Login to your website as an administrator.
- Go to the Commerce > Configuration > Payment > Payment Gateways.
- Enter name this text appears on the button displayed to the customer.
- Click Midtrans Plugin option button.
- Click Production Mode option button.
- Enter Server key with the Server Key retrieved from Step 3 above.
- Enter Client key with the Client Key retrieved from Step 3 above.
- Click Save.
Your website is now integrated with Midtrans. For more information, refer to Configuring Drupal CMS Notification.
5. Configuring HTTP Notification Webhooks URL
-
For more information on how to configure HTTP notification URL, refer to Configuring HTTP Notifications On MAP.
-
For Snap Integration you can opt to configure redirect URL. For more information, refer to Configuring Redirect URL.
6. Done! Ready for Production Mode
Now you are ready to accept real world payments in Production mode! You can test it yourself.
If further assistance is required, please contact your Midtrans Business PIC or write to us at [email protected].
Updated 12 months ago