Requests

Data request actions:

  • Reserve
  • CancelReservation
  • UpdateReservation
  • ExtendReservation
  • AddShippingInfo

Transaction request Actions:

  • Pay
  • Refund

Testing:

The test checkout of Buckaroo communicates with Klarna's Sandbox environment, allowing different supported scenarios to be tested.

Solution:

  • Session: Buckaroo offers Klarna redirect to the hosted page, which renders local payment options and language based on API request information. (The hosted page can be offered in English content as well). The session expires in 4 hours, with still pending transactions being closed as failed.
  • Order: When a consumer completes steps on the hosted page, the redirect to your confirmation page is triggered, and the reservation is confirmed as valid.
  • Fulfillment: Updates may be required between order confirmation and delivery.

Fulfillment Scenarios:

  • Cancel reservation if there is no intent to fulfill. (CancelReservation)
  • Cancel remaining reservation for partial deliveries. (CancelReservation)
  • Update shipping address if changed. (UpdateReservation)
  • Update order lines without increasing total amount. (UpdateReservation)
  • Extend reservation if delayed delivery. (ExtendReservation)

Payment Scenarios:

  • Full pay for all shipped products. (Pay)
  • Partial pay for part of the order. (Pay)
  • Share shuipment details for delivery. (AddShippinInfo)

Returns and Credits:

  • Returns or compensation can be shared with Buckaroo as a refund.

Reserve action

Reserve Request

The reserve action is the first step to process the payment of an order with Klarna. It will return a redirect URL to forward the consumer. It is important to handle the push sent by Buckaroo of the reservation that contains the Buckaroo Reserve Datarequest key. This will require handling the follow-up actions.

Minimal Reserve Request

Check file “Minimal reserve request.json” for the minimal Json request.

Full Reserve Request

Check file “Full reserve request.json” for the full Json request.


TO DO – add request parameter Klarna reserve

Reserve Response

A successful request will return a requiredAction redirect URL to forward the consumer to the Hosted page of Klarna.

General Reserve Response

{
    "Key": "49EF793FC7AC404EABC4F57A32F5F08D",
    "Status": {
        "Code": {
            "Code": 791,
            "Description": "Pending processing"
        },
        "SubCode": {
            "Code": "S002",
            "Description": "An additional action is required: Redirect to Klarna"
        },
        "DateTime": "2026-02-02T14:48:27"
    },
    "RequiredAction": {
        "RedirectURL": "https://checkout.buckaroo.nl/html/redirect.ashx?r=3D349C783491413EBAF06660932EF0BF",
        "RequestedInformation": null,
        "Name": "Redirect",
        "TypeDeprecated": 0
    },
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "RequestErrors": null,
    "ServiceCode": "Klarna",
    "IsTest": true,
    "ConsumerMessage": null
}

Reserve Push

{
    "DataRequest": {
        "Key": "34C088DBD9244F27B3C62C21C7D6D6C8",
        "Invoice": "Ref.1 OrderID Reserve",
        "ServiceCode": "Klarna",
        "ActionCode": "Reserve",
        "Status": {
            "Code": {
                "Code": 190,
                "Description": "The request was successful."
            },
            "SubCode": null,
            "DateTime": "2026-02-02T07:28:26"
        },
        "IsTest": true,
        "Order": null,
        "Currency": "EUR",
        "AmountDebit": 0,
        "Services": [
            {
                "Name": "Klarna",
                "Action": null,
                "Parameters": [
                    {
                        "Name": "DataRequestKey",
                        "Value": "1A582451AD6F4218BF719909170168A0"
                    }
                ],
                "VersionAsProperty": 1
            }
        ],
        "CustomParameters": null,
        "AdditionalParameters": null,
        "MutationType": 0,
        "IssuingCountry": null,
        "StartRecurrent": false,
        "Recurring": false,
        "CustomerName": null,
        "PayerHash": null,
        "PaymentKey": null
    }
}

CancelReservation action

The CancelReservation action can be used in two scenarios:

  1. There has been no partial capture, a cancel will close the full order.
  2. There has been a partial capture, a cancel will close the remaining amount and products still part of the reservation.

General CancelReservation Request

{
    "Currency": "EUR",
    "Services": {
        "ServiceList": [
            {
                "Name": "Klarna",
                "Action": "CancelReservation",
                "Parameters": [
                    {
                        "Name": "DataRequestKey",
                        "Value": "1A582451AD6F4218BF719909170168A0"
                    }
                ]
            }
        ]
    }
}

Request Parameters

ParameterTypeOCMDescription
DataRequestKeystringMBukcaroo data request key

CancelReservation Response

{
    "Key": "D24D08A03A2944B9AD9F3723483C5161",
    "Status": {
        "Code": {
            "Code": 190,
            "Description": "Success"
        },
        "SubCode": {
            "Code": "S990",
            "Description": "The request was successful."
        },
        "DateTime": "2026-02-02T08:45:24"
    },
    "RequiredAction": null,
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "RequestErrors": null,
    "ServiceCode": "Klarna",
    "IsTest": true,
    "ConsumerMessage": null
}

Response Parameters

ParameterTypeOCMDescription
ServiceCodestringMService label is Klarna
CodestringMContains the status of the CancelReservation not the Reservation
IsTestbooleanMIf there are actual funds processed

CancelReservation Push

{
  "DataRequest": {
    "Key": "446F21147A2F4415967A2CF393714141",
    "Invoice": null,
    "ServiceCode": "Klarna",
    "ActionCode": "CancelReservation",
    "Status": {
      "Code": {
        "Code": 190,
        "Description": "The request was successful."
      },
      "SubCode": null,
      "DateTime": "2026-02-02T08:54:17"
    },
    "IsTest": true,
    "Order": null,
    "Currency": "EUR",
    "AmountDebit": 0,
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "MutationType": 0,
    "IssuingCountry": null,
    "StartRecurrent": false,
    "Recurring": false,
    "CustomerName": null,
    "PayerHash": null,
    "PaymentKey": null
  }
}

Push Parameters

ParameterTypeOCMDescription
ServiceCodestringMService label is Klarna
CodestringMContains the status of the Cancellation not the Reservation
IsTestbooleanMIf there are actual funds processed

UpdateReservation action

UpdateReservation Request

The UpdateReservation action can be used in three scenarios:

  1. The consumer wants to change the order with a total amount same or lower, update the order lines of the reservation.
  2. The consumer wants to change the delivery address, update the Klarna shipping address of the reservation.
  3. The consumer wants to update the order and shipping, all updates can be shared.

In case both the order details and the shipping address are updated, Buckaroo will first request the address change, followed by the order lines change.

Customer UpdateReservation Request

{
    "Currency": "EUR",
    "Description": "Test Klarna UpdateReservation",
    "Services": {
        "ServiceList": [
            {
                "Name": "Klarna",
                "Action": "UpdateReservation",
                "Parameters": [
                    {
                        "Name": "DataRequestKey",
                        "Value": "654A417764214CFC9406CF086438DA77"
                    },
                    {
                        "Name": "ShippingFirstName",
                        "Value": "Testperson-nl"
                    },
                    {
                        "Name": "ShippingLastName",
                        "Value": "Approved"
                    },
                    {
                        "Name": "ShippingStreet",
                        "Value": "Jaherkade 3 D"
                    },
                    {
                        "Name": "ShippingPostalCode",
                        "Value": "2521VA"
                    },
                    {
                        "Name": "ShippingCity",
                        "Value": "Gravenhage"
                    },
                    {
                        "Name": "ShippingCountry",
                        "Value": "NL"
                    },
                    {
                        "Name": "ShippingPhoneNumber",
                        "Value": "0698765432"
                    },
                    {
                        "Name": "ShippingEmail",
                        "Value": "[email protected]"
                    }
                ]
            }
        ]
    }
}

Order UpdateReservation Request

{
    "Currency": "EUR",
    "Invoice": "Ref.1 OrderID updated",
    "ClientIP": {
        "Type": 0,
        "Address": "0.0.0.0"
    },
    "Services": {
        "ServiceList": [
            {
                "Name": "klarna",
                "Action": "UpdateReservation",
                "Parameters": [
                    {
                        "Name": "DataRequestKey",
                        "Value": "654A417764214CFC9406CF086438DA77"
                    },
                    {
                        "Name": "ArticleTitle",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "Blue Toy Car"
                    },
                    {
                        "Name": "ArticleNumber",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "12345"
                    },
                    {
                        "Name": "ArticleType",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "General"
                    },
                    {
                        "Name": "ArticleQuantity",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "1"
                    },
                    {
                        "Name": "ArticlePrice",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "10.00"
                    },
                    {
                        "Name": "ArticleVat",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "21"
                    },
                    {
                        "Name": "ArticleImageUrl",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "https://apod.nasa.gov/apod/image/2210/ngc4631_sherick.jpg"
                    },
                    {
                        "Name": "ArticleProductUrl",
                        "GroupType": "Article",
                        "GroupID": "1",
                        "Value": "https://apod.nasa.gov/apod/astropix.html"
                    }
                ]
            }
        ]
    }
}

Full UpdatedReservation Request

You can find the Full update request Json in the files coming along with this document. File name: Full update reserve request

UpdateReservation Response

{
    "Key": "354CEDA9094E4699931FAE6DB22485C0",
    "Status": {
        "Code": {
            "Code": 190,
            "Description": "Success"
        },
        "SubCode": {
            "Code": "S990",
            "Description": "The request was successful."
        },
        "DateTime": "2026-02-02T09:30:27"
    },
    "RequiredAction": null,
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "RequestErrors": null,
    "ServiceCode": "Klarna",
    "IsTest": true,
    "ConsumerMessage": null
}

Response Parameters

ParameterTypeOCMDescription
ServiceCodestringMService label is Klarna
CodestringMContains the status of the UpdateReservation not the Reservation
IsTestbooleanMIf there are actual funds processed

UpdateReservation Push

{
  "DataRequest": {
    "Key": "13F9A3BBE2B045D9B97FD51BE11A2F23",
    "Invoice": null,
    "ServiceCode": "Klarna",
    "ActionCode": "UpdateReservation",
    "Status": {
      "Code": {
        "Code": 190,
        "Description": "The request was successful."
      },
      "SubCode": null,
      "DateTime": "2023-03-27T09:29:37"
    },
    "IsTest": true,
    "Order": null,
    "Currency": "EUR",
    "AmountDebit": 0,
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "MutationType": 0,
    "IssuingCountry": null,
    "StartRecurrent": false,
    "Recurring": false,
    "CustomerName": null,
    "PayerHash": null,
    "PaymentKey": null
  }
}

Push Parameters

ParameterTypeOCMDescription
ServiceCodestringMService label is Klarna
CodestringMContains the status of the UpdateReservation not the Reservation
IsTestbooleanMIf there are actual funds processed

ExtendReservation action

ExtendReservation

If there is a need to extend the guarantee of Klarna on the reservation, this can be requested by extending the reservation.

ExtendReservation Request

{
    "Description": "Test Klarna Extend reservation period",
    "Services": {
        "ServiceList": [
            {
                "Name": "Klarna",
                "Action": "ExtendReservation",
                "Parameters": [
                    {
                        "Name": "DataRequestKey",
                        "Value": "C9CDB227F75E43B8B6075CBF9C0A48FE"
                    }
                ]
            }
        ]
    }
}

Request Parameters

ParameterTypeOCMDescription
DataRequestKeystringMBuckaroo datarequest key

ExtendReservation Response

{
    "Key": "7848CD2D67DA45AA8EAA08BE0E96E99C",
    "Status": {
        "Code": {
            "Code": 190,
            "Description": "Success"
        },
        "SubCode": {
            "Code": "S990",
            "Description": "The request was successful."
        },
        "DateTime": "2026-02-02T10:07:45"
    },
    "RequiredAction": null,
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "RequestErrors": null,
    "ServiceCode": "Klarna",
    "IsTest": true,
    "ConsumerMessage": null
}

Response Parameters

ParameterTypeOCMDescription
ServiceCodestringMService label is Klarna
CodestringMContains the status of the ExtendReservation not the Reservation
IsTestbooleanMIf there are actual funds processed