Testing & integration - PaymentRequest API
Create Payment Request - positive test cases
Test Case 1: Create Payment Request - Single Use PayID
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
At minimum, send in: clientID, clientTransactionId, paymentAmount, paymentDescription - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentAmount": 220, "paymentDescription": "Test payment1", ... } }
- Expected outcome: Receive API response 200: Payment Request Created
- Notes: Aligned to configuring Dynamic one-off PayID payments
Test Case 2: multi use PayID, amount set
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
At minimum, send in: clientID, clientTransactionId, multiPayment = TRUE, paymentAmount, paymentDescription - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentAmount": 220, "paymentDescription": "Test payment1", "multiPayment": true, ... } }
- Expected outcome: Receive API response 200: Payment Request Created
- Notes: Aligned to configuring Static recycled PayID payment
Test Case 3: Create payment request - multi use PayID, no amount set
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
At minimum, send in: clientID, clientTransactionId, multiPayment = TRUE, paymentDescription - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentDescription": "Test payment1", "multiPayment": true, ... } }
- Expected outcome: Receive API response 200: Payment Request Created
- Notes: Aligned to configuring Static Open PayID payment
Test Case 4: Create payment request - with payment expiry set
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
At minimum, send in: clientID, clientTransactionId, paymentDescription, paymentExpiryDatetime - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentDescription": "Test payment1", "multiPayment": true, "paymentExpiryDatetime": "2023-11-16T06:32:31.250Z" ... } }
- Expected outcome: Receive API response 200: Payment Request Created
- Notes: Aligned to configuring any PayID payment request where user has a set amount of time to pay befpre payment request expires
Test Case 5: Create payment request - dashboard
- Steps to Complete: Log into Azupay dashboard, click on ‘+ New Payment’ at top RHS of landing page. Fill out fields: Description, Amount, First name, Last name and hit ‘Create’ button.
At minimum, send in: clientID, clientTransactionId, paymentDescription, paymentExpiryDatetime - Expected outcome: Payment landing page with QR code, PayID and amount to pay displayed on the screen
Create Payment Request - exception test Cases
Test Case 6: Create payment request - missing required field
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
Send in: clientID, clientTransactionId, paymentAmount
Omit: paymentDescription - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentAmount": 220, ... } }
- Expected outcome: Receive API response 400: Bad request response
Test Case 7: Create payment request - invalid clientID
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
Send in: clientID, clientTransactionId, paymentAmount, paymentDescription
Test with client ID that is made up and will not be recognised by the Azupay core payments plattform - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentAmount": 220, "paymentDescription": "Test payment1", ... } }
- Expected outcome: Receive API response 400: Invalid request
- Notes: Aligned to configuring Static recycled PayID payment
Test Case 8: Create payment request - negative payment amount
- Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
Send in: clientID, clientTransactionId, paymentAmount, paymentDescription
Send in negative payment amount - Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentAmount": -220, "paymentDescription": "Test payment1", ... } }
- Expected outcome: Receive API response 400: Invalid request
Test Case 9 : Create payment request - duplicate Transaction ID
-
Steps to Complete: Call paymentRequest API with a POST request: https://api-uat.azupay.com.au/v1/paymentRequest
Send in: clientID, clientTransactionId, paymentAmount paymentDescription
Send in duplicated clientTransaction ID -
Sample Request Body:
{ "PaymentRequest": { "clientId": "YourClientID", "clientTransactionId": "TX5346423452345345", "paymentAmount": 220, "paymentDescription": "Test payment1", ... } }
-
Expected outcome: Receive API response 200: [Payload of original payment using this clientTransactionID]. No new payment request is created
Payment Request actionsTest Case 10 : Retrieve existing payment request- Steps to Complete: Call paymentRequest API with a POST request: [https://api-uat.azupay.com.au/v1/paymentRequest
Send in: Payment Request ID - Sample Request Body: URL Query Param: id=1234567890
- Expected outcome: Receive API response: 200 (Payment Request Object)
Test Case 11 : Delete payment request - Steps to Complete: Call paymentRequest API with a POST request: [https://api-uat.azupay.com.au/v1/paymentRequest
-
Steps to Complete: Call paymentRequest API with a DELETE request: [https://api-uat.azupay.com.au/v1/paymentRequest
Send in: Payment Request ID -
Sample Request Body: URL Query Param: id=1234567890
-
Expected outcome: Receive API response: 204 Payment Request Deleted
Receiving Payments
Test Case 12: Receive payment to single use PayID - success
-
Steps to Complete: Navigate to Azupay Testbank - UAT simulated banking environment to make test payments: https://testbank-uat.azupay.com.au/#!/testbank
Enter in PayID from Payment Request created, click Verify button
Enter ‘Amount to pay’ and hit ‘Pay Now’ button
Call paymentRequest API with a GET request to check payment status has changed
https://api-uat.azupay.com.au/v1/paymentRequest
Send in Payment Request ID -
Expected outcome: “Payment has been successfully made” confirmation on Testbank screen
Payment status of payment request changed to ‘COMPLETE’ (view transaction on Azupay dashboard or call paymentRequest API with a GET request to confirm payment request status.
If setup for webhook notifications: webhook will be received with payment status ‘COMPLETE’
When using the PayID Checkout app: Payment received' confirmation screen on Checkout app displayed
Test Case 13: Receive full payment to multi use PayID, amount set
-
Steps to Complete: Navigate to Azupay Testbank - UAT simulated banking environment to make test payments: https://testbank-uat.azupay.com.au/#!/testbank
Enter in PayID from Payment Request created, click Verify button
Enter ‘Amount to pay’ and hit ‘Pay Now’ button
Call paymentRequest API with a GET request to check payment status has changed
https://api-uat.azupay.com.au/v1/paymentRequest
Send in Payment Request ID -
Expected outcome: “Payment has been successfully made” confirmation on Testbank screen
Payment status of payment changed to ‘COMPLETE’ (view transaction on Azupay dashboard or call paymentRequest API with a GET request to confirm payment request status.
If setup for webhook notifications: webhook will be received with payment status ‘COMPLETE’
When using the PayID Checkout app: ‘Payment received’ confirmation screen on Checkout app displayed if exact amount paid
Test Case 14: Receive payment to multi use PayID, amount set - underpayment received
-
Steps to Complete: Navigate to Azupay Testbank - UAT simulated banking environment to make test payments: https://testbank-uat.azupay.com.au/#!/testbank
Enter in PayID from Payment Request created, click Verify button
Enter ‘Amount to pay’ and hit ‘Pay Now’ button
Call paymentRequest API with a GET request to check payment status has changed
https://api-uat.azupay.com.au/v1/paymentRequest
Send in Payment Request ID -
Expected outcome: “Payment has been successfully made” confirmation on Testbank screen
Payment status of payment changed to ‘COMPLETE’ (view transaction on Azupay dashboard or call paymentRequest API with a GET request to confirm payment request status.
If setup for webhook notifications: webhook will be received with payment status ‘COMPLETE’
When using the PayID Checkout app: ‘Incorrect amount - Balance owing’ confirmation screen on Checkout app displayed if underpayment made
Test Case 15: Receive payment to multi use PayID, amount set - overpayment made
-
Steps to Complete: Navigate to Azupay Testbank - UAT simulated banking environment to make test payments: https://testbank-uat.azupay.com.au/#!/testbank
Enter in PayID from Payment Request created, click Verify button
Enter ‘Amount to pay’ and hit ‘Pay Now’ button
Call paymentRequest API with a GET request to check payment status has changed
https://api-uat.azupay.com.au/v1/paymentRequest
Send in Payment Request ID -
Expected outcome: “Payment has been successfully made” confirmation on Testbank screen
Payment status of payment changed to ‘COMPLETE’ (view transaction on Azupay dashboard or call paymentRequest API with a GET request to confirm payment request status.
If setup for webhook notifications: webhook will be received with payment status ‘COMPLETE’
When using the PayID Checkout app: ‘Incorrect amount - amount refunded’ confirmation screen on Checkout app displayed if overpayment made
Test Case 16: Receive payment to multi use PayID, no amount set
-
Steps to Complete: Navigate to Azupay Testbank - UAT simulated banking environment to make test payments: https://testbank-uat.azupay.com.au/#!/testbank
Enter in PayID from Payment Request created, click Verify button
Enter ‘Amount to pay’ and hit ‘Pay Now’ button
Call paymentRequest API with a GET request to check payment status has changed
https://api-uat.azupay.com.au/v1/paymentRequest
Send in Payment Request ID -
Expected outcome: “Payment has been successfully made” confirmation on Testbank screen
Payment status of payment changed to ‘COMPLETE’ (view transaction on Azupay dashboard or call paymentRequest API with a GET request to confirm payment request status.
If setup for webhook notifications: webhook will be received with payment status ‘COMPLETE’
When using the PayID Checkout app: there are no confirmation screens shown if payment made is to a multi-use PayID with no amount set.
[Azupay does not recommend utilising the PayID Checkout app when no amount is set]
Initiating refunds
Test Case 17 : Partial refund API
- Steps to Complete: Call paymentRequest API with a POST request
https://api-uat.azupay.com.au/v1/paymentRequest/refund
Send in: paymentRequestID, refundAmount - Sample Request Body: URL Query Param: id=1234567890&refundAmount=5
- Expected outcome: Receive API response 200: Payment Refunded
Webhooks: RETURN_IN_PROGRESS and RETURN_COMPLETE
Test Case 18 : Full refund API
- Steps to Complete: Call paymentRequest API with a POST request
https://api-uat.azupay.com.au/v1/paymentRequest/refund
Send in: paymentRequestID - Sample Request Body: URL Query Param: id=1234567890
- Expected outcome: Receive API response 200: Payment Refunded
Webhooks: RETURN_IN_PROGRESS and RETURN_COMPLETE
Test Case 19 : Partial refund - Azupay dashboard
- Steps to Complete: Login to Azupay dashboard, navigate to Transactions, ensure Payment Requests is selected in the ‘Transaction type’ dropdown.
Find transaction (search using Client Transaction ID, PayID, Client branch, Date range)
Open accordian for transaction, enter amount to refund in the ‘Refund Amount’ field and click on button ‘Refund payment’, hit ‘Confirm’ to proceed with the partial refund - Expected outcome: Status of payment in the dashboard will change from ‘COMPLETE’ TO ‘RETURN_IN_PROGRESS’ to ‘RETURN_COMPLETE’
Test Case 20 : Full refund - Azupay dashboard
- Steps to Complete: Login to Azupay dashboard
Navigate to Transactions, ensure Payment Requests is selected in the ‘Transaction type’ dropdown
Find transaction (search using Client Transaction ID, PayID, Client branch, Date range)
Open accordian for transaction, click on button ‘Refund payment’, hit ‘Confirm’ to proceed with the full refund - Expected outcome: Status of payment in the dashboard will change from ‘COMPLETE’ TO ‘RETURN_IN_PROGRESS’ to ‘RETURN_COMPLETE’
Updated 3 months ago