• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
docs.
France
Spain
Europe (English)
India
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
SDD mandates by REST API
Snippets
Payment methods
Plugins
Marketplace
Guides
Merchant Back Office
Back Office Expert
Functional guides

Step 2: Authenticate him/herself

Objective

  • Secure data exchanges.

I. Retrieving the keys

  1. Sign in to the Merchant Back Office

  2. Click on Other Actions , from the Merchant Back Office. The following window will appear:

Click onbom_expertto access yourbom_expert.
  • In the Settings > Shop menu, select your shop and go to the REST API keys tab.

Table of REST API keys :

For each use, there is a key for the TEST mode and a key for the PRODUCTION mode.

NUMBER KEY NAME Description
1 User For calls to REST Web Services
2 password For calls to REST Web Services and to verify the authenticity of data returned in the IPN
3 Public key. For creating a payment form in the Buyer's browser.
4 HMAC-SHA-256 Key In order to verify the authenticity of the data returned during the payment form response in the browser

This action is performed by a user who is authorized to manage keys and signing algorithms. Additionally, access to the REST API Keys tab requires specific functionality to be enabled. Please contact your customer service if you do not see this tab.

More info: REST API keys.

II. Authentication phase

  1. Create a string with the user and the password separated by a colon (:)
  • the username is the shop identifier: N° 1: user of the REST API key table
  • thePassword, for example, for the test storetestpassword_DEMOPRIVATEKEY23G4475zXZQ2UA5x7M:2: REST API key table password
  1. Encode the obtained chain in base64

  2. Add the “Authorization” header to your request containing the word “Basic” followed by the string encoded in base64:

    Authorization: Basic Njk4NzYzNTc6dGVzdHBhc3N3b3JkX0RFTU9QUklWQVRFS0VZMjNHNDQ3NXpYWlEyVUE1eDdN
  3. For example, for PHP , the Authorization header will be calculated as follows:

$header = "Authorization: Basic " . base64_encode($username . ':' . $password);

Here is an example of a request. You can use the TEST SDK provided in the Playground to test your integration.

The complete HTTP request will resemble the image below. You can use the TEST SDK available via the Playground.

/en-EN/rest/V4.0/api/kb/authentication.html
https://github.com/lyra/rest-php-examples/blob/master/www/SDKTest.php#L16-L26
https://api.lyra.com/api-payment/V4/Charge/SDKTest
{
    "value": "my testing value"
}

III. Code samples

Code samples, in different languages , are available in GitHub.

IV. Simplified example in PHP

In the sample folder, the file of this step is config.php. It allows you to define the authentication keys.

For more details, Example file: config.php.

NEXT STEP 3RD

Jobs
Legal
GDPR
25.18-1.11