Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merchant Cannot Do Integration-401] Add section how switch to production mode #87

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added asset/image/active-payment-methods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions asset/image/faq/auth-401-illustration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asset/image/production-access-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions en/core-api/bank-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</div>


## 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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>


#### Transaction Status Description
The description of `transaction_status` value for *Bank Transfer* payment method is given below.

Expand Down
15 changes: 11 additions & 4 deletions en/core-api/cardless-credit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</div>

## 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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>

## Next Step:
<br>
Expand Down
15 changes: 11 additions & 4 deletions en/core-api/convenience-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</div>

## 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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>

## Next Step:
<br>
Expand Down
12 changes: 12 additions & 0 deletions en/core-api/credit-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>

## Next Step:
<br>

Expand Down
15 changes: 11 additions & 4 deletions en/core-api/direct-debit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</div>

## 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change heading structure from ## to ### 5. ? IMO it shouldn't be part of integration step's sub heading, as it would seems that the integration steps is now longer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback Da. I get the details from Yana, about the merchant that facing 401. They claim they weren't found the information in the integration steps and that they should change the environment to production before going live. That's why I put the section going live, into integration steps. But I will let you decide what the best to choose ya.

Thank you

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I think make sense, please proceed with your approach for now 👌 we can re-evaluate sometimes later if we need to.

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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>

## Note & Limitation

Expand Down
13 changes: 13 additions & 0 deletions en/core-api/e-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</div>

## 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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>


#### Transaction Status Description
The table given below explains `transaction_status` values for Ewallet transaction.

Expand Down
1 change: 1 addition & 0 deletions en/other/faq/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
70 changes: 70 additions & 0 deletions en/other/faq/troubleshoot-401.md
Original file line number Diff line number Diff line change
@@ -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.

<!-- tabs:start -->
#### **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"
}
```
<!-- tabs:end -->

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.

<!-- tabs:start -->
#### **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/` |
<!-- tabs:end -->

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/).
12 changes: 12 additions & 0 deletions en/snap/integration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,18 @@ The URL is updated and a confirmation message is displayed.
#### [HTTP(S) Notification/Webhooks](/en/after-payment/http-notification.md)
</div>

## 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".

<br>

<div class="my-card">

#### [Going Live](/en/technical-reference/going-live.md)
Learn how to switch from Sandbox to Production environment, to start accepting real payment

</div>

## Next Step
<br>

Expand Down
Loading