Developer Documentation
Developer Documentation
Home
Zip

Testing

To enable 3rd parties the ability to test their integrations with Zip, we provide some test endpoints to simulate the customer action as part of this process. We also provide a couple of scenarios by sending a set of pre-defined approval codes.

These scenarios/endpoints are only available within the sandbox environment, and not production.

Sandbox Endpoints

The following merchant API endpoint is available in your sandbox environment:

https://sandbox.zip.co/uk/api

Test Scenarios

We allow the use of a number of request values in the create order to simulate various responses from the endpoints. NB: these scenarios only work within the sandbox environment.

Create Order Test Scenarios

Use the following values for the pre-approval codes (i.e. customerApprovalCode):

Value Scenario
AA00 - AA99 Valid pre-approval code (order will automatically be marked as complete after creation during the Order Status, and return a 200). 00 - 99 is the delay, in seconds, before the order will complete.
CA00 - CA99 Valid pre-approval code, which will return a 410 status code in the Order Status endpoint. 00 - 99 is the delay, in seconds, before the order will decline.
AM00 Returns error code AboveMaximumPreApprovalAmount (see Error Codes)
BM00 Returns error code BelowMinimumOrderAmount (see Error Codes)
(any other 4 digit value) Will return a 404 status code at the Create Order stage
(any valid 6 digit value) Use of any valid code for the environment will work accordingly.

Create Refund Test Scenarios

In this case you can post any value to the orderId component of the Create Refund endpoint. Use the following values for the merchantRefundReference property in your request body:

Value Scenario
RT01 Returns 200 OK for a successful refund
RE01 Returns a 429 response code signalling the requested refund amount is greater than the value of the order
NF01 Returns a 404 Not found response code signalling the order is not found

Test Accounts

In the sandbox environment, we allow simulation of a number of scenarios with the following test cases.

Customer Account

In order to test out the smoothest user experience when paying with Zip, please create a test account by following the instructions below.

Purchases completed in the test environment are not processed by our production system and will only generate dummy invoices, transactions and fees. Emails and SMS’s are also not sent out in this environment.

Use the following details to register a new account:

Begin the Sandbox Zip Customer Application

Input Pass Fail Result
Email Use a spurious email address - -
Mobile Number Any 9 to 11 digit Number - -
Confirmation Code 999999 - -
First Name Any - -
Middle Name Optional AB000000 Credit Failure
Last Name Any - -
DOB Any over 18 years of age - -
DL Number* ABXXXXXX e.g. AB123456 - -
DL Version* 123 003 ID Failure
Card Number 4111111111111111 5000512334750851 Card Failure
Card Holder Any - -
CVC Any - -

*NZ Only


Merchant Account

To check to see all Zip orders processed in your sandbox environment, our sandbox merchant portal is available for access.

Please contact our Integrations Team at integrationsuk@zip.co if your login credentials have not been provided

Login to the Sandbox Zip Merchant Portal