Customize how long a Payment Request stays valid using the interaction_expiry field. Configure expiration windows between 15 minutes and 48 hours using ISO 8601 durations or absolute timestamps.
By default, a Payment Request expires 3 hours after creation. The interaction_expiry field overrides this default and aligns the Payment Request lifetime with the Partner's business requirements (a shorter window for flash sales or a longer one for complex purchases such as travel bookings).
Set interaction_expiry inside customer_interaction_config when calling createPaymentRequest. The resulting expiration is reflected in the expires_at field of the Payment Request response and remains in effect for the entire lifetime of the Payment Request, so it does not need to be repeated on subsequent calls. After expires_at, the Payment Request is expired and deleted, and no further actions can be taken on it.
Use interaction_expiry when the default 3-hour window does not match the Partner's business requirements.
Scenario
Suggested format
Example value
Why
Airline and travel bookings
Duration
"duration": "PT15M"
Flight fares change frequently. A short window ensures the quoted price is still valid when the customer completes payment.
Flash sales, limited-time offers
Duration
"duration": "PT15M"
Short window prevents customers from holding expired deals.
In-store kiosk or point-of-sale
Duration
"duration": "PT30M"
Matches typical kiosk session timeout.
Standard online checkout
Duration
"duration": "PT1H"
Gives customers time without keeping Payment Requests open too long.
Complex purchases (insurance, custom orders)
Duration
"duration": "PT24H"
Allows time for multi-step decisions.
Hard deadline (event tickets, auction closing)
Timestamp
"timestamp": "2025-06-15T18:30:00Z"
Payment Request expires at the exact moment the offer ends.
Duration is recommended for most use cases. It does not require clock synchronization between the Partner's server and Klarna, making it simpler and less error-prone.
Must be between 15 minutes and 48 hours from the time of Payment Request creation.
2025-06-15T18:30:00Z, 2025-12-31T23:59:59Z
The expiry value must resolve to between 15 minutes and 48 hours from the time of Payment Request creation. Values outside this range return a 400 Bad Request error.
In this example, the Payment Request was created at 12:00:00Z with a duration of PT30M, so expires_at is 12:30:00Z (30 minutes after creation instead of the default 3 hours).
Subscribe to the payment.request.state-change.expired Klarna webhook to detect when a Payment Request expires. Use this event to prompt the customer to restart the checkout.
When the Payment Request expires before the customer completes the Klarna Purchase Journey, restart the flow with a new call to createPaymentRequest. Include the same payment context (amount, currency, supplementary_purchase_data) as the original request.
Align expiry with the checkout session timeout: when the checkout session expires in 30 minutes, set interaction_expiry to PT30M. This prevents orphaned Payment Requests that stay open after the session ends.
Use duration for relative timeouts: duration values such as PT30M do not require clock synchronization between the Partner's server and Klarna, making them simpler and less error-prone.
Use timestamps for hard deadlines: when the Payment Request must expire at a specific point in time (for example, when a fare lock or auction closes), use the timestamp format.
Subscribe to expiry Klarna webhooks: handle the payment.request.state-change.expired event to detect expirations and take appropriate action, such as prompting the customer to restart the checkout.
Keep session lifetimes aligned: the Payment Request lifetime must match the Partner's checkout session. When the Partner's session terminates or expires, call cancelPaymentRequest to close the Payment Request. Aligning the two preserves session continuity and avoids handover issues with the Partner's own session-management logic.