Get Recurring Order
Use this request to retrieve an existing order created with provided token
info
HTTP status code 200 indicates success
Endpoint
Method: GET
/api/tokens/{token}/orders/{orderId}
URI Parameters
Name | Description | Type | Additional Information |
---|---|---|---|
token | Token returned by CreateOrder request when the initial order was finalised | String | |
orderId | OrderId returned by Create Recurring Order request when order is finalised | Int64 |
Response Information
- Response Model
- Response Sample
Name | Description | Type | Additional Information |
---|---|---|---|
OrderId | ID of the order, needed to get order in the Checkout API and Order Management | Int64 | |
ClientOrderNumber | String | ||
Status | The current status of the order | CheckoutOrderStatus | |
Cart | Order rows. | Cart | |
Currency | Currency as defined by ISO 4217 | String | |
Customer | Customer information | Customer | |
CountryCode | Defined by two-letter ISO 3166-1 alpha-2, e.g. SE, NO, FI, DK | String | |
EmailAddress | Customer's email address | String | |
PhoneNumber | Customer's phone number | String | |
ShippingAddress | Customer's shipping address. | Address | |
BillingAddress | Customer's billing address. | Address | |
PaymentType | The payment method that the customer used to finish the purchase. Only set when order status is Final
| String | |
Payment | The payment method that the customer used to finish the purchase. Only set when order status is Final | PaymentInfo | |
SveaWillBuyOrder | True = Svea will buy this invoice. False = Svea will not buy this invoice. null = Selected payment method is not Invoice. | Boolean | |
MerchantSettings | MerchantSettings | ||
CustomerReference | B2B Customer reference | String | |
PeppolId | A company's ID in the PEPPOL network, which allows the company to receive PEPPOL invoices. A PEPPOL ID can be entered when placing a B2B order using the payment method invoice. | String | |
MerchantData | Metadata visible to the store | String | Cleaned up from Checkout database after 45 days. |
Recurring | Indicates if the order is recurring order and will create a recurring token when order is finalized. Only applicable if merchant has recurring orders enabled. | Boolean / Null | If merchant utilizes shipping (nShift) recurring orders cannot be set |
RecurringToken | Recurring token to be used for subsequent recurring orders. Only available when order is finalized. Only applicable if merchant has recurring orders enabled. | Guid / Null |
application/json
{
"merchantSettings": {
"checkoutValidationCallBackUri": "https://your.domain/validation-callback/your-identifier", //<----- Optional
"pushUri": "https://your.domain/push-callback/{checkout.order.uri}"
},
"cart": {
"items": [
{
"articleNumber": "ABC80",
"name": "Computer",
"quantity": 300, // 3.00 units
"unitPrice": 500000, // 5000.00 SEK
"discountPercent": 1000, // 10.00% discount
"vatPercent": 2500, // 25.00% VAT
"unit": null, // e.g. pcs, kg...
"temporaryReference": null,
"rowNumber": 1,
"merchantData": null,
"rowType": "Row"
},
{
"articleNumber": "ABC81",
"name": "Another Computer",
"quantity": 200, // 2.00 units
"unitPrice": 400000, // 4000.00 SEK
"discountAmount": 10000, // 100.00 SEK discount
"vatPercent": 2500, // 25.00% VAT
"unit": null, // e.g. pcs, kg...
"temporaryReference": null,
"rowNumber": 2,
"merchantData": null,
"rowType": "Row"
}
]
},
"customer": {
"id": 1,
"nationalId": "121314-1234",
"countryCode": "SE",
"isCompany": false
},
"shippingAddress": {
"fullName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"streetAddress": "My Street 1",
"coAddress": "",
"postalCode": "99999",
"city": "My Town",
"countryCode": "SE",
"isGeneric": false,
"addressLines": []
},
"billingAddress": {
"fullName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"streetAddress": "My Street 1",
"coAddress": "",
"postalCode": "99999",
"city": "My Town",
"countryCode": "SE",
"isGeneric": false,
"addressLines": []
},
"currency": "SEK",
"countryCode": "SE",
"clientOrderNumber": "ABCDEFGHIJKLMNOP0123456789",
"orderId": 569569,
"emailAddress": "john.doe@svea.com",
"phoneNumber": "0712345678",
"paymentType": "SVEACARDPAY_PF",
"payment": {
"paymentMethodType": "Card"
},
"status": "Final",
"customerReference": null,
"merchantData": null,
"peppolId": null,
"recurring": true,
"recurringToken": "4b10836f-f9e4-4b2d-32e8-08dad38a1eda"
}
CheckoutOrderStatus
CheckoutOrderStatus values indicate in which state the order session is:
Status Code | Numerical Value | Description |
---|---|---|
Cancelled | -1 | Order session becomes cancelled when time limit has expired without any purchase being finalized. When an order session is cancelled, no further actions can be made. |
Created | 0 | Checkout order session has been created and is active. When an order session is active, cart and merchantData can be changed. |
Final | 100 | Customer has seen the confirmation page which closes the checkout order session. When an order session is Final, no further actions can be made. |
Observe that none of the status codes mean that the order is ready to be delivered. To make sure that the order can be delivered, please refer to the order status of GET Order in Order Management.
Cart
Name | Description | Type | Additional Information |
---|---|---|---|
Items | Order rows. | Collection of OrderRow | Maximum allowed number of rows per order is 1000. |
OrderRow
Name | Description | Type | Additional Information | Examples |
---|---|---|---|---|
Name | Article name. | String | Max length: 40 | |
Quantity | Quantity of the product. | Int64 | 1-7 digits Minor Units. | |
UnitPrice | Price of the product including VAT. | Int64 | 1-13 digits Can be negative. Minor Units. | |
ArticleNumber | Article number | String | Max length: 256 | |
DiscountPercent | The discount percent of the order row. Cannot be used together with DiscountAmount | Int64 | Min: 0 Max: 10000 No fractions Minor Units. | |
DiscountAmount | The total discount amount for this order row. Cannot be used together with DiscountPercent | Int64 | Min: 0 Max: Order row total Minor Units. | |
VatPercent | The VAT percentage of the current product. Valid vat percentage for that country. | Int64 | Minor Units. | |
Unit | The unit type, e.g., “st”, “pc”, “kg” etc. | String | Max length: 4 | |
TemporaryReference | Can be used when creating or updating an order. The returned rows will have their corresponding temporaryreference as they were given in the in data. It will not be stored and will not be returned in GetOrder. | String | ||
RowNumber | The row number the row will have in the Webpay system | Int32 | ||
MerchantData | Metadata visible to the store | String | Max length: 255 Cleaned up from Checkout database after 45 days. | |
RowType | Is used just to distinguish ShippingFee item from the order items. It is a string and can be one of "Row" or “ShippingFee” | String |
PaymentInfo
The final payment method for the order. Will only have a value when the order is finalized, otherwise null.
Some payment methods might include unique fields that are not available on other payment methods.
Name | Description | Type |
---|---|---|
PaymentMethodType | The final payment method type for the order:
| String |
MerchantSettings
Name | Description | Type | Additional Information |
---|---|---|---|
WebhookUri | URI of the webhook in order to be called by shipping services | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
CheckoutUri | URI to the page in the webshop where the Checkout will be shown. | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
ConfirmationUri | URI to the page in the webshop where the customer should be redirected after the Checkout is completed. | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
TermsUri | URI to a page with webshop terms. | String | Must be a valid URI Must be accessible by end customer Max length: 500 |
PushUri | URI to an endpoint that expects callbacks from the Checkout whenever an order's CheckoutOrderStatus is changed. May contain a {checkout.order.uri} placeholder which will be replaced with the Checkout order ID. Requests for this endpoint are made with HTTP Method POST. Note: Merchant push merely is a notification and may take from seconds to even minutes to be sent, therefore always you have to make sure you communicate with checkout to get all information properly! Note: You don't have to wait for push to display your finalized page to the customer because that request is asynchronous and should be last resort in that regard! Note: Merchants should be aware of that this endpoint may get called multiple times for the same state transition. Note: You get additional information in this format: {"type": "Created/Cancelled/Finalized"} Your response's HTTP Status Code is interpreted as:
| String | Must be a valid callback URI Max length: 500 |
CheckoutValidationCallBackUri | An optional URI to a location that expects callbacks from the Checkout to validate an order's stock status. It also allows the possibility to update the Checkout order with a different ClientOrderNumber. May contain a {checkout.order.uri} placeholder which will be replaced with the Checkout order ID.Requests for this endpoint are made with HTTP Method GET. Note: We will make multiple validation callback requests if it is needed to ensure great and smooth purchasing experience. Your response's HTTP Status Code is interpreted as:
| String | Must be a valid callback URI Max length: 500 |
ActivePartPaymentCampaigns | List of valid CampaignIDs. If used, a list of available part payment campaign options will be filtered through the chosen list. | Collection of Int64 | Must be a list of valid CampaignIDs. |
PromotedPartPaymentCampaign | If used, the chosen campaign will be listed first in all payment method lists. | Int64 | Must be valid CampaignID. |
UseClientSideValidation | If set to true, the checkout will give you a chance to do some client side validations when the event order.validationCallback is triggered. For more info, see Checkout Widget Methods | Boolean | Default value is false. |
RequireClientSideValidationResponse | Used in conjunction with UseClientSideValidation. If set to true, the checkout will await a response before proceeding instead of automatically proceeding after 10 seconds no response had been received. For more info, see Checkout Widget Methods | Boolean | Default value is false. |
Customer
Name | Description | Type | Additional Information |
---|---|---|---|
Id | Int64 | ||
NationalId | String | ||
CountryCode | String | ||
IsCompany | Boolean | ||
VatNumber | String | ||
IsVerified | Boolean |
Address
Name | Description | Type | Additional Information |
---|---|---|---|
FullName | For B2B customers this field contains the company name | String | |
FirstName | Empty for B2B customers Some address providers used by Checkout in Norway do not supply FirstName and LastName separately for B2C customers. In those cases only FullName is available. | String | |
LastName | Empty for B2B customers Some address providers used by Checkout in Norway do not supply FirstName and LastName separately for B2C customers. In those cases only FullName is available. | String | |
StreetAddress | String | ||
StreetAddress2 | May be populated on international addresses that require multiple address rows | String | |
StreetAddress3 | May be populated on international addresses that require multiple address rows | String | |
CoAddress | String | ||
PostalCode | String | ||
City | String | ||
CountryCode | String | ||
(IsGeneric) | (Deprecated) International addresses have the same structure as domestic addresses with addition of properties StreetAddress2 and StreetAddress3 Returns true if the address is a generic/international address. Generic addresses only have values in fullName and addressLines. | Boolean | |
(AddressLines) | (Deprecated) International addresses have the same structure as domestic addresses with addition of properties StreetAddress2 and StreetAddress3 This is only populated if the address is a generic/international address (IsGeneric returns true). | Collection of String |