Testing Core API BI-SNAP 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.

📘

Merchant can now test CoreAPI BI-SNAP flow on Sandbox!

This includes account linking and payment flow.

This new 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

Merchant eligibility

📘

Sandbox environment will be enabled to the merchants once they have registered to Midtrans. 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.

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

If any of the payment method is not yet enabled, merchant can contact their sales representative for further assistance.

Testing GoPay/ShopeePay/DANA deeplink

Merchant can test GoPay/ShopeePay/DANA deeplink in sandbox environment by calling the sandbox API endpoint.

  1. Merchant create payment by calling the Direct Debit Payment API to the sandbox API endpoint.
  2. As part of the API response, Midtrans will return redirect URL with Midtrans sandbox simulator
  3. Merchant to open the URL and complete the payment directly on the simulator. Merchant can input PIN 123456 to complete the payment.
  4. Merchant will then be redirected to the merchant page as stated in the merchant's API request

Testing QRIS

Merchant can test QRIS in sandbox environment by calling the sandbox API endpoint.

  1. Merchant create payment by calling the Generate QR MPM API to the sandbox API endpoint.
  2. As part of the API response, Midtrans will return QRIS image URL
  3. Merchant needs to open the Midtrans sandbox simulator for QRIS payment https://simulator.sandbox.midtrans.com/openapi/qris/index
  4. Merchant then needs to paste the QRIS image URL to the simulator, then click "Scan QR"
  5. Merchant to complete the payment. Merchant can choose to pay with GoPay or other QRIS player.
  6. Merchant will then be redirected to the merchant page as stated in the merchant's API request

Testing Virtual Account (Bank transfer)

Merchant can test virtual account in sandbox environment by calling the sandbox API endpoint.

  1. Merchant create payment by calling the Create VA API to the sandbox API endpoint.
  2. As part of the API response, Midtrans will return virtual account number or (for Mandiri) biller code and bill key
  3. Merchant needs to open the Midtrans sandbox simulator for virtual account payment
  1. Merchant then needs to paste the virtual account number or biller code and bill key to the simulator, then click "Inquire"
  2. Merchant to complete the payment in the simulator
  3. Merchant will then be redirected to the merchant page as stated in the merchant's API request

Testing GoPay Tokenization

Merchant can simulate GoPay Tokenization transaction on sandbox environment, they can test various production-like features such as GoPay promotion API, pre-auth, and recurring flows. With the new sandbox, merchant can also test directly using GoPay UI instead of using Midtrans mock UI.

Please note, there will be new behavior on the sandbox environment:

  1. Merchant can only test using phone number that has been provided by Midtrans
  2. User balance will be applied universally
  3. Previous linking made in the staging environment or old sandbox environment (for non BI-SNAP flow), cannot be used in the new sandbox. We suggest merchant to do fresh linking when testing on new sandbox.

For more details, please refer to this page https://docs.midtrans.com/reference/testing-gopay-tokenization-bi-snap-on-sandbox.