Sandbox Environment & Transaction Simulation

A fully functioning Sandbox environment is available for testing which consists of a

  1. test web panel
  2. test API and pre-filled test data.

To create your sandbox account you will need to login to the live client portal, go to sandbox and create your sandbox account. Once created you need to login to the sandbox web client (using the same username/password as live) to generate a set of sandbox API keys.

To assist with testing, the sandbox environment simulates various inter-bank processing tasks including processing of debit batches and dishonouring debit instructions.

 

Special Handling for Batch Debits

 

See Direct Debit Settlement & Clearance Times for information relating to actual processing times for the live environment.

The simulation system will mark debit batches as "Processed" approximately every 10 minutes.

Dishonours are simulated by mapping a fail code to the debit instruction amount decimal value. This process occurs automatically after a debit batch is processed.

 

For debits from a bank account: amounts ending in "0" never fail. Amounts ending with "1" to "9" will dishonour based on the industry wide failure codes (see Payment Dishonour Codes/Reasons). Credit Cards fail based on the test cards below.

 

For example:

An instruction with an amount of $10.00 will not fail

An instruction with an amount of $10.05 will fail with the dishonour code 5 (No account or incorrect account number)

 

Special Handling for Credit Cards

To assist with testing, the sandbox environment accepts a number of test credit cards which will return a specific result. 

Below is a list of credit card numbers that can be used to simulate different success and error API responses. Each charge request will experience a random delay of 1-4 seconds to simulate a live environment.

For each scenario, you will first need to post the required credit card number to the /credit_card end point and then use the code received to replace {credit_card_code} in the URL below. As noted previously, the ExternalID value can be used to attach an identifier that your system is aware of to the credit card charge attempt, this can help facilitate querying charges at a later date.

Any valid card number not in the below list will return a successful result.

 

POST: /credit_cards/{credit_card_code}/charges
{
    "Amount" : 123.45,
    "Description" : "Weekly Fee",
    "OnchargeFees" : true (default is false),
    "ExternalID" : “Your system ID”,
    "CVN" : null (set to null if card not present. NEVER STORE THIS!)
}

 

Successful Response

Visa: 4200000000000000
MasterCard: 5520000000000000

Response:

HTTP Status 200
{ "ChargeStatus": "approved", "Description": "Test payment", "ExternalID": "12", "CreditCard": { "Code": "ABC123" }, "Payment": { "Code": "B44444", "Amount": 126, "AmountIncFees": 126, "FailReason": null, "FailCode": null, "DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null, "PaymentType": "realtime_credit_card",
"SettlementCode": null } }

 

Card Declined

Visa: 4000000000000002
MasterCard: 5510000000000002

Response:

HTTP Status 200
{ "ChargeStatus": "declined", "Description": "Test payment", "ExternalID": "12", "CreditCard": { "Code": "123ZZZ" }, "Payment": { "Code": "123ABC", "Amount": 2, "AmountIncFees": 2, "FailReason": "Failed - Card Declined", "FailCode": "declined", "DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null, "PaymentType": "realtime_credit_card",
"SettlementCode": null } }

 

Insufficient Funds

Visa: 4100000000000001
MasterCard: 5560000000000001

Response:

HTTP Status 200
{ "ChargeStatus": "declined", "Description": "Test payment", "ExternalID": "12", "CreditCard": { "Code": "123ZZZ" }, "Payment": { "Code": "123ABC", "Amount": 2, "AmountIncFees": 2, "FailReason": "Failed - Insufficient Funds", "FailCode": "insufficient_funds", "DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null, "PaymentType": "realtime_credit_card",
"SettlementCode": null } }

 

Suspected Fraud

Visa: 4900000000000003
MasterCard: 5550000000000003

Response:

HTTP Status 200
{ "ChargeStatus": "declined", "Description": "Test payment", "ExternalID": "12", "CreditCard": { "Code": "123ZZZ" }, "Payment": { "Code": "123ABC", "Amount": 2, "AmountIncFees": 2, "FailReason": "Failed - Suspected fraud", "FailCode": "suspected_fraud", "DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null, "PaymentType": "realtime_credit_card",
"SettlementCode": null } }

 

Processing Error

Visa: 4800000000000004
MasterCard: 5500000000000004

Response:

HTTP Status 200
{ "ChargeStatus": "declined", "Description": "Test payment", "ExternalID": "12", "CreditCard": { "Code": "123ZZZ" }, "Payment": { "Code": "123ABC", "Amount": 2, "AmountIncFees": 2, "FailReason": "Failed - Processing Error", "FailCode": "processing_error", "DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null, "PaymentType": "realtime_credit_card",
"SettlementCode": null } }

 

Undetermined Error

Visa: 4700000000000005
MasterCard: 5590000000000005

Response:

HTTP Status 502
{ "ChargeStatus": "undetermined", "Description": "Test payment", "ExternalID": "12", "CreditCard": { "Code": "ABC123" }, "Payment": null }

 

An undetermined error occurs on the rare instance where we can not confirm if the issuing bank has properly received the request or if the charge has been approved or declined. If an undetermined response is received you should NOT reattempt to charge the card until a valid determination is received by querying the response credit card code until a valid final result is received.

The test system has been configured to update an undetermined response to a valid response after 5 minutes.

For example, below is the request that post would be used to check the above credit card token for an updated response.

GET: /credit_cards/ABC123/charges
Have more questions? Submit a request

Comments