• France
status page
demonstrations
assistance
FAQContact support
Search
Categories
Tags
English
French
English
Homepage
Use cases
Create a payment
Create an installment payment
Create a multi-card (split) payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
Snippets
Payment methods
Plugins
Guides
Merchant Back Office
Functional guides

Step 5: Analyze the payment result

Objective

  • Analyzing the payment result:

    • Via the IPN (Instant Payment Notification), during a server-to-server call.

    • Via the return to the shop, during the browser return.

I. Response structure

PARAMETER Description
kr-hash-key Type of key to sign thekr-answer. The possible values are:passwordfor the IPN /sha256_hmacfor the return to shop.
kr-hash-algorithm Algorithm used to calculate the hash. Its value is sha256_hmac.
kr-answer Object containing the payment result, encoded in JSON.
kr-answer-type Type the JSON object stored in kr-answer.
kr-hash Hash of the JSON object stored in kr-answer. It allows to verify the authenticity of the response.

The kr-hash value depends on the key.

  • For the IPN, the key corresponds to the Test or production password. See point 2 in the screenshot.
  • For returning to the store, the key corresponds to the test or production HMAC-SHA 256 key. See point 4 in the screenshot.
  • Go to the REST API Keys tab, from the Settings > Shop to retrieve your keys.

II. Analyze the IPN (Instant Payment Notification)

It is imperative to retrieve and analyze the IPN payment data.

  • Retrieve the JSON from the IPN (IPN settings )
  • Check the authenticity of the notification with the value of kr-hash ( 2nd key of the REST API key table )
  • Check the payment status

Plus d'infos: Analyse de l'IPN (URL de notification).

III. Analyze the response when returning to the shop

In the HEAD, implement the kr-post-url-success initialization parameter to receive the payment result in case of successful payment (Step 4: Display the payment form).

  • Retrieve the JSON posted in the browser
  • Check the authenticity of the notification with the value of kr-hash ( 4th key of the REST API key table )
  • Check the payment status

.

VI. Simplified PHP example

In the sample folder, the sample files are:

  1. ipn.php.
  2. paid.php.

For more information, click on: Example files: ipn.php and paid.php

NEXT STEP N°6

© 2025 {'|'} All rights reserved to Scellius
25.18-1.11