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
Element Meaning 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 breakcondition is met. (e.g., Application Cancelled means the workflow ends here).
Color/Shading Symbolizes Red-toned boxes Highlights 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, orCapture Order), please refer to the tables on the API Methods page.
Reading the state diagram
Element Meaning A Box Represents the application's status, captured by the Statusproperty on theOrderobject.A Line Shows 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 LinesHighlights termination states (such as RejectedorCancelledstates, 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.
| Event | Description |
|---|---|
Initiated | Sent when a merchant creates an application via CreateOrder. |
Approved | Sent when an application has been approved. |
ApprovedAmountUpdated | Sent 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. |
Rejected | Sent when an application has been rejected. |
UnderReview | Sent 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. |
ReadyForCapture | Sent when the applicant has signed the application contract, signaling that the goods or services can be delivered. |
Captured | Sent when Svea has confirmed the merchant's capture request. |
CaptureReverted | Contact 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. |
Completed | Sent when the payout to the Merchant has been scheduled. This means the application has been approved, signed, and captured. |
Cancelled | Sent 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.
| Status | Description |
|---|---|
Created | Order created and invitation link sent to the applicant. |
Initiated | The applicant has accepted the invitation, and the application has been created. The system is awaiting an initial decision. |
UnderReview | The application is being manually reviewed and is pending a final decision. A review will always result in the application being either Approved or Rejected. |
Approved | The application has been approved. |
Rejected | The application has been denied. |
ReadyForCapture | The applicant has signed the application, and it is ready to be captured by the merchant. |
CaptureRequested | The merchant has requested a capture, and the system is awaiting confirmation from Svea. |
Captured | Svea has confirmed the capture. |
Completed | The application has successfully reached the end of its lifecycle. |
Cancelled | The application has been cancelled. |