Skip to main content

OrderResponse Schema

The OrderResponse is the main response type in the API. It contains a retrieved Order entity.

Field NameDescriptionTypeAdditional Information
orderIdSvea's unique ID for the order.string ($uuid)Required.
clientIdThe unique ID of the client.string ($uuid)Required.
refNoThe client's own unique reference number for the order.stringRequired. min: 1, max: 14.
amountThe current amount of the order.doubleRequired. Non-decimal (e.g., 55000.00 is 55 000 SEK).
originalAmountThe initial amount the order was created for.doubleRequired. Subsequent updates cannot exceed this.
approvedAmountThe maximum approved amount after review.doubleNullable. Updates cannot exceed this value once set.
currencyThe currency code.stringRequired. Example: SEK.
applicantThe applicant's contact and ID information.ObjectRequired. See schema for details.
selectableCampaignsThe list of campaigns available to the applicant.array of integersNullable.
selectedCampaignThe ID of the campaign selected by the applicant.integerNullable.
callbackUrlThe configured URL for order status updates.stringRequired.
createDateTimestamp of the order creation.string ($date-time)Required. ISO 8601 format.
statusThe current status of the order.string (enum)Required. Values: Created, Initiated, Approved, Rejected, UnderReview, ReadyForCapture, CaptureRequested, Captured, Completed, Cancelled.
orderInfoCustom merchant-specific metadata.ObjectNullable. See schema for details.
countryThe client's country.stringRequired. Automatically set. Example: SE.

Applicant (Nested Object)

This object contains the identifying information for the customer.

Field NameDescriptionTypeAdditional Information
nationalIdThe customer's national identification number.stringRequired. Example: 199601121768.
phoneNumberThe customer's mobile number.stringRequired. Example: +46712345678.

OrderInfo (Key-Value Map)

The orderInfo field is a free-form JSON object (often called a Map or Dictionary). It is designed to hold arbitrary string keys and string values, providing a flexible way to attach merchant-specific data to an order.

Structure:

{
"keyName1": "stringValue1",
"keyName2": "stringValue2"
}

Example JSON Body

This section shows the structure of a complete OrderResponse, including the nested applicant object and the dynamic orderInfo map.

{
"orderId": "b8a8b8b8-c1c1-d2d2-e3e3-f4f4f4f4f4f4",
"clientId": "a1b1c1d1-e2f2-3g4h-5i6j-7k8l9m0n1o2p",
"refNo": "AB-10001",
"amount": 55000,
"originalAmount": 55000,
"approvedAmount": null,
"currency": "SEK",
"applicant": {
"nationalId": "199601121768",
"phoneNumber": "+46712345678"
},
"selectableCampaigns": [
100001,
100002
],
"selectedCampaign": null,
"callbackUrl": "https://www.yourdomain.com/callbacks",
"createDate": "2024-01-01T01:23:45.678Z",
"status": "Created",
"orderInfo": {
"usefulInfo": "This is an order",
"salesPersonId": "51"
},
"country": "SE"
}