Skip to Content
DocumentationIntegration GuideDevelopment ProcessSandbox Testing

Sandbox Environment Testing

Conduct development debugging and API authorization testing in sandbox environment to ensure functionality is normal before using in production environment.

Configure Test Parameters

Configure the test parameters obtained in the “Pre-Development Preparation” step into your code:

  • Test App ID
  • Test Merchant ID
  • Test keys (server authentication, terminal authentication, Webhook signing)
  • UAT API Base URL

Strictly prohibited to mix test and production environment parameters!

Add Test Device (Optional)

Applicable Scenario: If you are testing a semi-integrated payment product (such as Tapro), you need to bind the test device to the test merchant.

  1. Enter Test Parameters Page

    • Log in to Copilot portal
    • Go to application details page → “Payment Integration” → “Test Parameters” tab
  2. Add Test Device

    • Click “Add Test Device” function
    • Enter your device SN (serial number)
    • Click confirm to complete binding
  3. Device Unbinding Instructions

    • If the device was previously bound to a formal merchant, please unbind first
    • A device can only be bound to one merchant at a time

Important Note:

  • Test device transactions in sandbox environment are simulated transactions with no real fund transfer
  • Simulated transactions cannot be used for actual product purchases or service consumption
  • After testing is complete and before going to production, you need to unbind from test merchant first, then bind to production merchant

Apply for API Permissions

Apply for the APIs you need to use in the Copilot portal:

  1. Enter API List

    • Go to application details page → “Payment Integration” → “API List”
    • Browse available API list
  2. Apply for API

    • Select the API you need, click “Apply for this API” button
  3. Obtain Permission

    • If the API does not require test acceptance, you will automatically obtain usage permission
    • If test acceptance is required, the system will ask you to run test cases to obtain access permission

Execute Test Cases

For APIs that require test acceptance, complete according to the following steps:

  1. View Test Cases

    • View test requirements in the “Test Cases” tab
    • Each case includes test steps, test accounts, and verification criteria
  2. Run Tests

    • Execute tests using the provided test accounts according to case requirements
    • The system will automatically identify and verify test results
  3. Process Results

    • Test passed: System automatically grants API authorization
    • Test failed: Modify according to prompts and retest
    • Results not updated: Click “Refresh” button to manually sync

After passing test acceptance, you can call the API in production environment.


FAQ

Why is test acceptance required?

Test acceptance ensures you correctly understand and use the API, avoiding problems in production environment. After passing test acceptance, the system will automatically grant production environment API permissions.

What do test cases include?

Test cases usually include:

  • Test step instructions
  • Test accounts and test card numbers
  • Expected test results
  • Verification criteria

Test cases for each API may differ, please follow the specific requirements provided by the system.

What if the test does not pass?

The system will clearly indicate the reason for test failure, common reasons include:

  • Incorrect request parameters
  • Test results do not meet expectations
  • Improper error handling

After modifying the code according to prompts, you can rerun the test.

Can I skip test acceptance?

No. Test acceptance is a necessary step to obtain production environment API permissions. Only by passing test acceptance can you ensure your integration meets standards and avoid problems in production environment.

Can test parameters be used in production environment?

Absolutely not. Test parameters can only be used in sandbox environment, production environment must use production environment parameters. Mixing parameters will cause transaction failures or security issues.

How to test acceptance for new APIs after application is in production?

Follow the steps for initial test acceptance, just execute test cases for newly applied APIs. After cases pass, you automatically obtain usage permission for that API.

Sandbox environment and production environment are completely isolated, all operations in sandbox environment will not affect production environment data and business.

Complete! After passing test acceptance, you can proceed with Production Environment Configuration.

Last updated on