Processing data specific to the Klarna payment response
The IPN URL will contain the following information:
- Identify the payment result by retrieving the value of the vads_trans_status field.
Table 1. List of fields to analyze - Klarna payment Field name Description Value vads_trans_status Payment status The possible values are:
- AUTHORISEDAccepted, waiting for capture
- AUTHORISED_TO_VALIDATEAccepted, waiting for validation
- WAITING_AUTHORISATIONThis status is returned when the buyer's risk status is awaiting validation by Klarna.
- ABANDONEDPayment abandoned by the buyer
- CANCELEDCanceled by the merchant
For more information, see the Payment Form Implementation Guide available in our online documentation archive (https://payzen.io/fr-FR/).
- Register the order by identifying the value of the vads_order_id field if you have transmitted it in the payment form.
- Register the payment reference by identifying the value of the vads_trans_id field.
- Save the value of the vads_trans_date field to identify the transaction creation date.
- Save the value of the vads_presentation_date field to identify the payment presentation date.
- Register the authorization result.
Field name Description Value vads_auth_result Return code of the authorization request sent by Klarna The possible values are:
- 1 : success
- 2 : pending at Klarna
- 3 : failure
- In case of success, save the value of the vads_auth_number field to identify the Klarna reservation number. This number indicates that the payment has been authorized and successfully performed.
- Save the payment amount and currency. To do so, retrieve the values of the following fields:
Field name Description vads_amount Amount of the payment (in the smallest currency unit). vads_currency Code of the currency used for the payment. vads_change_rate Applied exchange rate. vads_effective_amount Payment amount in the currency used for capture in the bank.
- Save all the information about the purchase, the buyer (invoicing) and the shipping. This data will be provided in the response only if it has been sent in the payment form.The values of the fields are identical to the ones submitted in the form.