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 API | API domain |
---|---|
Core API (non BI-SNAP) | https://api.sandbox.midtrans.com |
BI-SNAP | Get 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 key | For 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 credentials | For 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
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.
- Merchant create payment by calling the Direct Debit Payment API to the sandbox API endpoint.
- As part of the API response, Midtrans will return redirect URL with Midtrans sandbox simulator
- Merchant to open the URL and complete the payment directly on the simulator. Merchant can input PIN 123456 to complete the payment.
- 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.
- Merchant create payment by calling the Generate QR MPM API to the sandbox API endpoint.
- As part of the API response, Midtrans will return QRIS image URL
- Merchant needs to open the Midtrans sandbox simulator for QRIS payment https://simulator.sandbox.midtrans.com/openapi/qris/index
- Merchant then needs to paste the QRIS image URL to the simulator, then click "Scan QR"
- Merchant to complete the payment. Merchant can choose to pay with GoPay or other QRIS player.
- 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.
- Merchant create payment by calling the Create VA API to the sandbox API endpoint.
- As part of the API response, Midtrans will return virtual account number or (for Mandiri) biller code and bill key
- Merchant needs to open the Midtrans sandbox simulator for virtual account payment
- Merchant then needs to paste the virtual account number or biller code and bill key to the simulator, then click "Inquire"
- Merchant to complete the payment in the simulator
- 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:
- Merchant can only test using phone number that has been provided by Midtrans
- User balance will be applied universally
- 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.