Skip to main content

Application Workflow

This document outlines the core workflow for a financing application using our API.

The goal of this integration is to achieve the Completed application state, signaled by the Completed event. This signifies that the application has been fulfilled and that Svea's payout to the Merchant has been scheduled.


The Sequence Diagram

The diagram below maps the API calls and event notifications (messages) between the Applicant, Merchant, and Svea throughout the application lifecycle. It is the primary reference for implementation.

Reading the sequence diagram

ElementMeaning
alt
(Alternative)
Represents a mandatory choice between two or more different execution paths. One of the options must be followed. (e.g., Direct approval OR Direct rejection OR Requires manual review)
opt
(Optional)
Represents a path that may or may not be executed. The main flow continues regardless. (e.g., An amount update may happen, or it may be skipped).
breakRepresents an exit condition. The sequence stops processing the current flow and terminates when the break condition is met. (e.g., Application Cancelled means the workflow ends here).
Color/ShadingSymbolizes
Red-toned boxesHighlights termination or exit events (e.g., Rejected or Cancelled). These are points where the primary successful workflow ends.

Financing Application Lifecycle (State Diagram)

While the Sequence Diagram shows the actors and API calls, the following State Diagram is useful for visualizing the overall valid lifecycle and primary state changes of an application object. This view is simplified to illustrate the core flow and therefore omits some less common termination paths.

Note: For the strict rules on which API methods are allowed in each status (e.g., when you can Update Amount, Cancel Order, or Capture Order), please refer to the tables on the API Methods page.

Workflow state diagram

Reading the state diagram

ElementMeaning
A BoxRepresents the application's status, captured by the Status property on the Order object.
A LineShows the action or decision that leads to the next status.
-> eventName (on a line)Indicates that an event notification (e.g., -> event Initiated) is sent at the moment this status transition occurs.
Red-toned Boxes
and Lines
Highlights termination states (such as Rejected or Cancelled states, which are colored orange) and transitions (red lines) that lead to the termination of the primary successful workflow.

List of Events

These events represent the specific messages or notifications sent by Svea to your system throughout the application lifecycle. They are the key triggers for your required actions, such as calling Capture order.

EventDescription
InitiatedSent when a merchant creates an application via CreateOrder.
ApprovedSent when an application has been approved.
ApprovedAmountUpdatedSent when the approved amount is lower than the requested amount. An Approved callback will follow this event. You must either update the order amount to the new ApprovedAmount or cancel the order.
RejectedSent when an application has been rejected.
UnderReviewSent when Svea will review the application and request additional information from the applicant. A review will always result in either an Approved or Rejected status eventually.
ReadyForCaptureSent when the applicant has signed the application contract, signaling that the goods or services can be delivered.
CapturedSent when Svea has confirmed the merchant's capture request.
CaptureRevertedContact Svea. This indicates that Svea has investigated and reverted the capture since the delivery could not be confirmed. Do not proceed with any additional actions on this order unless you have confirmed that the delivery has taken place, at which point you can attempt to Capture again.
CompletedSent when the payout to the Merchant has been scheduled. This means the application has been approved, signed, and captured.
CancelledSent when Merchant or Svea cancels the order.

List of Statuses

The statuses below represent the current, persistent state of the financing application. This is the value captured by the Status property on the order object.

StatusDescription
CreatedOrder created and invitation link sent to the applicant.
InitiatedThe applicant has accepted the invitation, and the application has been created. The system is awaiting an initial decision.
UnderReviewThe application is being manually reviewed and is pending a final decision. A review will always result in the application being either Approved or Rejected.
ApprovedThe application has been approved.
RejectedThe application has been denied.
ReadyForCaptureThe applicant has signed the application, and it is ready to be captured by the merchant.
CaptureRequestedThe merchant has requested a capture, and the system is awaiting confirmation from Svea.
CapturedSvea has confirmed the capture.
CompletedThe application has successfully reached the end of its lifecycle.
CancelledThe application has been cancelled.