EnKash Developer Portal
Home
Home
Login
  1. UPI Autopay
  • Back to home
  • APIs - Payment Gateway
  • Authorization
    • Generate Authorization Token
    • Payment Modes Details
  • Order
    • UPI Intent Links
    • Get Dynamic UPI QR
    • Create Order
    • Get Order Status
    • Get Order By Merchant Order Id
    • Get BNPL Payment Methods
    • Search Order
  • Payment
    • Get Transaction Status
    • Submit Payment Request
    • Payment Notify Request
    • Verify UPI VPA
    • Validate OTP
    • Get UPI Transaction Status
    • Resend OTP
    • Search Transaction
  • Refund
    • Refund
    • Get Refund Transaction Status
    • Refund Webhook Request
  • Settlement
    • Get Settlement Payout By ID
    • Search Settlement Payouts
  • Split Settlement
    • Get All Split Settlement Account
    • Deactivate Split Settlement Account
    • Submit Payment with Split Details
    • Activate Split Settlement Account
    • Edit Or Deferred Split Settlement
    • Create Split Settlement Account
    • Update Split Settlement Account
    • Get IntentLink/QrCode with Split details
  • E-Commerce Plugins
  • UPI QR
    • Create UPI QR
    • Get UPI QR
    • Search UPI QR
    • Create Customer
    • Search Customer
    • Cancel UPI QR
  • UPI Autopay
    • Mocking & Simulator (UAT)
    • Create UPI Mandate
      POST
    • Update UPI Mandate
      PATCH
    • Revoke UPI Mandate
      PATCH
    • Get UPI Mandate
      GET
    • UPI Mandate Callback
      POST
    • Mandate Pre-debit Notification
      POST
    • Execute Mandate Debit
      POST
    • Mandate Debit Callback
      POST
  • Payment Links
    • Payment Link APIs
    • Create Payment Link
    • Get Payment Link Details
    • Delete Payment Link
    • Webhook Request
  • E-Collect
    • Create Virtual Account
    • View Virtual Account by Id
    • Update Virtual Account
    • View Virtual Account by Account Number
    • Search Virtual Account
    • Search Transactions
    • View Virtual Account by Customer Reference Id
  1. UPI Autopay

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 VPASimulated callback status
user@successACTIVE
user@failREJECTED
Flow: create with VPA → wait ≤ ~1–2 minutes → receive merchant webhook with ACTIVE or REJECTED.

2. Execute amount rule (mock)#

Execute amountResult status
>= 100SUCCESS
< 100FAILED
UMN format on mock: MOCK-UMN-<20 random characters>.

3. UPI Autopay simulator UI#

Base: https://checkout-uat-v2.enkash.in/v1/upi-autopay-simulator
Link 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#

ScenarioGuidance
Validation errorsMissing referenceId, invalid dates, blank payer VPA on API → fix request; check response_message
Duplicate referenceIdUse a new unique reference per mandate
Amount rule mismatchEXACT execute must match; MAX must be ≤ mandate amount
Expired auth windowRe-create mandate; increase expiry minutes if needed
Webhook missedGET by referenceId; reconcile by umn
Mock execute < 100Will fail by design; use ≥ 100 for success tests
Modified at 2026-07-17 15:45:42
Previous
UPI Autopay
Next
Create UPI Mandate
Built with