Sandbox and Testing
7 min
the sandbox environment the cabfare connect api is available for development and testing in a dedicated sandbox environment this environment mimics the production broker behaviour but uses simulated data to provide defined results for stv compliance testing setting value base url https //dcp sandbox nbggroup com au/api/v0 5 0 authentication requires a sandbox x api key and x api secret to request your sandbox credentials contact support\@cabfare com mailto\ support\@cabfare com testing tools to help you visualise the other side of your integration, cabfare provides web based emulators taxi meter emulator use this if you are an eftpos terminal provider simulates trip starts, driver logins, and subsidy requests so you can test your terminal integration without a live taxi meter payment terminal emulator use this if you are a taxi meter provider simulates card reads and transaction approvals so you can test your meter integration without a live eftpos terminal sandbox test data use the following datasets to trigger specific logic paths in the sandbox using data outside of these lists will result in validation errors or record not found responses driver validation testing the post /meter/driver/login endpoint driver dc number status expected result 999998 , 999997 , 999996 , 999995 valid successful login; authorised for mptp trips 112233 , 112234 expired login succeeds but mptp functionality is disabled 998877 , 998878 disabled returns 403 forbidden or "member disabled" status vehicle profiles testing the post /terminal/link/request and session anchors vehicle plate type use case m1000 , m2000 , m3000 , m4000 , u1000 , c1000 standard standard sedan for regular passenger trips m5000 , c5000 wats wheelchair accessible required for lifting fee subsidies vha100 , vha200 invalid use to test "vehicle not found" error handling mptp member scenarios testing the post /terminal/mptp/validate and post /meter/mptp/validate endpoints member number type expected behaviour 099999901 standard returns iseligible true 112345601 , 112345701 , 112345801 wheelchair validates for wheelchair specific subsidy rates 022334401 expired returns iseligible false (reason expired) 044556601 no funds returns iseligible false (reason balance depleted) implementation tips resetting state the sandbox tracks active trips if you receive a 409 conflict response, ensure you have sent post /meter/job/done for your previous tripid to clear the vehicle session before starting a new trip currency format all fare amounts must be submitted in cents as integers a fare of $10 00 must be submitted as 1000 connectivity test use the ping endpoint to verify connectivity to the sandbox before beginning your integration curl i https //dcp sandbox nbggroup com au/api/v0 5 0/ping expect a 200 ok response with body {"response" "pong"}