Klarna Web SDK v2
    Preparing search index...

    Interface PaymentRequest

    A Payment Request represents a request for a payment. The Payment Request lifecycle is defined in PaymentRequestStateType.

    Klarna automatically creates a payment request when a customer clicks the Klarna payment button and the paymentRequest property is defined. See KlarnaPaymentButton for more information.

    interface PaymentRequest {
        paymentRequestId: string;
        paymentRequestReference?: string;
        paymentRequestUrl: string;
        previousState?:
            | "SUBMITTED"
            | "IN_PROGRESS"
            | "COMPLETED"
            | "EXPIRED"
            | "CANCELED"
            | "DECLINED";
        state: | "SUBMITTED"
        | "IN_PROGRESS"
        | "COMPLETED"
        | "EXPIRED"
        | "CANCELED"
        | "DECLINED";
        stateContext?: PaymentRequestStateContext;
        stateReason?: | "PARTNER_CANCELED"
        | "PURCHASE_FLOW_ABORTED"
        | "TECHNICAL_ERROR";
    }
    Index
    paymentRequestId: string

    Unique identifier of this payment request.

    Prefer paymentRequestUrl for new integrations.

    paymentRequestReference?: string

    Reference to the payment session or equivalent resource created on your side. This will be exposed in payment request webhooks (payments.v2.request.*) for the purpose of correlating your resource with the Klarna Payment Request.

    paymentRequestUrl: string

    URL-based identifier of this payment request. Use this when handing the payment request off across systems (e.g. Sub-Partner delegated flows) and when calling KlarnaPayment.fetch.

    previousState?:
        | "SUBMITTED"
        | "IN_PROGRESS"
        | "COMPLETED"
        | "EXPIRED"
        | "CANCELED"
        | "DECLINED"

    Previous state of the payment request

    state:
        | "SUBMITTED"
        | "IN_PROGRESS"
        | "COMPLETED"
        | "EXPIRED"
        | "CANCELED"
        | "DECLINED"

    Current state of the payment request

    Context for the current state of the payment request

    stateReason?: "PARTNER_CANCELED" | "PURCHASE_FLOW_ABORTED" | "TECHNICAL_ERROR"

    Reason why the payment request is in its current state