It is possible when integrating HPP to received status changes callbacks to a certain URL. This address that is unique to every session will be called by our systems whenever the status of the session is updated. This is really handy to create interaction whenever something happens and avoid to have a costly polling mechanism.
It is advised to read our guide on how to track the HPP Session status changes.
When creating the HPP Session, you need to pass an URL in the status_update field of the merchant_urls. This URL will be called by HPP each time the status of the HPP Session is updated on Consumers actions, it contains the new status of the HPP Session the same way it would be gotten by reading the HPP Session from the read session endpoint of the API.
Description | POST the Status of the HPP Session to the integrator |
---|---|
URL | HPP will use merchant_urls.status_updatereceived in the create session call |
Operation | POST |
Example | curl -X POST <merchant_urls.status_update> --data “<content>” |
Field Key | Type | Description |
---|---|---|
event_id | String | Identifier of the event, allowing the integrator to de-duplicate operations if needed. |
session | JSON | And object representing the session status when the event occurred. Content is exactly the same as one could get from the read session endpoint. |
The calls made to the status_update URL will be made by HPP without waiting for any response from your server. It is expected from the the URL to send back a 2xx status code response.
In case no response is gotten in less than 3 seconds, there will be a retry after a few seconds. This mechanism will happen up to three times, with 4 calls being made for the same events. If of these calls are unanswered, the callback mechanism will end.
The URL provided as status_update must be over HTTPS, but to be able to authenticate that the callback comes from Klarna, it is advised to generate a one time token that you will only use for this specific HPP Session.
This lets you validate that the call made to you on an update of status is only made by us.
The value passed here 7d1cbc3b-b30c-4be2-a8c4-dc76482d7bf6 could be something that is generated by the integrator for every new session.
These are the callbacks that an integration layer will get when an HPP Session is completed.
To learn more about place_order_mode, read our guide on how to integrate Klarna Payments with HPP.
Default value for place_order_mode
With place_order_mode as PLACE_ORDER or CAPTURE_ORDER
Klarna Checkout