• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
Europe (English)
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

Examples of codes for obtaining the authentication token

  • Basic mode

cURL example

curl -X GET \
https://secure.lyra.com/marketplace-test/marketplaces/57595c55-b096-41d8-9287-b98640de3f25 \
-H 'Authorization: Basic YWRtaW46YWRtaW4='
-H 'Content-Type: application/json'
-H 'cache-control: no-cache'

Example of a complete request in Python

import requests
def get_marketplace_details():
    uuid = "57595c55-b096-41d8-9287-b98640de3f25"
    url = f"https://secure.lyra.com/marketplace-test/marketplaces/{uuid}"
    return requests.get(url, auth=(login, password), 
                        headers={'content-type': 'application/json'})

Example of a request in .NET

var myURL = "https://secure.lyra.com/marketplace-test/orders?expand=items"
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(myURL);
myHttpWebRequest.ContentType = "application/json";
myHttpWebRequest.Accept = "application/json";
myHttpWebRequest.Method = "post";
string authInfo = userName + ":" + userPassword;
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
myHttpWebRequest.Headers["Authorization"] = "Basic " + authInfo;
  • Oauth2 mode:

cURL example

curl -X GET \
https://secure.lyra.com/marketplace-test/v1/marketplaces/57595c55-b096-41d8-9287-b98640de3f25 \
-H 'authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOi2lkIiA6ICJocXFZcjNkSlYycH...' \
-H 'cache-control: no-cache'

Example of a complete request in Python

import requests
def get_marketplace_details():
    uuid = "57595c55-b096-41d8-9287-b98640de3f25"
    url = f"https://secure.lyra.com/marketplace-test/v1/marketplaces/{uuid}"
    access_token = get_access_token()
    return requests.get(url, headers={'authorization': f"Bearer {access_token}",
                        'content-type': 'application/json'})
Jobs
Legal
GDPR
25.19-1.11