A complete replica of our live system is available for testing.
To create your sandbox/test account you will need to login through our portal (https://secure.payadvantage.com.au) and have an approved account. If you have not submitted your business survey and been approved by support, you will not be able access our test environment or generate an API key for authentication.
Once your sandbox account has been created, you will need to sign in to the sandbox web panel using the same username & password you used to login to the live portal.
Note that this credential is set at the time you create the sandbox account. If you have changed your live password since then it may be different to the test password. You can reset the sandbox credentials from the live panel by clicking Reset sandbox credentials from the API setup page.
When creating your sandbox account please keep in mind the sandbox/test environment is an exact replica of our live system. However, it uses a separate portal and API endpoint to our live environment. This means you MUST create test credentials and also register your IP address in the test web panel.
Test/Sandbox Endpoint URL
https://api.test.payadvantage.com.au/v3
Once you are finished testing you can then create live credentials and also register your API's IP address in the live system.
To assist with testing, the sandbox environment simulates various inter-bank processing tasks including processing of debit batches and dishonouring debit instructions.)
See Direct Debit Settlement & Clearance Times for information relating to processing times for the live environment.
The sandbox system will mark debit batches as "Processed" approximately every 10 minutes.
Dishonours are simulated by mapping a fail code to the debit instruction amounts 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).
- An instruction with an amount of $10.00 will not return an error
- An instruction with an amount of $10.05 will fail with the dishonour code 5
The sandbox environment accepts a number of test credit cards which will return a specific result. Test cards will return a different result based on the card number being used. Each charge request will experience a random delay of anywhere between 1-4 seconds to simulate live processing times.
When charging credit cards, the cards first need to be tokenised using the '.../v3/credit_card' endpoint. This will return a {credit_card_code} which is used in the method to charge a credit card.
When using the charge method, posting an ExternalID in the request body is a useful way to append an identifier from your system that can be used to query a charge at a later date.
Any valid card number not in the below list will return a successful response.
# Method for charging a credit card
curl -L -X POST '.../v3/{credit_card_code}/charges' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-d '{
"Amount": 123.45,
"Description": "Crate of Apples",
"OnchargeFees": true,
"ExternalID": "ABC1234",
"CVN": null,
"ReceiptEmail": "force_send"
}'
Never store the CVN. This should always be set to null if the card is not present.
Successful payments will be returned with a STATUS 201 response, any failure will generally receive a response of STATUS 4NN.
Successful Response
Visa: 4200000000000000
MasterCard: 5520000000000000
{
"ChargeStatus": "approved",
"Description": "Test payment",
"ExternalID": "12",
"CreditCard": {
"Code": "ABC123"
},
"Payment": {
"Code": "B44444",
"Amount": 126.00,
"AmountIncFees": 126.00,
"FailReason": null,
"FailCode": null,
"DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null,
"PaymentType": "realtime_credit_card",
"SettlementCode": null
}
}
Insufficient Funds
Visa: 4000000000000002
MasterCard: 5510000000000002
{
"ChargeStatus": "declined",
"Description": "Test payment",
"ExternalID": "12",
"CreditCard": {
"Code": "ABC123"
},
"Payment": {
"Code": "B44444",
"Amount": 126.00,
"AmountIncFees": 126.00,
"FailReason": "Failed - Insufficient Funds",
"FailCode": "insufficient_funds",
"DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null,
"PaymentType": "realtime_credit_card",
"SettlementCode": null
}
}
Card Declined
Visa: 4100000000000001
MasterCard: 5560000000000001
{
"ChargeStatus": "declined",
"Description": "Test payment",
"ExternalID": "12",
"CreditCard": {
"Code": "ABC123"
},
"Payment": {
"Code": "B44444",
"Amount": 126.00,
"AmountIncFees": 126.00,
"FailReason": "Failed - Card Declined",
"FailCode": "delined",
"DateClears": null,
"DatePaid": "2018-09-03T11:04:07.52",
"DateSettled": null,
"PaymentType": "realtime_credit_card",
"SettlementCode": null
}
}
Suspected Fraud
Visa: 4900000000000003
MasterCard: 5550000000000003
{
"ChargeStatus": "declined",
"Description": "Test payment",
"ExternalID": "12",
"CreditCard": {
"Code": "ABC123"
},
"Payment": {
"Code": "B44444",
"Amount": 126.00,
"AmountIncFees": 126.00,
"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
{
"ChargeStatus": "declined",
"Description": "Test payment",
"ExternalID": "12",
"CreditCard": {
"Code": "ABC123"
},
"Payment": {
"Code": "B44444",
"Amount": 126.00,
"AmountIncFees": 126.00,
"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
{
"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. Below is the method used to check the if the charge against this card has been updated or resolved.
curl -L -X GET '.../v3/credit_cards/ABC123/charges' \
-H 'Authorization: Bearer {{"access_token"}}' \
-H 'Content-Type: application/json' \
Provider Issue
Visa: 4300000000000009
MasterCard: 5570000000000009
{
"ChargeStatus": "provider issue",
"Description": "Test payment",
"ExternalID": "12",
"CreditCard": {
"Code": "ABC123"
},
"Payment": null
}
Successful refund payments will be returned with a STATUS 201 response, any failure will generally receive a response of STATUS 4NN.
Successful Refund
Visa: 4900000000000011
MasterCard: 5550000000000011
{
"Status": "processed",
"Payment": {
"Code": "B44444"
},
"DateCreated": "2020-03-06T15:03:15.7204982+11:00",
"Amount": 126.00,
"ExternalID": "12",
"Code": "C66666"
}
Failed Refund - Processing Error
Visa: 4600000000000022
MasterCard: 5540000000000022
{
"ErrorCode": "internal_error",
"Messages": [
"Failed - Processing Error"
]
}
Failed Refund - Expired Card
Visa: 4300000000000033
MasterCard: 5570000000000033
{
"ErrorCode": "internal_error",
"Messages": [
"Failed - Card is expired"
]
}
Processing
Visa: 4000000000000044
MasterCard: 5510000000000044
{
"Status": "undetermined",
"Payment": {
"Code": "B44444"
},
"DateCreated": "2020-03-06T15:03:15.7204982+11:00",
"Amount": 126.00,
"ExternalID": "12",
"Code": "C66666"
}
Provider Issue
Visa: 4200010000000066
MasterCard: 5570000000000066
{
"ErrorCode": "internal_error",
"Messages": [
"Provider Issue"
]
}
Comments
0 comments
Please sign in to leave a comment.