Skip to content

Shipping Service Callback API (1.3.0)

The Shipping Service Callback API enables communication between the Shipping Service and the Integrator.

Read more on Shipping assistant.

Languages
Servers
https://api.klarna.co

Get an authorization token

Request

Obtain a bearer authorization token. Aggregator specific merchant identifier and API key will be provided in the payload body, it's recommended that a merchant unique token is returned using a signed Json Web Token (JWT).

The token will be used for subsequent request for this merchant identifier using HTTP bearer authorization in the Authorization HTTP header with the format Authorization: Bearer <token>.

More about how this works:

When a Merchant has an agreement with the TMS, the TMS provides the Merchant with an Identifier and a Key. The Merchant then configures Kustom to use the TMS with the provided Identifier and Key. So let's say the TMS gives the Merchant these credentials:

Identifier: "sweMerch123"
Key: "smOOOth"

As KSS prepares its authorization request to the TMS, it generates a random Nonce. KSS appends the Key to the Nonce, and then runs the Sha256 algorithm on that value to create a Digest.

To further the example, let's say KSS provided a Nonce of 'lRFUpqW7Xd':

Nonce: "lRFUpqW7Xd"
Nonce+Key: "lRFUpqW7XdsmOOOth"
Digest: "8C3891B3162DB3AB61A9B2DA74E6A479553ABA897894E5236ED290C11A0B832B"

Then KSS sends the authorization request with the Identifier, Nonce, and Digest.

The TMS authenticates the credentials by looking up their local Key for the Identifier, appending the Key to the Nonce provided by KSS, running the Sha256 algorithm on that value to create their own Digest, and then comparing that Digest to the Digest provided by KSS. If the Digests are identical, the TMS accepts the request and returns a bearer token.

Bodyapplication/vdn.klarna.shipping.auth-v1+jsonrequired
identifierstring

Handled as a string. Should uniquely identify the merchant at the TMS and any configuration if different profiles are available.

Example: "merchant-12345-profile-65432"
secretobject

API key/credentials for to authorize the merchant

curl -i -X POST \
  https://api.klarna.co/auth \
  -H 'Content-Type: application/vdn.klarna.shipping.auth-v1+json' \
  -d '{
    "identifier": "merchant-12345-profile-65432",
    "secret": {
      "digest": "8C3891B3162DB3AB61A9B2DA74E6A479553ABA897894E5236ED290C11A0B832B",
      "nonce": "lRFUpqW7Xd"
    }
  }'

Responses

Bearer token created successfully

Bodyapplication/vdn.klarna.shipping.auth-v1+json
tokenstring

Authorization token, will be used as bearer. Recommended implementation using JWT

Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudCI6ImZvb2JhciJ9.k2tE6vdJAEGbYSeZj2YluRK5vZbPAxsjd7XqARpBX3Y"
Response
application/vdn.klarna.shipping.auth-v1+json
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudCI6ImZvb2JhciJ9.k2tE6vdJAEGbYSeZj2YluRK5vZbPAxsjd7XqARpBX3Y" }

List shipping options

Request

Gets shipping options for the given customer data, address and order lines.

It's always important to display proper expected delivery date and time, to create a smoooth customer experience. Below you can find a table with examples of how customer will see delivery date and time that is provided in the delivery_time field of shipping option. Representation can vary in case provided date points to the same date or a period, in case the date is today, tomorrow or any date in the future. Dates in the past are ignored.

Provided valuesUI presentationExamples
delivery_time.interval.earliestDelivered after delivery_time.interval.earliest business daysDelivered after 3 business days
delivery_time.interval.latestDelivered within delivery_time.interval.latest business daysDelivered within 3 business days
delivery_time.interval.earliest delivery_time.interval.latestDelivered in delivery_time.interval.earliest-delivery_time.interval.latest business daysDelivered in 2-7 business days
delivery_time.interval.earliest delivery_time.cutoffDelivered after delivery_time.interval.earliest business days, if ordered before delivery_time.cutoffDelivered after 7 business days, if ordered before 14:00
delivery_time.interval.latest delivery_time.cutoffDelivered within delivery_time.interval.latest business days, if ordered before delivery_time.cutoffDelivered within 7 business days, if ordered before 14:00
delivery_time.interval.earliest delivery_time.interval.latest delivery_time.cutoffDelivered in delivery_time.interval.earliest-delivery_time.interval.latest business days, if ordered before delivery_time.cutoffDelivered in 1-5 business days, if ordered before 11:30
delivery_time.interval.earliest delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered after delivery_time.interval.earliest business days between ca. delivery_time.time_of_day.earliest and delivery_time.time_of_day.latestDelivered after 3 business days between ca 17:00 and 18:00
delivery_time.interval.latest delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered within delivery_time.interval.latest business days between ca. delivery_time.time_of_day.earliest and delivery_time.time_of_day.latestDelivered within 5 business days between ca 8:00 and 17:00
delivery_time.interval.earliest delivery_time.interval.latest delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered in delivery_time.interval.earliest-delivery_time.interval.latest business days between ca. delivery_time.time_of_day.earliest and delivery_time.time_of_day.latestDelivered in 1-2 business days between ca 9:00 and 12:00
delivery_time.interval.earliest delivery_time.cutoff delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered after delivery_time.interval.earliest business days between ca. delivery_time.time_of_day.earliest and delivery_time.time_of_day.latest, if ordered before delivery_time.cutoffDelivered after 4 business days between ca. 16:00 and 18:00, if ordered before 11:30
delivery_time.interval.latest delivery_time.cutoff delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered within delivery_time.interval.latest business days between ca. delivery_time.time_of_day.earliest and delivery_time.time_of_day.latest, if ordered before delivery_time.cutoffDelivered within 3 business days between ca 10:00 and 17:00, if ordered before 11:30
delivery_time.interval.earliest delivery_time.interval.latest delivery_time.cutoff delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered in delivery_time.interval.earliest-delivery_time.interval.latest business days between ca. delivery_time.time_of_day.earliest and delivery_time.time_of_day.latest, if ordered before delivery_time.cutoffDelivered in 1-5 business days between ca 15:00 and 17:00, if ordered before 11:30
delivery_time.earliestDelivered delivery_time.earliest at the earliestDelivered tomorrow at the earliest Delivered Thursday March 5 at the earliest
delivery_time.latestDelivered no later than delivery_time.latestDelivered today Delivered no later than tomorrow Delivered no later than Thursday, March 4
delivery_time.earliest delivery_time.latestDelivered between delivery_time.earliest and delivery_time.latestDelivered today Delivered no later than tomorrow Delivered tomorrow Delivered between Wednesday March 4 and Friday March 6 Delivered Monday April 6 Delivered between Monday April 6 and Friday May 24
delivery_time.earliest delivery_time.cutoffDelivered delivery_time.earliest at the earliest, if ordered before delivery_time.cutoffDelivered Saturday, July 25 at the earliest, if ordered before 15:00 Delivered tomorrow, if ordered before 14:00
delivery_time.latest delivery_time.cutoffDelivered no later than delivery_time.latest, if ordered before delivery_time.cutoffDelivered no later than Sunday, June 4, if ordered before 20:00 Delivered tomorrow, if ordered before 14:00
delivery_time.earliest delivery_time.latest delivery_time.cutoffDelivered between delivery_time.earliest and delivery_time.latest, if ordered before delivery_time.cutoffDelivered between Monday March 4 and Wednesday March 6, if ordered before 12:00 Delivered tomorrow, if ordered before 14:00
delivery_time.earliest delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered delivery_time.earliest at the earliest, from delivery_time.time_of_day.earliest to delivery_time.time_of_day.latestDelivered Saturday March 13 at the earliest, from 15:00 to 17:00
delivery_time.latest delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered no later than delivery_time.latest, from delivery_time.time_of_day.earliest to delivery_time.time_of_day.latestDelivered no later than Sunday November 9, from 9:00 to 15:00
delivery_time.earliest delivery_time.latest delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered between delivery_time.earliest and delivery_time.latest, from delivery_time.time_of_day.earliest to delivery_time.time_of_day.latestDelivered between Monday March 9 and Friday March 13, from 10:00 to 18:00
delivery_time.earliest delivery_time.cutoff delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered delivery_time.earliest at the earliest, from delivery_time.time_of_day.earliest to delivery_time.time_of_day.latest, if ordered before delivery_time.cutoffDelivered tomorrow at the earliest, from 15:00 to 18:00, if ordered before 21:00
delivery_time.latest delivery_time.cutoff delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered no later than delivery_time.latest, from delivery_time.time_of_day.earliest to delivery_time.time_of_day.latest, if ordered before delivery_time.cutoffDelivered no later than tmorrow, from 21:00 to 23:00, if ordered before 15:00
delivery_time.earliest delivery_time.latest delivery_time.cutoff delivery_time.time_of_day.earliest delivery_time.time_of_day.latestDelivered between delivery_time.earliest and delivery_time.latest, from delivery_time.time_of_day.earliest to delivery_time.time_of_day.latest, if ordered before delivery_time.cutoffDelivered between Monday March 9 and Friday March 13, from 15:00 to 17:00, if ordered before 11:30
Security
bearerAuth
Headers
Authorizationstring(string)required

Authorization token on format Bearer <token>

Bodyapplication/vdn.klarna.shipping.get_options-v1+jsonrequired
currencystringrequired

ISO 4217 alphabetic currency code.

Example: "SEK"
geoblockingboolean

A flag that indicates if the requested shipping options are for geoblocking flow.

Example: abc.se has consumers in e.g. Norway. According to Konsumentverket, these consumers should be given “the same opportunity to buy as a Swedish consumer”.

User Flows:

  1. A Norwegian consumer enters abc.se
  2. The consumer selects Norway as billing country and fills in his/her address
  3. Shipping module will display an information box saying “We do not deliver to the country specified in your billing address. Please select an alternative shipping option below.”
  4. The consumer chooses the delivery country (only if more than one is available).
    1. The consumer either fills in an address and gets a full set of shipping options OR
    2. The consumer chooses not to fill in an address and gets presented with only pickup-merchant-store shipping options with all the Swedish stores as locations.

Example: true
localestring(lc-CC)required

IETF BCP-47 locale definition.

Example: "sv-SE"
orderobject(order)required

Order definition

recipientobject(recipient)required

Information about the recipient

selected_shipping_option_idstring

Informs what selected shipping option is currently selected by an enduser. When this information is provided it means that the API caller wants to refine the locations for the selected shipping option. The API endpoint should restrict its response to the selected shipping option only and base the refinement on the recipient data. The recipient data is temporary and should not replace any state persistent (if any) based on previous recipient data received in prior shippingoptions calls.

Example: "tms-specific-shipping-option-id"
senderobject(sender)

Information about the sender. Should indicate from where the goods are dispatched. This object is optional and can be empty.

session_idstringrequired

Unique Kustom shipping session id.

Example: "201cda14-975f-4c4d-9c2f-12f3896b5156"
curl -i -X POST \
  https://api.klarna.co/shippingoptions \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/vdn.klarna.shipping.get_options-v1+json' \
  -d '{
    "currency": "SEK",
    "geoblocking": true,
    "locale": "sv-SE",
    "order": {
      "tags": [
        "member"
      ],
      "id": "string",
      "lines": [
        {
          "attributes": {
            "tags": [
              "member"
            ],
            "dimensions": {
              "height": 5000,
              "length": 5000,
              "width": 5000
            },
            "weight": 1000
          },
          "quantity": 2,
          "reference": "sku-1234",
          "tax_rate": 2500,
          "total_discount_amount": 1000,
          "total_price_including_tax": 4000,
          "total_tax_amount": 1250,
          "type": "physical",
          "unit_price": 2500
        }
      ],
      "total_amount": 10000,
      "total_tax": 2500,
      "total_weight": 2000
    },
    "recipient": {
      "care_of": "string",
      "city": "Stockholm",
      "company_name": "Kustom AB",
      "country": "SE",
      "customer_type": "person",
      "email": "info@kustom.com",
      "family_name": "Joyce",
      "given_name": "Klara",
      "phone": "+46812012010",
      "postal_code": "111 34",
      "region": "CA",
      "street_address": "Sveavägen 46",
      "street_address2": "string"
    },
    "selected_shipping_option_id": "tms-specific-shipping-option-id",
    "sender": {
      "address": {
        "city": "Stockholm",
        "country": "SE",
        "postal_code": "111 34",
        "region": "CA",
        "street_address": "Sveavägen 46",
        "street_address2": "string"
      },
      "sender_id": "warehouse-13"
    },
    "session_id": "201cda14-975f-4c4d-9c2f-12f3896b5156"
  }'

Responses

Headers
Cache-Controlstring

Controls response caching, format: max-age=(seconds). Max time to cache response given the same input, the response will be re-used for up-to the given max-age. The default is no caching. Example: Cache-Control: max-age=60

Bodyapplication/vdn.klarna.shipping.get_options-v1+json
shipping_optionsArray of objects(shipping_option)
Response
application/vdn.klarna.shipping.get_options-v1+json
{ "shipping_options": [ {} ] }

Select shipping option

Request

This operation reserves the user selected shipping option so that the merchant is able to query and find the data and create a shipment of it.

The shipment reservation should be unique per session_id provided in the request body.

This call happens when the user clicks buy, but before the purchase has gone through. A HTTP 201 response with a location header to this call is interpreted as a confirmation that the selected option is reserved, that the provided recipient data is valid and that the data has been saved successfully.

A HTTP 4xx error code will interrupt the purchase flow and restart the shipping selection process. See failure_reason.

If the purchase is successfully completed, KSS will call POST /shipment/{id}/confirm to confirm the reservation. See the /confirm call.

KSS will occasionally update a created shipment. This can happen because of a failure to finalize the order or for other reasons, which will restart the shipping selection process. See the PUT /shipment call. If the TMS is not able to return a shipment_id in the response, identifying the reserved shipment, then KSS is forced to invoke POST on succeeding updates instead of PUT.

Security
bearerAuth
Headers
Authorizationstring(string)required

Authorization token on format Bearer <token>

Bodyapplication/vdn.klarna.shipping.select_option-v1+jsonrequired
currencystringrequired

ISO 4217 alphabetic currency code

Example: "SEK"
localestring(lc-CC)required

IETF BCP-47 locale definition

Example: "sv-SE"
orderobject(order)

Order definition

recipientobjectrequired

Information about the recipient

selected_shipping_optionobjectrequired
senderobject(sender)

Information about the sender. Should indicate from where the goods are dispatched. This object is optional and can be empty.

session_idstringrequired

Unique Kustom shipping session id.

Example: "201cda14-975f-4c4d-9c2f-12f3896b5156"
curl -i -X POST \
  https://api.klarna.co/shipment \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/vdn.klarna.shipping.select_option-v1+json' \
  -d '{
    "currency": "SEK",
    "locale": "sv-SE",
    "order": {
      "tags": [
        "member"
      ],
      "id": "string",
      "lines": [
        {
          "attributes": {
            "tags": [
              "member"
            ],
            "dimensions": {
              "height": 5000,
              "length": 5000,
              "width": 5000
            },
            "weight": 1000
          },
          "quantity": 2,
          "reference": "sku-1234",
          "tax_rate": 2500,
          "total_discount_amount": 1000,
          "total_price_including_tax": 4000,
          "total_tax_amount": 1250,
          "type": "physical",
          "unit_price": 2500
        }
      ],
      "total_amount": 10000,
      "total_tax": 2500,
      "total_weight": 2000
    },
    "recipient": {
      "care_of": "string",
      "city": "Stockholm",
      "company_name": "Kustom AB",
      "country": "SE",
      "customer_type": "person",
      "email": "info@kustom.com",
      "family_name": "Joyce",
      "given_name": "Klara",
      "phone": "+46812012010",
      "postal_code": "111 34",
      "region": "CA",
      "street_address": "Sveavägen 46",
      "street_address2": "string"
    },
    "selected_shipping_option": {
      "addons": [
        {
          "data": {
            "selected": true,
            "text": "string"
          },
          "id": "sms-pickup-point-3",
          "max_length": 4,
          "preselected": true,
          "price": 400,
          "required": true,
          "type": "sms"
        }
      ],
      "carrier": "dhl",
      "class": "express",
      "id": "option-1234",
      "location": {
        "address": {
          "city": "Stockholm",
          "country": "SE",
          "postal_code": "111 34",
          "region": "CA",
          "street_address": "Sveavägen 46",
          "street_address2": "string"
        },
        "coordinates": {
          "lat": 59.336946,
          "lng": 18.063095
        },
        "id": "location-1234",
        "name": "ICA Supermarket"
      },
      "price": 2500,
      "tax_rate": 2500,
      "timeslot": {
        "end": "2019-08-24T14:15:22Z",
        "id": "timeslot-1234",
        "start": "2019-08-24T14:15:22Z"
      },
      "type": "delivery-address"
    },
    "sender": {
      "address": {
        "city": "Stockholm",
        "country": "SE",
        "postal_code": "111 34",
        "region": "CA",
        "street_address": "Sveavägen 46",
        "street_address2": "string"
      },
      "sender_id": "warehouse-13"
    },
    "session_id": "201cda14-975f-4c4d-9c2f-12f3896b5156"
  }'

Responses

Shipment reservation created and saved successfully

Headers
Locationstring(uri)

Full URL to this shipment. E.g. https://example.com/shipment/c2059e35-58b1-4482-ad55-5e7ef541eae4

Body
additional_infostring

Any additional information that should be passed to a merchant from TMS can be provided here. Limit is 256 characters.

selected_shipping_optionobjectrequired
shipment_idstringrequired

The id of the (reserved) shipment

Example: "c2059e35-58b1-4482-ad55-5e7ef541eae4"
shipmentsArray of objects
Response
{ "additional_info": "string", "selected_shipping_option": { "carrier": "postnord", "carrier_product": {} }, "shipment_id": "c2059e35-58b1-4482-ad55-5e7ef541eae4", "shipments": [ {} ] }

Get shipment status

Request

Get carrier product codes for the shipment, shipment status and optional carrier tracking data.

Security
bearerAuth
Path
shipment_idstringrequired

Unique shipment ID.

Headers
Authorizationstring(string)required

Authorization token on format Bearer <token>.

curl -i -X GET \
  'https://api.klarna.co/shipment/{shipment_id}' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Successful operation.

Bodyapplication/vdn.klarna.shipping.get_shipment-v1+json
additional_infostring

Any additional information that should be passed to a merchant from TMS can be provided here. Limit is 256 characters.

selected_shipping_optionobjectrequired
shipment_idstringrequired

The id of the (reserved) shipment

Example: "c2059e35-58b1-4482-ad55-5e7ef541eae4"
shipmentsArray of objects
Response
application/vdn.klarna.shipping.get_shipment-v1+json
{ "additional_info": "string", "selected_shipping_option": { "carrier": "postnord", "carrier_product": {} }, "shipment_id": "c2059e35-58b1-4482-ad55-5e7ef541eae4", "shipments": [ {} ] }

Update the shipping option

Request

This operation updates the previously created shipment reservation (POST -> /shipment).

The shipment reservation should be unique per session_id provided in the request body.

This call happens when the user clicks buy, but before the purchase has gone through. This request takes place if relevant data were updated or if the user was denied a preceding purchase after /shipment call took place. The user then has the potential to change his previous selections and retry the purchase.

A HTTP 200 response with a location header to this call is interpreted as a confirmation that the selected option is reserved, that the provided recipient data is valid and that the data has been updated successfully.

A HTTP 4xx error code will interrupt the purchase flow and restart the shipping selection process. See failure_reason.

Security
bearerAuth
Path
shipment_idstringrequired

Unique shipment ID

Headers
Authorizationstring(string)required

Authorization token on format Bearer <token>.

Bodyapplication/vdn.klarna.shipping.select_option-v1+jsonrequired
currencystringrequired

ISO 4217 alphabetic currency code

Example: "SEK"
localestring(lc-CC)required

IETF BCP-47 locale definition

Example: "sv-SE"
orderobject(order)

Order definition

recipientobjectrequired

Information about the recipient

selected_shipping_optionobjectrequired
senderobject(sender)

Information about the sender. Should indicate from where the goods are dispatched. This object is optional and can be empty.

session_idstringrequired

Unique Kustom shipping session id.

Example: "201cda14-975f-4c4d-9c2f-12f3896b5156"
curl -i -X PUT \
  'https://api.klarna.co/shipment/{shipment_id}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/vdn.klarna.shipping.select_option-v1+json' \
  -d '{
    "currency": "SEK",
    "locale": "sv-SE",
    "order": {
      "tags": [
        "member"
      ],
      "id": "string",
      "lines": [
        {
          "attributes": {
            "tags": [
              "member"
            ],
            "dimensions": {
              "height": 5000,
              "length": 5000,
              "width": 5000
            },
            "weight": 1000
          },
          "quantity": 2,
          "reference": "sku-1234",
          "tax_rate": 2500,
          "total_discount_amount": 1000,
          "total_price_including_tax": 4000,
          "total_tax_amount": 1250,
          "type": "physical",
          "unit_price": 2500
        }
      ],
      "total_amount": 10000,
      "total_tax": 2500,
      "total_weight": 2000
    },
    "recipient": {
      "care_of": "string",
      "city": "Stockholm",
      "company_name": "Kustom AB",
      "country": "SE",
      "customer_type": "person",
      "email": "info@kustom.com",
      "family_name": "Joyce",
      "given_name": "Klara",
      "phone": "+46812012010",
      "postal_code": "111 34",
      "region": "CA",
      "street_address": "Sveavägen 46",
      "street_address2": "string"
    },
    "selected_shipping_option": {
      "addons": [
        {
          "data": {
            "selected": true,
            "text": "string"
          },
          "id": "sms-pickup-point-3",
          "max_length": 4,
          "preselected": true,
          "price": 400,
          "required": true,
          "type": "sms"
        }
      ],
      "carrier": "dhl",
      "class": "express",
      "id": "option-1234",
      "location": {
        "address": {
          "city": "Stockholm",
          "country": "SE",
          "postal_code": "111 34",
          "region": "CA",
          "street_address": "Sveavägen 46",
          "street_address2": "string"
        },
        "coordinates": {
          "lat": 59.336946,
          "lng": 18.063095
        },
        "id": "location-1234",
        "name": "ICA Supermarket"
      },
      "price": 2500,
      "tax_rate": 2500,
      "timeslot": {
        "end": "2019-08-24T14:15:22Z",
        "id": "timeslot-1234",
        "start": "2019-08-24T14:15:22Z"
      },
      "type": "delivery-address"
    },
    "sender": {
      "address": {
        "city": "Stockholm",
        "country": "SE",
        "postal_code": "111 34",
        "region": "CA",
        "street_address": "Sveavägen 46",
        "street_address2": "string"
      },
      "sender_id": "warehouse-13"
    },
    "session_id": "201cda14-975f-4c4d-9c2f-12f3896b5156"
  }'

Responses

Shipment reservation updated successfully.

Headers
Locationstring(uri)

Full URL to this shipment. E.g. https://example.com/shipment/c2059e35-58b1-4482-ad55-5e7ef541eae4

Body
additional_infostring

Any additional information that should be passed to a merchant from TMS can be provided here. Limit is 256 characters.

selected_shipping_optionobjectrequired
shipment_idstringrequired

The id of the (reserved) shipment

Example: "c2059e35-58b1-4482-ad55-5e7ef541eae4"
shipmentsArray of objects
Response
{ "additional_info": "string", "selected_shipping_option": { "carrier": "postnord", "carrier_product": {} }, "shipment_id": "c2059e35-58b1-4482-ad55-5e7ef541eae4", "shipments": [ {} ] }

Confirm shipment reservation

Request

This operation confirms the previously created shipment reservation (POST -> /shipment).

After the last POST /shipment or PUT /shipment/{id} call, one of two things can happen:

  • If the purchase goes through, this endpoint is called. The call is guaranteed to happen within an hour of the last call to POST /shipment or PUT /shipment/{id}. In most cases, the call to this endpoint will come within seconds.
  • If the purchase does not go through, this endpoint is never called. If an hour has passed since the last call to POST /shipment or PUT /shipment/{id}, it is safe to remove the reservation of the shipment.

A HTTP 401 error code will trigger an auth call. Any other HTTP response will be ignored as this is a best effort call without any possibility for consumer interaction.

Security
bearerAuth
Path
shipment_idstringrequired

Unique shipment ID

Headers
Authorizationstring(string)required

Authorization token on format Bearer <token>.

curl -i -X POST \
  'https://api.klarna.co/shipment/{shipment_id}/confirm' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Successful operation.