To enable 3rd parties the ability to test their integrations with PartPay, we provide some test enpoints 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.

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