Testing GoPay Tokenization on Sandbox Environment

Sandbox Environment can be used to create "testing" transactions (usually performed from your development/testing environment). All transaction made within this environment mode is not "real", and does not require "real payment/fund". This environment is created automatically when you are signing up, and free to use.

📘

Midtrans is revamping its sandbox environment for GoPay Tokenization payment method. In the new sandbox, merchant can simulate more production-like features and scenarios that cannot be simulated previously in the old sandbox. The newly supported scenarios are BI-SNAP API, GoPay promotion API, and testing on GoPay UI, to name a few.

Please note that there will be a change of behavior of the sandbox environment. The changes will be listed below.

This new GoPay Tokenization sandbox will be rolled out to all merchant from October 22nd, 2024. Please contact your sales representative for early access.

API domain

Midtrans APIAPI domain
Core API (non BI-SNAP)https://api.sandbox.midtrans.com
BI-SNAPGet Auth Code API = https://merchants-app.sbx.midtrans.com
Other API = https://merchants.sbx.midtrans.com

Merchant credentials

Merchant credentials
MID (Merchant ID)Same production MID will be used in the new sandbox
Unlike in the current BI-SNAP staging where merchant will be given a separate staging MID
Core API server keyFor existing Core API merchant migrating to new sandbox = Server key will be the same as old sandbox, but will be kept different with production
BI-SNAP credentialsFor existing BI-SNAP merchant migrating to new sandbox = BI-SNAP credentials will be the same as staging, but will be kept different with production (except for a few GoPay Tokenization credentials).

Specific for GoPay Tokenization, merchant will need to start using these credetials below:
1. X-PARTNER-ID = Sandbox MID
2. merchantId (in Get Auth Code API) = Sandbox payment handle (UUID format).
Please contact your sales representative to get both of these values.

Merchant eligibility

📘

GoPay Tokenization will be automatically enabled on the new sandbox. Merchant need to make sure that merchant phone number and email has already been filled during the registration process.

If not, merchant can easily fill in their phone number and email in Merchant dashboard https://dashboard.midtrans.com/ through this menu Environment Sandbox > Settings > General Settings.

If GoPay Tokenization is not yet enabled, merchant can contact their sales representative for further assistance.

Specific to GoPay Tokenization BI-SNAP, merchant will still need to do credentials exchage by following these steps https://docs.midtrans.com/reference/getting-started-1.

Testing user account

The table given below lists the phone numbers that can be used to test GoPay Tokenization in the new sandbox.

Phone numberAvailable payment optionScenarios
+628215023424GoPay SaldoHappy flow
+628242974268GoPay SaldoHappy flow
+628271939753GoPay SaldoGoPay blocked
+628242014881GoPay SaldoInsufficient balance
+628249134000GoPay SaldoNot registered
+628237435829GoPay SaldoPromotion available

📘

Please note:

  • Other phone number that is not listed here cannot be used for testing GoPay Tokenization in the new sandbox
  • Merchant can use this PIN 112233 and OTP 987654 to complete linking & payment
  • Linking that is created in old sandbox or staging cannot be used in the new sandbox environment
    • We suggest merchant to initiate freshly new linking using the provided phone number for each of the merchant's user-testing account.
  • Just like in production, merchant can also simulate production-like balance update flow. In the new sandbox, user balance will be universal accross all merchants. Balance top up and deduction will be applied universally.
Sample scenarioUser balance
User 123 with phone number 123 have a balance of IDR 100KIDR 100K
Merchant A create a transaction with user 123 of IDR 30K- IDR 30K
Merchant B create a transaction with user 123 of IDR 20K- IDR 20K
Merchant C fetch the balance of user 123IDR 50K

Testing PIN/No PIN flow

Just like in old sandbox, merchant can simulate PIN and no PIN transaction based on the transaction amount.

Transaction amountFlow
Below and equals to IDR 100KNo PIN
Above IDR 100KPIN

Testing Pre Auth flow

Just like in old sandbox, merchant can simulate pre auth flow by following the API doc here:

Please contact your sales representative to enable pre auth flow in sandbox environment.

Testing promotion

Merchant can now test GoPay fetch promotion API on the new sandbox. Please make sure you use the testing phone number prepared for promotion (refer here ).

Please contact your sales representative to enable promotion in sandbox environment.