Idempotency Implementation for Vipps Payment

Job ID: 38256386

Budget: $100 – $150 USD

We need a developer to implement idempotency in our e-commerce system to manage order creation and payment processes efficiently. The goal is to ensure that duplicate orders and payments are handled correctly to improve reliability and user experience.

Requirements:

Idempotency for Order Creation:
1. Implement logic to check for existing orders using an idempotency key.
2. If a duplicate request is detected, the server should return a cached response.
3. If no duplicate is found, the server processes and creates a new order.

Idempotency for Payment Initiation:
1. After order creation (new or from cache), initiate or check the status of the payment.
2. Handle payment retries only if necessary (e.g., previous attempts failed or expired, but not if already successfully processed).

Deliverables:
1. Update the server logic to handle idempotency checks for both orders and payments.
2. Ensure robust handling of duplicate orders and prevent multiple charge attempts for the same order.
3. Provide clear responses to the client based on the action taken (e.g., order creation, payment initiation, cached responses).

Check image for a sequence diagram suggestion. Note that the diagram is only a suggestion and the developer should evaluete it.

API management expertise is required.