We’re launching a checkout API for our payment gateway and need a fast, reliable flow where merchants receive an immediate “accepted” response (<200ms) even if the bank takes longer. Please design and implement a service that validates requests (schema, HMAC signature, basic rules), returns a 202 with a transactionId and status=PENDING, and pushes the work to a background queue so workers can call the acquirer asynchronously. Provide a webhook where the acquirer posts final outcomes and a polling endpoint for merchants to check status. Persist the final state in MySQL. To prevent double-charging, enforce idempotency for 5 minutes in Redis (e.g., using orderId/transactionId). Core endpoints: POST /v1/payments (HMAC), POST /v1/payments/callbacks/acquirer-x (IP-whitelisted), GET /v1/payments/{transactionId} (JWT). Stack: NestJS with RabbitMQ and Redis.