Mocking & Simulator (UAT)
Use this section to complete integration without a live bank.1. Mock VPA auto-resolution#
MockMandateSimulationCron runs about every minute (when MOCK_MANDATE_SIMULATION_CRON is enabled). It picks mock mandates created in the last 5 minutes with these payer VPAs:| Payer VPA | Simulated callback status |
|---|
user@success | ACTIVE |
user@fail | REJECTED |
Flow: create with VPA → wait ≤ ~1–2 minutes → receive merchant webhook with ACTIVE or REJECTED.2. Execute amount rule (mock)#
Execute amount | Result status |
|---|
>= 100 | SUCCESS |
< 100 | FAILED |
UMN format on mock: MOCK-UMN-<20 random characters>.3. UPI Autopay simulator UI#
Base: https://checkout-uat-v2.enkash.in/v1/upi-autopay-simulatorLink pattern: https://checkout-uat-v2.enkash.in/v1/upi-autopay-simulator/{umn}
On mock create for CHECKOUT (no payer VPA), paymentDetail.checkoutUrl may already be this simulator link.
In the UI, approve / reject the mandate.
APPROVE / SUCCESS → ACTIVE; REJECT → REJECTED.
4. End-to-end: happy path (mock)#
1.
Create mandate (API) with payer.vpa = user@success, unique referenceId, firstDebitAmount valid (e.g. 1 with MAX).
2.
Poll GET or wait for webhook → ACTIVE (within ~1–2 minutes).
3.
Confirm optional auto first debit / webhook with execute status.
4.
For a later cycle: POST /notify with amount ≥ 100 if you will execute next on mock.
5.
POST /execute with amount >= 100 → expect SUCCESS + webhook.
5. End-to-end: reject path (mock)#
1.
Create with payer.vpa = user@fail.
2.
Wait for webhook / GET → REJECTED.
3.
Do not notify/execute; create a new mandate for retry.
6. End-to-end: simulator approve (no VPA)#
1.
Create with mandateCreationType = CHECKOUT (or flow that returns simulator URL), no special VPA.
2.
Open checkoutUrl / simulator URL with UMN.
3.
Click Approve → expect merchant webhook ACTIVE.
4.
Continue notify → execute as above.
7. Error handling & best practices#
| Scenario | Guidance |
|---|
| Validation errors | Missing referenceId, invalid dates, blank payer VPA on API → fix request; check response_message |
Duplicate referenceId | Use a new unique reference per mandate |
| Amount rule mismatch | EXACT execute must match; MAX must be ≤ mandate amount |
| Expired auth window | Re-create mandate; increase expiry minutes if needed |
| Webhook missed | GET by referenceId; reconcile by umn |
| Mock execute < 100 | Will fail by design; use ≥ 100 for success tests |
Modified at 2026-07-17 15:45:42