Update a Payment Request

Learn how to update an existing payment request while it's in the SUBMITTED state. This operation allows you to modify payment details, supplementary purchase data, or customer interaction configuration before the customer enters the Klarna Purchase Journey.

Introduction

Update an existing Payment Request while it's still in the SUBMITTED state. This operation allows you to modify payment details, supplementary purchase data, or customer interaction configuration before the customer enters the Klarna Purchase Journey.

Prerequisites

Before updating a Payment Request, ensure the following:

  • A valid Partner Account with API credentials
  • Backend capability to receive and process Klarna webhooks
  • An existing Payment Request in SUBMITTED state
  • The payment_request_id of the Payment Request to update

Request

Call updatePaymentRequestAPI with the payment_request_id and provide the fields you want to update.

Sample request

SHELL
curl -X PUT https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/requests/{payment_request_id} \
  -H 'Authorization: Basic <API key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": 12500,
        "supplementary_purchase_data": {
          "line_items": [
            {
              "name": "Updated Product Name",
              "quantity": 2,
              "total_amount": 12500
            }

Response

The API returns the updated Payment Request with the same structure as returned by authorizePaymentAPI when a step up is triggered, reflecting the changes made.

Sample response

JSON
{
  "payment_request_id": "krn:payment:eu1:request:10be1d49-7beb-6b24-b9dd-8c14d0528503",
  "state": "SUBMITTED",
  "state_context": {
    "customer_interaction": {
      "method": "HANDOVER",
      "payment_request_id": "krn:payment:eu1:request:10be1d49-7beb-6b24-b9dd-8c14d0528503",
      "payment_request_url": "https://pay.klarna.com/l/ZjW2Xipgh0tjbrBGD7hzJM"
    }
  },
  "expires_at": "2025-02-26T17:25:34.534721775Z",
  "created_at": "2025-02-24T17:25:34.534721775Z",

Webhook

Subscribe to the payment.request.updated webhook event using the guidelines provided here. Klarna sends this event when a Payment Request is successfully updated.

Sample payload

JSON
{
  "metadata": {
    "event_type": "payment.request.updated",
    "event_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "event_version": "v2",
    "occurred_at": "2025-02-24T17:30:00Z",
    "correlation_id": "3e2668f9-28d4-577d-a35d-c0b4f02d3b13",
    "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
    "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
    "product_instance_id": "krn:partner:product:payment:ad71bc48-8a07-4919-[...]",
    "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-[...]",
    "live": false

Use cases

Update Payment Requests before customer interaction begins to handle common checkout scenarios such as cart changes, promotions, or configuration updates.

Update payment amount

Update the amount when cart contents change or promotions are applied.

JSON
{
  "amount": 15000,
  "currency": "USD"
}

Update line items

Modify line items to reflect changes in the shopping cart.

JSON
{
  "amount": 15000,
  "supplementary_purchase_data": {
    "line_items": [
      {
        "name": "Premium Product Bundle",
        "quantity": 1,
        "total_amount": 15000
      }
    ]
  }
}

Update customer interaction configuration

Change return URLs or interaction method before the customer enters the purchase flow.

JSON
{
  "customer_interaction_config": {
    "method": "HANDOVER",
    "return_url": "https://example.com/new-return-url",
    "app_return_url": "merchantapp://new-callback"
  }
}

Related articles

Setup your webhooks