Asynchronous installment plan creation with immediate draft response

Summary

The POST /installment-plans endpoint now creates installment plans asynchronously, returning immediately with a DRAFT plan while finalization happens in the background.

Updated Endpoints

  • POST /installment-plans
    • Behavior changed: The endpoint now returns 201 Created immediately with the plan in DRAFT status.
    • Heavy operations such as cancelling old plans, creating payment intents, and activating the plan are processed asynchronously.
    • Clients should poll the resource to detect the plan's transition from DRAFT to SCHEDULED.
    • Introduced the salt_id field to support deduplication of requests; retries with the same salt_id return the existing in-progress plan.
    • If salt_id is omitted, it is derived from a SHA256 hash of sorted loan_ids.
    • API schema updated to include the optional salt_id property.

No new or deleted endpoints in this release.