Skip to main content
Version: Webel

[EMD Payment Feature]

Author(s)

  • Bishwanath Jana
  • Dipak Mourya

Last Updated Date

[2024-12-17]


SRS References

  • 2.1.2
  • 2.1.3

Version History

VersionDateChangesAuthor
1.02024-12-17Initial draftBishwanath Jana
1.02024-12-17Initial draftDipak Mourya
............

Feature Overview

Objective:
The purpose of this feature is to introduce a new EMD amount option on the Receipt Page and BRS Page, allowing users to manually add EMD payments. Unlike the previous process where BRVs and corresponding receipts were generated automatically during customer onboarding, users will now need to manually add the EMD amount, ensuring greater control and flexibility over the BRV creation process.

Scope:

  • Add an EMD amount input option on the Receipt Page and BRS Page.
  • Allow users to manually add the EMD amount when processing payments.
  • Disable the automatic creation of BRVs and EMD receipts during the customer onboarding process.
  • Users will need to manually verify and create the BRV associated with the EMD amount.
  • Update onboarding flow to reflect the manual steps for EMD payment processing.

Dependencies:

  • Integration with existing BRS Page and Receipt Page components.
  • Dependency on the customer onboarding flow for updating manual BRV creation steps.

Requirements

  1. The same API used for payment initiation (e.g., paymentInitiate and cheque) can be reused for this feature.
  2. New API Required: An API to fetch the EMD amount based on the application.

Design Specifications

(Provide detailed design specifications, including UI/UX designs, API interfaces, and any other relevant architectural details.)

  • UI/UX Design:
    The UI for this feature will be almost similar to the SD amount section, as shown in the picture provided below. alt text

  • Data Models:
    (Detail the data structures, including database schemas or objects.)

    public record EMDPayment
    {
    public required string ApplicationNumber { get; set; }
    public required string CustomerId { get; set; }
    public required PaymentType PaymentType { get; set; }
    public DateTime? PostingDate { get; set; }
    public DateTime? PaymentDate { get; set; }
    public string? BankCode { get; set; }
    public string? RefNumber { get; set; }
    public DateTime? ChequeDate { get; set; }
    }

API Interfaces

EndpointMethodParametersResponseResponse Status Codes
emd/amountGETapplicationId (required, string): Unique Application IDEMDAmountResponse200, 404, 500
initiate/emdpaymentPOSTEMDPayment (required, object): EMD payment detailsTransactionResponse200, 400, 500

  • Third-Party Integrations:
    (List any third-party services or tools that need to be integrated.)

    • None specified for this feature.

  • Workflow:
    (Describe the end-to-end workflow of the feature, detailing how different components interact, including the sequence of events, data flow, and the user journey.)
  1. Endpoint: emd/amount

    • The user provides an applicationId to retrieve the EMD amount.
    • The API fetches the EMD amount corresponding to the given applicationId from the database.
    • The API responds with EMDAmountResponse containing the amount or an appropriate error if the applicationId is not found.
  2. Endpoint: initiate/emdpayment

    • The user provides EMD payment details as part of the request body using the EMDPayment structure.
    • The API validates the incoming request and maps the data to the required database fields.
    • The API calls the existing DAL method AddPaymentForBookingRequest, modified to accept the updated fields, to insert the EMD payment data into the Payments table.
    • On successful completion, the API returns a TransactionResponse with a success message and transactionId.
    • If an error occurs (e.g., missing or invalid data), the API responds with an appropriate error message and status code.

Development Tasks & Estimates

NoTask NameEstimate (Hours)DependenciesNotes
1Implement UI screen for EMD payment4 hoursUI DesignAny notes here
2API Integration2 hoursDependency 2Any notes here
3Testing EMD payment from both the screen1.5 hoursDependency 3Any notes here
4Create GET API to fetch EMD amount by applicationId3 hoursDB changes for SPEnsure SP fetches correct EMD data
5Update initiate/cheque API to include EMD payment flag and manual handling3 hoursExisting APIsExtend payload and handle EMD logic
6Stored Procedure Changes3 hoursDB designAdd new SP for fetching EMD amount
7Unit and Integration Testing3 hoursUpdated APIsVerify functionality
8Testing EMD payment overall2 hoursAll DependenciesEnsure E2E flow works correctly
9Total21.5 hours

Testing & Quality Assurance

(Outline the testing strategy and quality assurance measures for the feature.)

  • Unit Tests:

    • Validate the emd/amount API fetches the correct EMD amount based on applicationId.
    • Verify initiate/cheque API processes EMD payments correctly when isEMDPayment is set to true.
    • Test failure scenarios, including invalid applicationId and missing required parameters.
  • Integration Tests:

    • End-to-end flow for fetching the EMD amount and processing an EMD payment.
    • Verify database integration for the stored procedure changes fetching EMD data.
    • Ensure proper handling of responses and HTTP status codes for both APIs.
  • Acceptance Criteria:

    • The EMD amount is fetched correctly from the database using the emd/amount API.
    • The initiate/cheque API successfully processes EMD payments when the EMD flag is enabled.
    • Errors are handled gracefully for invalid or missing inputs.
    • Manual EMD payment option reflects accurately on the UI (Receipt Page and BRS Page).
  • Testing Tools:
    (List any tools that will be used for testing.)


Deployment Considerations

(Describe any deployment considerations, including environment configurations, feature toggles, or migration steps.)

  • Configuration Changes:
    (Detail any configuration changes required for this feature.)

  • Rollout Plan:
    (Outline the plan for rolling out the feature, including any phased releases.)


Risks & Mitigations

(Identify potential risks and the strategies to mitigate them.)

RiskImpactLikelihoodMitigation Strategy
Risk 1HighMediumStrategy for mitigating Risk 1
Risk 2MediumHighStrategy for mitigating Risk 2
............

Review & Approval

(Include a section for review and approval by stakeholders.)

  • Reviewer:
    (Name and role of the person reviewing the document.)

  • Approval Date:
    (Date when the feature is approved for development.)


Notes
(Add any additional notes or considerations related to the feature development here.)