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.
To setup your sandbox account goto Integrations > API. 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 a 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.
Visa
4631770080000000 - Success
4631770030000001 - Declined
4631770070000002 - Insufficient Funds
4631770020000003 - Fraud
4631770060000004 - Processing Error
4631770010000005 - Undetermined
4631770050000006 - Lost
4631770000000007 - Expired
4631770090000008 - [not used]
4631770040000009 - Provider Issue
Mastercard
5162270010000000 - Success
5162270050000001 - Declined
5162270000000002 - Insufficient Funds
5162270090000003 - Fraud
5162270040000004 - Processing Error
5162270080000005 - Undetermined
5162270030000006 - Lost
5162270070000007 - Expired
5162270020000008 - [not used]
5162270060000009 - Provider Issue
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' \
Successful refund payments will be returned with a STATUS 201 response, any failure will generally receive a response of STATUS 4NN.
Visa
4631770080000000 - Success
4631770030000100 - Declined
4631770070000200 - Insufficient Funds
4631770020000300 - Fraud
4631770060000400 - Processing Error
4631770010000500 - Undetermined
4631770050000600 - Lost
4631770000000700 - Expired
4631770090000800 - [not used]
4631770040000900 - Provider Issue
Mastercard
5162270010000000 - Success
5162270050000100 - Declined
5162270000000200 - Insufficient Funds
5162270090000300 - Fraud
5162270040000400 - Processing Error
5162270080000500 - Undetermined
5162270030000600 - Lost
5162270070000700 - Expired
5162270020000800 - [not used]
5162270060000900 - Provider Issue
Successful authorisations will be returned with a STATUS 201 response, any failure will generally receive a response of STATUS 4NN.
Visa
4631770080000000 - Success
4631770070000010 - Declined
4631770060000020 - Insufficient Funds
4631770050000030 - Fraud
4631770090000040 - Processing Error
4631770030000050 - Undetermined
4631770020000060 - Lost
4631770010000070 - Expired
4631770000000080 - [not used]
4631770040000090 - Provider Issue
Mastercard
5162270010000000 - Success
5162270000000010 - Declined
5162270040000020 - Insufficient Funds
5162270030000030 - Fraud
5162270020000040 - Processing Error
5162270050000050 - Undetermined
5162270090000060 - Lost
5162270080000070 - Expired
5162270070000080 - [not used]
5162270060000090 - Provider Issue
To test a successful authorisation that subsequently fails on capture due to fraud:
Visa
4631770020000003 - Success then fail on capture as fraud
Mastercard
5162220020000003 - Success then fail on capture as fraud
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.
Use below CVN to simulate:
Visa/Mastercard
000 - Matched
111 - Failed
222 - Unknown
Use the amount of 60.00 without on-charging fees which will cause our API to not respond for 60 seconds.
Comments
0 comments
Please sign in to leave a comment.