diff --git a/asset/image/active-payment-methods.png b/asset/image/active-payment-methods.png new file mode 100644 index 00000000..0dd03764 Binary files /dev/null and b/asset/image/active-payment-methods.png differ diff --git a/asset/image/faq/auth-401-illustration.svg b/asset/image/faq/auth-401-illustration.svg new file mode 100644 index 00000000..3c84ed4e --- /dev/null +++ b/asset/image/faq/auth-401-illustration.svg @@ -0,0 +1 @@ +two_factor_authentication \ No newline at end of file diff --git a/asset/image/production-access-key.png b/asset/image/production-access-key.png new file mode 100644 index 00000000..58ebaf21 Binary files /dev/null and b/asset/image/production-access-key.png differ diff --git a/en/core-api/bank-transfer.md b/en/core-api/bank-transfer.md index bbcf86fc..34341ffc 100755 --- a/en/core-api/bank-transfer.md +++ b/en/core-api/bank-transfer.md @@ -523,6 +523,20 @@ To configure the Payment Notification URL, follow the steps given below. #### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md) + +## 4. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
+ + #### Transaction Status Description The description of `transaction_status` value for *Bank Transfer* payment method is given below. diff --git a/en/core-api/cardless-credit.md b/en/core-api/cardless-credit.md index 1cdfda08..553054f3 100755 --- a/en/core-api/cardless-credit.md +++ b/en/core-api/cardless-credit.md @@ -256,10 +256,17 @@ The sample HTTP notification request received at merchant backend for Akulaku *C #### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md) -## Switching to Production Environment -Follow the steps given below to switch to Midtrans *Production* environment and to accept real payments from real customers. -1. Change API domain URL from `api.sandbox.midtrans.com` to `api.midtrans.com`. -2. Use *Client Key* and *Server Key* for *Production* environment. For more details, refer to [Retrieving API Access Keys](/en/midtrans-account/overview.md#retrieving-api-access-keys). +### 5. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
## Next Step:
diff --git a/en/core-api/convenience-store.md b/en/core-api/convenience-store.md index cd5cfc49..0158e585 100755 --- a/en/core-api/convenience-store.md +++ b/en/core-api/convenience-store.md @@ -324,10 +324,17 @@ The sample HTTP notification request received at merchant backend for *Over the #### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md) -## Switching to Production Environment -Follow the steps given below to switch to Midtrans *Production* environment and to accept real payments from real customers. -1. Change API domain URL from `api.sandbox.midtrans.com` to `api.midtrans.com`. -2. Use *Client Key* and *Server Key* for *Production* environment. For more details, refer to [Retrieving API Access Keys](/en/midtrans-account/overview.md#retrieving-api-access-keys). +### 4. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
## Next Step:
diff --git a/en/core-api/credit-card.md b/en/core-api/credit-card.md index 48d59145..5d0cfa22 100644 --- a/en/core-api/credit-card.md +++ b/en/core-api/credit-card.md @@ -671,6 +671,18 @@ The table given below, describes the `transaction_status`. For more details, refer to [Midtrans Transaction Status Cycle Description](/en/after-payment/status-cycle.md). +## 5. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
+ ## Next Step:
diff --git a/en/core-api/direct-debit.md b/en/core-api/direct-debit.md index 77b300a8..0461677e 100644 --- a/en/core-api/direct-debit.md +++ b/en/core-api/direct-debit.md @@ -518,10 +518,17 @@ The sample HTTP notification request received at merchant backend for *Direct De #### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md) -## Switching to Production Environment -Follow the steps given below to switch to Midtrans *Production* environment and to accept real payments from real customers. -1. Change API domain URL from `api.sandbox.midtrans.com` to `api.midtrans.com`. -2. Use *Client Key* and *Server Key* for *Production* environment. For more details, refer to [Retrieving API Access Keys](/en/midtrans-account/overview.md#retrieving-api-access-keys). +### 5. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
## Note & Limitation diff --git a/en/core-api/e-wallet.md b/en/core-api/e-wallet.md index 02f8014c..e1d6a5d6 100755 --- a/en/core-api/e-wallet.md +++ b/en/core-api/e-wallet.md @@ -451,6 +451,19 @@ To configure the Payment Notification URL, follow the steps given below. #### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md) +## 4. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
+ + #### Transaction Status Description The table given below explains `transaction_status` values for Ewallet transaction. diff --git a/en/other/faq/_sidebar.md b/en/other/faq/_sidebar.md index b7cb13ff..e485f624 100644 --- a/en/other/faq/_sidebar.md +++ b/en/other/faq/_sidebar.md @@ -5,3 +5,4 @@ - [**General FAQ ↗**](https://support.midtrans.com) - **Other** - [**GoPay POS Integration**](en/other/faq/gopay-pos.md "Midtrans - GoPay POS Integration") +- [**How to Fix the 401 Error Code?**](en/other/faq/troubleshoot-401.md "Troubleshoot and Quickly Fix the 401 Unauthorized") diff --git a/en/other/faq/troubleshoot-401.md b/en/other/faq/troubleshoot-401.md new file mode 100644 index 00000000..02949b64 --- /dev/null +++ b/en/other/faq/troubleshoot-401.md @@ -0,0 +1,70 @@ +# How to Quickly Fix the 401 Error code? +![401 Unauthorized Overview](./../../../asset/image/faq/auth-401-illustration.svg) + +After submitting an API call to Midtrans, it is possible to receive HTTP 401 Unauthorized error code response. This article discusses ways to troubleshoot a 401 (unauthorized) error code. + +## What is the 401 Error Code? +The 401 (Unauthorized) error code indicates that the merchant server’s request was not verified. When accessing the Midtrans API, +your backend sends a request, which in this case was not verified. You will receive a simple message telling you that the +request is unauthorized, like the sample bellow. + + +#### **Response 401 Snap** +```json +{ + "error_messages": [ + "Access denied due to unauthorized transaction, please check client or server key", + "Visit https://snap-docs.midtrans.com/#request-headers for more details" + ] +} +``` +#### **Response 401 Core API** + +```json +{ + "status_code": "401", + "status_message": "Transaction cannot be authorized with the current client/server key.", + "id": "2e3d5c81-f80c-4aed-a40c-1298b4abfd93" +} +``` + + +This means that an incorrect Server-Key/Client-Key are being used or server-key and client-key being used in the +incorrect environment. In order to verify the request, you need to use it with valid server-key and client-key. + +## How to Fix the 401 Error Code? + +The 401 Unauthorized error can be fixed by using any of the following ways: + +1. Check Server-Key and Client-Key: + - Ensure that the **server-key and client-key are being passed correctly**. Please copy directly the value of server-key and client-key [from Midtrans Dashboard.](/en/midtrans-account/overview.md#retrieving-api-access-keys) + - Ensure there are **no spaces** at the start or end of your server-key and client-key. + - Check that your Apps/Backend **authenticating for the correct environment**. The credentials for Sandbox and Production are unique. + +2. Check The Endpoint API URL and Correct Environment: + - Sandbox and production are separate environments. **Make sure that you are not mistakenly executing your request in the incorrect environment.** + - **Use the correct URL for your environment**, See Sandbox base URLs and Production base URLs for more information. + + +#### **Base URLs** + +#### Snap Endpoints URLs + +The sample Base URLs for *Snap API* is given below. Choose your preferred environment on the "table" below. + +| Environment | Method | URL | +| ----------- | ------ |-------------------------------------------------------| +| Sandbox | POST | `https://app.sandbox.midtrans.com/` | +| Production | POST | `https://app.midtrans.com/` | + +#### Core API Endpoints URLs +The sample Base URLs for *Core API* is given below. Choose your preferred environment on the "table" below. + +| Environment | Method | URL | +| ----------- | ------ |-------------------------------------------------------| +| Sandbox | POST | `https://api.sandbox.midtrans.com/` | +| Production | POST | `https://api.midtrans.com/` | + + +We hope that the information in this guide has helped you fix the 401 error code. If you have any questions, tips, or further assistance required, +please contact your Midtrans Business PIC or you can contact [Midtrans Contact Center](https://midtrans.com/contact-us/). diff --git a/en/snap/integration-guide.md b/en/snap/integration-guide.md index c6171e21..e4424345 100755 --- a/en/snap/integration-guide.md +++ b/en/snap/integration-guide.md @@ -557,6 +557,18 @@ The URL is updated and a confirmation message is displayed. #### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md) +## 5. Switching to Production Mode +In this section, you will learn how to switch to Midtrans Production environment and to accept real payments from real customers. This is also known as "Going Live". + +
+ +
+ +#### [Going Live](/en/technical-reference/going-live.md) +Learn how to switch from Sandbox to Production environment, to start accepting real payment + +
+ ## Next Step
diff --git a/en/technical-reference/going-live.md b/en/technical-reference/going-live.md index 471eddd0..7f844964 100644 --- a/en/technical-reference/going-live.md +++ b/en/technical-reference/going-live.md @@ -3,30 +3,41 @@ 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". +?>Make sure you have already performed some successful [payment testing in the Sandbox environment](/en/technical-reference/sandbox-test.md), to ensure that your implementation is working properly. -## 1. Login to Your Midtrans Production Environment Dashboard +## 1. Checking Your Production Account +To make sure that your Midtrans account already has activated payment method(s) on Production Environment mode, follow the steps given below. +1. Login to your Midtrans Administrative Portal using *Production* environment at https://dashboard.midtrans.com/login. +2. Go to menu **PAYMENT METHODS** from the dashboard page + - *Active Payment Methods* page is displayed. + - Then you can find a list of active payment methods ready in a production environment -To login to your Midtrans *Production* environment, follow the steps given below. - -1. Login to your account at https://account.midtrans.com. - - refer to [Access Midtrans Administration Portal](/en/midtrans-account/overview.md#accessing-midtrans-administration-portal) for more details. -2. Select **Production** Environment from top-left environment switcher dropdown. - - refer to [Switching Environment](/en/midtrans-account/overview.md#switching-environment) for more details. - -## 2. Checking Your Production Account +![Active Payment Method](./../../asset/image/active-payment-methods.png) +
-To make sure your production account is active, follow the steps given below. +In cases, you cannot access menu PAYMENT METHODS in the Midtrans Dashboard. You can also make sure your production account is active, by following the steps given below. 1. On the home page, go to **SETTINGS > SNAP PREFERENCES**. - - *SNAP Preferences* page is displayed. + - *SNAP Preferences* page is displayed. 2. Select **Payment Channels** tab. - - A list of active payment methods is displayed. + - A list of active payment methods is displayed. + +?>refer to [Access Midtrans Administration Portal](/en/midtrans-account/overview.md#accessing-midtrans-administration-portal) for more details. + +## 2. Retrieving Production Server Key and Client Key +To switch from Sandbox to Production environment, Client Key and Server Key production are required. + +To get access to the Client Key and Server Key, follow the steps given below. + +1. Login to your Midtrans account. + +2. On the *Dashboard*, go to **Settings > Access Keys**. -## 3. Retrieving Server Key and Client Key + *Access Keys* page is displayed. -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](/en/midtrans-account/overview.md#retrieving-api-access-keys). +![Production Access Key](./../../asset/image/production-access-key.png) -## 4. Configuring the Integration +## 3. Configuring the Integration Please select which one of integration method you are using: @@ -37,7 +48,7 @@ If you are using Language Libraries provided by Midtrans (Midtrans PHP, Midtrans #### On Backend 1. Replace `isProduction` variable on Backend with value `true`. -2. Replace `ServerKey` variable value on the Backend with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +2. Replace `ServerKey` variable value on the Backend with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). #### On Frontend
@@ -80,7 +91,7 @@ If you are directly integrating by direct API call/request: #### On Backend 1. 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/` to `app.midtrans.com/`. -2. Replace the `ServerKey` variable value used for API auth on the Backend with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +2. Replace the `ServerKey` variable value used for API auth on the Backend with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). #### On Frontend
@@ -124,8 +135,8 @@ Find where you include midtrans-new-3ds.min.js script tag: 3. Go to **Settings > Payment**. 4. Select **Production** from Environment drop-down list. 5. Enter the **Merchant Key**. -6. Enter **Client Key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -7. Enter **Server Key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +6. Enter **Client Key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +7. Enter **Server Key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). Your website is now integrated with Midtrans. For more information, refer to [Configuring WooCommerce Plugin Notification](/en/snap/with-plugins.md). @@ -137,8 +148,8 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 4. Select **Production** from Environment drop-down list. 5. Enter **Sandbox Client Key**. 6. Enter **Sandbox Server Key.** -7. Enter **Production Server Key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -8. Enter **Production Client Key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +7. Enter **Production Server Key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +8. Enter **Production Client Key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). Your website is now integrated with Midtrans. For more information, refer to [Configuring Magento CMS Notification](/en/snap/with-plugins.md). @@ -148,8 +159,8 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 2. Go to the Midtrans plugin configuration page. 3. Select **Production** from Environment drop-down list. 4. Enter the **Merchant ID**. -5. Enter **Client Key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -6. Enter **Server Key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +5. Enter **Client Key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +6. Enter **Server Key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). Your website is now integrated with Midtrans. For more information, refer to [Configuring PrestaShop CMS Notification](/en/snap/with-plugins.md). @@ -159,8 +170,8 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 2. Go to the Midtrans plugin configuration page. 3. Enter the **Merchant Id**. 4. Select **Production** from Environment drop-down list. -5. Enter **Client Key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -6. Enter **Server Key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +5. Enter **Client Key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +6. Enter **Server Key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). Your website is now integrated with Midtrans. For more information, refer to [Configuring OpenCart CMS Notification](/en/snap/with-plugins.md). @@ -170,8 +181,8 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 2. Go to the Midtrans plugin configuration page. 3. Go to **Settings > Payment Gateway > General**. 4. Enter the **Merchant ID**. -5. Enter **Production Server Key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -6. Enter **Production Client Key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +5. Enter **Production Server Key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +6. Enter **Production Client Key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). 7. Enter **Sandbox Server Key.** 8. Enter **Sandbox Client Key**. @@ -181,8 +192,8 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 1. Login to your website as an administrator. 2. Go to the Midtrans plugin configuration page. -3. Enter **Midtrans Client Key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -4. Enter **Midtrans Server Key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +3. Enter **Midtrans Client Key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +4. Enter **Midtrans Server Key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). 5. Select **Production Mode** checkbox. 6. Click **Save Changes**. @@ -195,8 +206,8 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 3. Enter **name** this text appears on the button displayed to the customer. 4. Click **Midtrans** *Plugin* option button. 5. Click **Production** *Mode* option button. -6. Enter **Server key** with the *Server Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). -7. Enter **Client key** with the *Client Key* retrieved from [Step 3 above](#_3-retrieving-server-key-and-client-key). +6. Enter **Server key** with the *Server Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). +7. Enter **Client key** with the *Client Key* retrieved from [Step 2 above](#_2-retrieving-production-server-key-and-client-key). 8. Click **Save**. Your website is now integrated with Midtrans. For more information, refer to [Configuring Drupal CMS Notification](/en/snap/with-plugins.md#drupal-plugin-notification-configuration). @@ -213,4 +224,4 @@ Your website is now integrated with Midtrans. For more information, refer to [Co 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 [support@midtrans.com](mailto:support@midtrans.com). \ No newline at end of file +?> If further assistance is required, please contact your Midtrans Business PIC or you can contact [Midtrans Contact Center](https://midtrans.com/contact-us/). \ No newline at end of file