Skip to content
POST

Capture an order

https://api.kustom.co/ordermanagement/v1/orders/{order_id}/captures

Create capture. Read more on Capturing an order

Parameters2 fields
  • order_idstring · uuidrequiredin path

    Order id

  • Klarna-Idempotency-Keystringoptionalin header

    This header will guarantee the idempotency of the operation. The key should be unique and is recommended to be a UUID version 4. Retries of requests are safe to be applied in case of errors such as network errors, socket errors and timeouts. Input values of the operation are disregarded when evaluating the idempotency of the operation, only the key matters.

Request body33 fields
  • captured_amountinteger · int64required

    The captured amount in minor units.

  • descriptionstringoptional

    Description of the capture shown to the customer. Maximum 255 characters.

  • order_lines[]array<object>optional

    Order lines for this capture. Maximum 1000 items.

    20 fields in order_lines
    • image_urlstringoptional

      URL to an image that can be embedded in communications between Klarna and the customer.

    • merchant_datastringoptional

      Data about the order line.

    • namestringrequired

      Descriptive item name.

    • product_identifiersobjectoptional

      product_identifiers

      6 fields in product_identifiers
      • brandstringoptional

        The product’s brand name as generally recognized by consumers. If no brand is available for a product, do not supply any value. Maximum 70 characters. Example: Intel

      • category_pathstringoptional

        The product’s category path as used in the merchant’s webshop. Include the full and most detailed category and separate the segments with ’ > ’. Maximum 750 characters. Example: Electronics Store > Computers & Tablets > Desktops

      • colorstringoptional

        Color to be shown to the end customer (max 64 characters). Example: Denim blue

      • global_trade_item_numberstringoptional

        The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. Exclude dashes and spaces, where possible. Maximum 50 characters. Example: 735858293167

      • manufacturer_part_numberstringoptional

        The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. Only submit MPNs assigned by a manufacturer and use the most specific MPN possible. Maximum 70 characters. Example: BOXNUC5CPYH

      • sizestringoptional

        Size to be shown to the end customer (max 64 characters). Example: 4

    • product_urlstringoptional

      URL to the product that can be used in communications between Klarna and the customer.

    • quantityinteger · int64required

      Item quantity.

    • quantity_unitstringoptional

      Unit used to describe the quantity.

    • referencestringoptional

      Article number, SKU, or similar identifier on the product variant level.

    • tax_rateinteger · int32optional

      The tax rate in percent with two implicit decimals.

    • total_amountinteger · int64required

      Total amount including tax and discounts (quantity * unit_price - total_discount_amount).

    • total_discount_amountinteger · int64optional

      The discount amount in minor units. Includes tax. Example: 1200 = $12. Max value: 200000000

    • total_tax_amountinteger · int64optional

      The total tax amount in minor units.

    • typestringoptional

      Order line type.

      • physical
      • discount
      • shipping_fee
      • sales_tax
      • store_credit
      • gift_card
      • digital
      • surcharge
      • return_fee
      • package
    • unit_priceinteger · int64required

      Unit price including tax without applying discounts in minor units.

  • referencestringoptional

    Internal reference to the capture. This will be included in the settlement files. Max length is 255 characters.

  • shipping_delayinteger · int64optional

    Delay before the order will be shipped. Use for improving the customer experience regarding payments. This field is currently not returned when reading the order. Minimum: 0. Please note: to be able to submit values larger than 0, this has to be enabled in your merchant account. Please contact Kustom for further information.

  • shipping_info[]array<object>optional

    Shipping information for this capture. Maximum 500 items.

    7 fields in shipping_info
    • return_shipping_companystringoptional

      Name of the shipping company for the return shipment (as specific as possible). Maximum 100 characters. Example: ‘DHL SE’ and not only ‘DHL’

    • return_tracking_numberstringoptional

      Tracking number for the return shipment. Maximum 100 characters.

    • return_tracking_uristringoptional

      URL where the customer can track the return shipment. Maximum 1024 characters.

    • shipping_companystringoptional

      Name of the shipping company (as specific as possible). Maximum 100 characters. Example: ‘DHL SE’ and not only ‘DHL’

    • shipping_methodstringoptional

      Shipping method. Allowed values matches (PickUpStore|Home|BoxReg|BoxUnreg|PickUpPoint|Own|Postal|DHLPackstation|Digital|Undefined|PickUpWarehouse|ClickCollect|PalletDelivery)

    • tracking_numberstringoptional

      Tracking number for the shipment. Maximum 100 characters.

    • tracking_uristringoptional

      URI where the customer can track their shipment. Maximum 1024 characters.

201
Response0 fields

Capture created

No response body — this status returns headers only.

403
Response3 fields

Capture not allowed.

  • correlation_idstringoptional

    Correlation id. For searching logs.

  • error_codestringoptional

    Error code

  • error_messages[]array<string>optional

    Error messages

404
Response3 fields

Order not found.

  • correlation_idstringoptional

    Correlation id. For searching logs.

  • error_codestringoptional

    Error code

  • error_messages[]array<string>optional

    Error messages

409
Response0 fields

Conflict

No response body — this status returns headers only.

Errors

CodeStatusWhat it meansRetry
CAPTURE_NOT_ALLOWED403The order is not in a state that permits capture. Needs AUTHORIZED.Never retry
NO_SUCH_ORDER404The order_id does not exist, or belongs to the other environment.Never retry

This page is also available as Markdown — append .md to its URL — and is indexed in llms.txt.