Skip to content

Notifications

The notifications Qliro Checkout sends to your URLs, and the responses it expects.

Notification authentication

Qliro Checkout keeps configuration on its side to a minimum. Notifications to your URLs, for example MerchantCheckoutStatusPushUrl, do not support authentication. Supply a URL that contains authentication data and is only valid for a short period of time.

Example: https://merchant.com/api/push/token=token_12-34-aa-bb. Here token_12-34-aa-bb is a dynamic token valid for a couple of hours. When Qliro posts data, verify that the token exists, is valid and belongs to the order in the POST request.

Checkout status

When the customer submits the order, the CustomerCheckoutStatus changes from 'InProcess' to 'Completed' or 'OnHold'. Qliro sends a notification with the new status to the MerchantCheckoutStatusPushUrl from the CreateOrder request.

If the status is 'OnHold', Qliro sends another notification when it changes to 'Completed' or 'Refused'.

You can get several notifications for the same order with the same status. Use OrderId, CustomerCheckoutStatus and Timestamp to discard duplicates.

Notifications - Checkout Basics

Request

MethodPOST
EndpointMerchantCheckoutStatusPushUrl
BodyJSON Object

Body parameters

ParameterTypeDescription
OrderIdLongThe Qliro Checkout order ID.
MerchantReferenceStringThe MerchantReference of the order.
StatusStringThe new CustomerCheckoutStatus.
TimestampDatetimeThe date and time when the status changed.
NotificationTypeStringAlways CustomerCheckoutStatus.
PaymentTransactionIdLongThe transaction ID of the payment.

Request example

{
  "OrderId": 12345,
  "MerchantReference": "MerchantReference-d19c4152-f8aa-4889-ab36-afd6fb5c5aa4",
  "Status": "Completed",
  "Timestamp": "2016-03-03T11:43:05.567",
  "NotificationType": "CustomerCheckoutStatus",
  "PaymentTransactionId": 1234
}

Response

Respond to the notification with the JSON below.

If the checkout does not receive this callback, it retries immediately. This covers transient failures such as network disruptions.

If the immediate retry fails, the checkout schedules ten more attempts at these intervals: 2 seconds, 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, 30 minutes, 1 hour, 24 hours and 3 days.

If no callback arrives by the final attempt, the notification is registered as an error.

{
  "CallbackResponse": "received"
}

Update shipping methods

If the checkout handles the shipping interaction with the customer, the shipping options can need an update when the shipping address or the cart changes. Set the MerchantOrderAvailableShippingMethodsUrl parameter in the CreateOrder request. Qliro Checkout then sends a POST request to that URL.

Request

MethodPOST
EndpointMerchantOrderAvailableShippingMethodsUrl
BodyJSON Object

Body parameters

ParameterTypeDescription
OrderIDLongThe checkout order ID.
MerchantReferenceStringThe MerchantReference of the order.
JuridicalTypeStringThe juridical type of the customer. Can be 'Physical' or 'Company'.
OrderItemsArrayArray of items in the customer's cart. See details below.
CustomerJSON ObjectThe contact information provided by the customer. Includes Email and MobileNumber.
ShippingAddressJSON ObjectThe shipping address provided by the customer.
SelectedShippingMethodStringThe MerchantReference of the shipping method selected by the customer.
ProvideShippingSecondaryOptionsBooleanTrue if SelectedShippingMethod supports Dynamic Secondary Options

OrderItem parameters

ParametersTypeDescription
MerchantReferenceStringA string generated by the merchant to identify the order item. Maximum length is 200 characters.
TypeStringCan be 'Product', 'Discount', 'Fee' or 'Shipping'
QuantityIntegerThe number of these items in the cart.
PricePerItemIncVatDecimalThe price per item including VAT.
PricePerItemExVatDecimalThe price per item excluding VAT.
DescriptionStringA name or description of the order item.
MetaDataJSON ObjectCan be used to indicate if an item includes some kind of risk or is a subscription.

Request example

{
  "OrderId": 12345,
  "MerchantReference": "MerchantReference-d19c4152-f8aa-4889-ab36-afd6fb5c5aa4",
  "JuridicalType": "Physical",
  "OrderItems": [
    {
      "MerchantReference": "RedHat",
      "Description": "Red hat original product",
      "Type": "Product",
      "Quantity": 3,
      "PricePerItemIncVat": 375.55,
      "PricePerItemExVat": 300.35
    },
    {
      "MerchantReference": "BlackHat",
      "Description": "Original product",
      "Type": "Product",
      "Quantity": 95,
      "PricePerItemIncVat": 143,
      "PricePerItemExVat": 100
    }
  ],
  "ShippingAddress": {
    "CompanyName": null,
    "FirstName": "First",
    "LastName": "Last",
    "CareOf": "",
    "Street": "Street",
    "PostalCode": "12345",
    "City": "City",
    "Area": "Area"
  },
  "Customer": {
    "Email": "some@adress.com",
    "MobileNumber": "+4670123456"
  },
  "SelectedShippingMethod": null,
  "ProvideShippingSecondaryOptions": false
}

Response

Success

If shipping options are available, respond with status code 200. The body contains the shipping methods to present to the customer.

If no response is received within 5 seconds, the shipping options will not be updated.

To populate the response, see the AvailableShippingMethods parameter of the CreateOrder call in the API Reference.

Success example

{
  "AvailableShippingMethods": [
    {
      "MerchantReference": "HOME_DELIVERY",
      "ShippingFeeMerchantReference": "SHIPPING_FEE_REF_1",
      "DisplayName": "Home Delivery",
      "Descriptions": ["Expected date", "Expected time"],
      "Brand": "DHL",
      "CategoryDisplayName": "HOME_DELIVERY",
      "PriceIncVat": 300,
      "PriceExVat": 200,
      "SupportsAccessCode": true
    },
    {
      "MerchantReference": "PICKUP_DELIVERY",
      "ShippingFeeMerchantReference": "SHIPPING_FEE_REF_2",
      "DisplayName": "Pickup",
      "Descriptions": ["Expected date", "Expected time"],
      "Brand": "PostNord",
      "CategoryDisplayName": "PICKUP",
      "PriceIncVat": 150,
      "PriceExVat": 100,
      "SecondaryOptions": [
        {
          "MerchantReference": "PICKUP_LOCATION_1",
          "DisplayName": "Pickup location 1",
          "Descriptions": ["Address", "Hours"],
          "Coordinates": { "Lat": 59.349962, "Lng": 18.04763 }
        }
      ],
      "AdditionalShippingServices": [
        {
          "MerchantReference": "ADDITIONAL_SHIPPING_SERVICE_1",
          "DisplayName": "Express delivery",
          "PriceIncVat": 150,
          "PriceExVat": 100,
          "Descriptions": ["Faster delivery"],
          "DeliveryDate": "2019-03-03"
        }
      ]
    }
  ],
  "ShippingAdditionalHeader": "SHIPPING_ADDITONAL_HEADER"
}

Error

If no shipping methods are supported, respond with status code 400 and a DeclineReason.

DeclineReasonDescription
PostalCodeIsNotSupportedThe merchant does not deliver to the shipping address provided by the customer.
{
  "DeclineReason": "PostalCodeIsNotSupported"
}

Update shipping addresses

To provide a list of predefined shipping addresses, set MerchantOrderAvailableShippingAddressesUrl in the CreateOrder request.

Request

MethodPOST
EndpointMerchantOrderAvailableShippingAddressesUrl
BodyJSON Object

Body parameters

ParameterTypeDescription
OrderIDLongThe Qliro Checkout order ID.
MerchantReferenceStringThe MerchantReference of the order.
CustomerJSON ObjectInformation about the customer (Email, MobileNumber).

Request example

{
  "OrderId": 12345,
  "MerchantReference": "MerchantReference-d19c4152-f8aa-4889-ab36-afd6fb5c5aa4",
  "Customer": {
    "Email": "email@domain.com",
    "MobileNumber": "0701234567"
  }
}

Response

{
  "AvailableShippingAddresses": [
    {
      "FirstName": "FirstName1",
      "LastName": "LastName1",
      "CompanyName": "Company A AB",
      "CareOf": "CareOf",
      "Street": "Klara Vattugrand 32",
      "Street2": "Department X",
      "PostalCode": "147 57",
      "City": "Linkoping",
      "Area": "Region X"
    }
  ]
}

Validate order

To validate the order when the customer is about to submit it, set MerchantOrderValidationUrl in the CreateOrder request.

For full request and response parameters, see Validate order and Notifications validate order details above.

If Qliro receives no response within 5 seconds, the order is approved as usual. Optionally, Qliro Checkout can be configured to reject the order automatically in that case.

DeclineReasonDescription
OutOfStockOne or more of the items in the cart is out of stock.
PostalCodeIsNotSupportedThe merchant does not deliver to the shipping address provided by the customer.
ShippingIsNotSupportedForPostalCodeThe selected shipping method does not support the shipping address.
CashOnDeliveryIsNotSupportedForShippingMethodThe selected shipping method does not support cash-on-delivery.
IdentityNotVerifiedIdentity verification is required and has not been done.
OtherAny other reason not covered above.
{
  "DeclineReason": "Other",
  "DeclineReasonMessage": "Custom message that will be shown"
}

Upsell status

To implement upsell, contact merchant onboarding at integration@qliro.com.

After an Upsell request, this notification gives the status of the Upsell transaction.

Request

MethodPOST
EndpointMerchantCheckoutStatusPushUrl
BodyJSON Object

Body parameters

ParametersTypeDescription
OrderIDLongThe Qliro Checkout order ID
MerchantReferenceStringThe MerchantReference of the order
StatusStringEither Success or Error.
TimestampDatetimeThe date and time when the status changed.
NotificationTypeStringAlways UpsellStatus.
PaymentTransactionIdLongThe transaction id related to the upsell payment.
OriginalPaymentTransactionIdLongThe previous transaction id, if changed.
ReplacesOriginalPaymentTransactionBoolWhen true the transaction id replaces the original.

Request example

{
  "OrderId": 12345,
  "MerchantReference": "MerchantReference-d19c4152-f8aa-4889-ab36-afd6fb5c5aa4",
  "Status": "Success",
  "Timestamp": "2016-03-03T11:43:05.567",
  "NotificationType": "UpsellStatus",
  "PaymentTransactionId": 12345
}

Response

{
  "CallbackResponse": "received"
}

Order management status

The checkout sends a notification to MerchantOrderManagementStatusPushUrl whenever an Admin API request changes status.

Request

MethodPOST
EndpointMerchantOrderManagementStatusPushUrl
BodyJSON Object

Body parameters

ParameterTypeDescription
OrderIDLongThe Qliro checkout order ID
MerchantReferenceStringThe MerchantReference of the order
PaymentTransactionIdLongThis ID is a reference to the particular request.
AmountDecimalThe amount of this particular transaction.
CurrencyStringThree uppercase characters, in accordance with ISO 4217.
StatusStringThe new request status.
PaymentTypeStringThe type of transaction
ProviderTransactionIdStringThe transaction ID as given by payment provider.
ProviderResultCodeStringRequest result as given by payment provider.
ProviderResultDescriptionStringDescription of the ProviderResultCode.
OriginalPaymentTransactionIdStringAn ID that refers to the original payment.
PaymentReferenceLongA unique reference which represents a successful shipment.
TimeStampStringThe date and time when the status changed.
ErrorCodeStringError code as given by Qliro.
ErrorCodeDescriptionStringA readable description of the error.

Request example

{
  "OrderId": 67890,
  "MerchantReference": "MerchantRef1234",
  "PaymentTransactionId": 12345,
  "Amount": 550,
  "Currency": "SEK",
  "Status": "Success",
  "PaymentType": "Capture",
  "ProviderTransactionId": "8a82944a5a8ee61d015aa44c44787ead",
  "ProviderResultCode": "000.100.110",
  "ProviderResultDescription": "Request successfully processed",
  "OriginalPaymentTransactionId": "67890",
  "PaymentReference": 123456,
  "Timestamp": "2016-03-03T11:43:05.567"
}

Response

{
  "CallbackResponse": "received"
}

Merchant notification URL

Use MerchantNotificationUrl if you want Qliro to forward notifications about shipping and loyalty.

Request

MethodPOST
EndpointMerchantNotificationUrl
BodyJSON Object

Body parameters

ParameterTypeDescription
OrderIdLongThe Qliro Checkout order ID
MerchantReferenceStringThe MerchantReference of the order
IsSuccessBooleanWhether the update is successful or erroneous.
ErrorMessageStringIf IsSuccess is false the error message will be added here.
TimeStampStringThe date and time when the event was created.
EventTypeStringType of event, e.g. "SHIPPING_PROVIDER_UPDATE" or "LOYALTY_PROVIDER_MEMBER_CREATE"
ProviderStringThe provider name such as "Unifaun", "Ingrid", "Voyado", or "Klaviyo".
PayloadjsonThe complete json response from the external provider.

Request example

{
  "OrderId": 67890,
  "MerchantReference": "MerchantRef1234",
  "IsSuccess": true,
  "ErrorMessage": null,
  "TimeStamp": "2024-07-01T09:44:37.6397507Z",
  "EventType": "SHIPPING_PROVIDER_UPDATE",
  "Provider": "Unifaun",
  "Payload": {}
}

Response

{
  "CallbackResponse": "received"
}

Merchant saved credit card

If the customer pays by card, Qliro sends a card information notification to MerchantSavedCreditCardPushUrl after the purchase completes.

Request

MethodPOST
EndpointMerchantSavedCreditCardPushUrl
BodyJSON Object

Body parameters

ParameterTypeDescription
OrderIdLongThe Qliro Checkout order Id
IdGuidThe merchant saved credit card Id
CardBinStringThe card BIN
CardLast4DigitsStringThe card last 4 digits
CardExpiryYearIntThe card expiry year
CardExpiryMonthIntThe card expiry month
CardBrandNameStringCan be Visa, Mastercard, Amex, Unknown
TimeStampDatetimeThe date and time of the merchant saved credit card registration

Request example

{
  "OrderId": "12345",
  "Id": "10B066CC-F317-4CD1-9087-8CF06901918F",
  "CardBin": "454225",
  "CardLast4Digits": "3964",
  "CardExpiryYear": "2020",
  "CardExpiryMonth": "6",
  "CardBrandName": "Visa",
  "Timestamp": "2019-03-03T11:43:05.567"
}

Response

{
  "CallbackResponse": "received"
}