forked from rizdaprasetya/mt-alt-doc
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Xaxxis
wants to merge
18
commits into
Midtrans:master
Choose a base branch
from
Xaxxis:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
db8f078
add image assets (prod key & payment active list)
6e7aa6c
Update going live page to be more descriptive
68dfd43
add switch to production section on snap
28ab7c1
add switch to production section on emoney
a53f7c9
add switch to production section direct debit
0915570
add switch to production section on CC
64d1373
add switch to production section on CS
9b79d7d
add switch to production section on Cardless
7467881
add switch to production section on BT
19a8400
Merge branch 'master' into master
8f90db1
optimize image size
2272f9f
Merge branch 'master' of https://github.com/Xaxxis/technical-document…
00af539
Fix wording for going live section
6552142
fix wording and add alternative to check payment methods active, remo…
8415198
add image illustration
22c5d88
add link page how to fix 401 error code
88759e8
add page how to troubleshooting 401 error code page
9b867d5
fix consistent wording error code
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.