Klarna · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for Klarna HPP Captures Payments API

7 actions 7 updates phrasing extends openapi/klarna-payments-api-openapi.yml
Generated by API Evangelist Written by API Evangelist tooling for Klarna's API. It is a proposal applied on top of the contract, not a document Klarna publishes.
View Overlay File View on GitHub Overlay Specification

What the actions change

x-apievangelist-phrasing

Targets 7

$.info
$.paths['/payments/v1/sessions'].post
$.paths['/payments/v1/sessions/{session_id}'].get
$.paths['/payments/v1/sessions/{session_id}'].post
$.paths['/payments/v1/authorizations/{authorizationToken}'].delete
$.paths['/payments/v1/authorizations/{authorizationToken}/order'].post
$.paths['/payments/v1/authorizations/{authorizationToken}/customer-token'].post

OpenAPI Overlay

Raw ↑
# Generated by API Evangelist (build-phrasing.py). Our phrasing, not observed demand.
overlay: 1.0.0
info:
  title: API Evangelist conversational phrasing for Klarna HPP Captures Payments API
  version: 1.0.0
extends: openapi/klarna-payments-api-openapi.yml
actions:
- target: $.info
  update:
    x-apievangelist-phrasing:
      method: generated
      generated: '2026-09-26'
      generator: build-phrasing.py
      label: Generated by API Evangelist
      operations: 6
- target: $.paths['/payments/v1/sessions'].post
  update:
    x-apievangelist-phrasing:
      intent: Start a payment session
      effect: write
      questions:
      - How do I start a Klarna Payments session and get a client token for the browser?
      - Which payment method categories can I offer for a given cart and country?
      instructions:
      - text: Create a payment session for {order_amount} {purchase_currency} in {purchase_country}.
        slots:
          order_amount: requestBody.order_amount
          purchase_currency: requestBody.purchase_currency
          purchase_country: requestBody.purchase_country
      - text: Start a payment session for cart {order_lines} with intent {intent}.
        slots:
          order_lines: requestBody.order_lines
          intent: requestBody.intent
      method: generated
      generated: '2026-09-26'
- target: $.paths['/payments/v1/sessions/{session_id}'].get
  update:
    x-apievangelist-phrasing:
      intent: Get a payment session
      effect: read
      questions:
      - What data has been collected so far in a payment session?
      - Can I check a payment session's status after it's created?
      instructions:
      - text: Get payment session {session_id}.
        slots:
          session_id: path.session_id
      - text: Show everything collected in payment session {session_id}.
        slots:
          session_id: path.session_id
      method: generated
      generated: '2026-09-26'
- target: $.paths['/payments/v1/sessions/{session_id}'].post
  update:
    x-apievangelist-phrasing:
      intent: Update a payment session
      effect: write
      questions:
      - The shopper added an item to the cart, how do I update their payment session?
      - Can I change the customer details on a payment session after the checkout reloads?
      instructions:
      - text: Update payment session {session_id} to amount {order_amount}.
        slots:
          session_id: path.session_id
          order_amount: requestBody.order_amount
      - text: Replace the cart on payment session {session_id} with {order_lines}.
        slots:
          session_id: path.session_id
          order_lines: requestBody.order_lines
      method: generated
      generated: '2026-09-26'
- target: $.paths['/payments/v1/authorizations/{authorizationToken}'].delete
  update:
    x-apievangelist-phrasing:
      intent: Release an unused payment authorization
      effect: destructive
      questions:
      - What do I do with an authorization token I'm not going to turn into an order?
      - Can I cancel an authorization before any order is placed?
      instructions:
      - text: Cancel authorization {authorizationToken}.
        slots:
          authorizationToken: path.authorizationToken
      - text: Release the unused payment authorization {authorizationToken}.
        slots:
          authorizationToken: path.authorizationToken
      method: generated
      generated: '2026-09-26'
- target: $.paths['/payments/v1/authorizations/{authorizationToken}/order'].post
  update:
    x-apievangelist-phrasing:
      intent: Place an order from an authorization
      effect: write
      questions:
      - After a successful authorization, how do I turn it into an order?
      - Can I auto-capture when placing an order from an authorization token?
      instructions:
      - text: Place an order with authorization {authorizationToken} for {order_amount} {purchase_currency}.
        slots:
          authorizationToken: path.authorizationToken
          order_amount: requestBody.order_amount
          purchase_currency: requestBody.purchase_currency
      - text: Create an order from authorization {authorizationToken} for cart {order_lines} shipped in {purchase_country}.
        slots:
          authorizationToken: path.authorizationToken
          order_lines: requestBody.order_lines
          purchase_country: requestBody.purchase_country
      method: generated
      generated: '2026-09-26'
- target: $.paths['/payments/v1/authorizations/{authorizationToken}/customer-token'].post
  update:
    x-apievangelist-phrasing:
      intent: Save a customer token from an authorization
      effect: write
      questions:
      - How can I store a customer's payment method for future charges after they authorize?
      - Can I generate a reusable customer token instead of placing the order right away?
      instructions:
      - text: Generate a customer token from authorization {authorizationToken} for {intended_use} described as {description}.
        slots:
          authorizationToken: path.authorizationToken
          intended_use: requestBody.intended_use
          description: requestBody.description
      - text: Create a reusable token from authorization {authorizationToken} in {purchase_country} with {purchase_currency} and locale {locale}.
        slots:
          authorizationToken: path.authorizationToken
          purchase_country: requestBody.purchase_country
          purchase_currency: requestBody.purchase_currency
          locale: requestBody.locale
      method: generated
      generated: '2026-09-26'