System Integration
Terminology
- Voucher: Payment Request in your system.
- PR: Payment Request in marketpe system.
Test 0: Voucher Creation Flow
How voucher creation happens in your system?
From your system UI, try creating 4 vouchers:
| # | Account Number | IFSC Code |
|---|---|---|
| 1 | 123 | YESB0000262 |
| 2 | 026291800001191 | YESB0000262 |
| 3 | 026291800001191 | YESB0000262 |
| 4 | 7766666351000 | YESB0000001 |
Expectation
To understand the steps and approval process that happens in your system.
Test 1: Handle payment/create API Expected Error
Try creating a marketpe PR with an invalid bank account number like 123.
Expectation
Your system should indicate that PR was not created in marketpe.
Test 2: Create PR Successfully
From your system UI, try creating 3 marketpe PR:
| # | Account Number | IFSC Code |
|---|---|---|
| 1 | 026291800001191 | YESB0000262 |
| 2 | 026291800001191 | YESB0000262 |
| 3 | 7766666351000 | YESB0000001 |
Expectation
PRs should be created in marketpe successfully.
Test 3: Voucher is not editable
Expectation
Vouchers should not be editable.
Test 4: Ensure Freezing Before Calling payment/create API
Expectation
Your system freezes the payment (no edits allowed by anyone) before calling payment/create API. Only unfreezes after an expected error is returned from payment/create API.
This prevents the following race conditions:
Race Condition 1: Concurrent Edit
User1 clicked 'Create PR in marketpe'. Your backend started processing this request but before calling payment/create API, User2 edited the amount. Now the PR got created in marketpe with amount2.
Race Condition 2: Unexpected Error
User1 clicked 'Create PR in marketpe'. Your backend got an unexpected error (timeout, connection drop) when calling payment/create API. Suppose PR actually got created in marketpe but your system is allowing edits and still shows 'Create PR in marketpe' button.
Test 5: Execute marketpe PRs
Test: Execute 2 PRs. 1 for 026291800001191 and 1 for 7766666351000.
Expectation: Both should show as PROCESSING in marketpe and after 2-5 min one of them should show as COMPLETED and other as FAILED.
Test 6: Handle COMPLETED status from marketpe app
Test: Wait for PR in Test 5 to reach COMPLETED state.
Expectation
Status/utr correctly updated in your system.
Test 7: Ensure clientPaymentId Uniqueness
Does your system already have a clientPaymentId in the database, before the user even clicks 'Create PR in marketpe' button?
If not, you must ensure you do not in any case generate 2 clientPaymentId for the same request.
Race Condition Warning 1
User1 and User2 both clicked 'Create PR in marketpe' button for the same voucher. Your system dynamically generated 2 clientPaymentId against same voucher and called marketpe API 2 times. This will create 2 PRs in marketpe.
Race Condition Warning 2
User1 clicked 'Create PR in marketpe' button for a voucher. Your system dynamically generated 1 clientPaymentId but got connection dropped error. When you retry the request and send same clientPaymentId it is safe. But if you dynamically generate a new clientPaymentId it will create a 2nd PR in marketpe.
Test 8: Handle FAILED status from marketpe app
Test: Create and execute a PR for '7766666351000', 'YESB0000001'
Expectation
Status correctly updated in your system.
How do you handle FAILED status? Do you allow reset and execute?
NOTE: Failed is not a terminal state, it can be reset and re-executed from app. So when you call payment/get api a PR in FAILED status can later become NEW or COMPLETED.
Test 9: Handle PR delete from marketpe app
Test: Cancel a PR from marketpe app.
Expectation
Status correctly updated in your system.
NOTE: CANCELLED is a terminal state, after this no further changes can be made to the PR in marketpe.
Test Document
Detailed testing document:
📄 marketpe-uat-integration-tests.docxLast updated on