LogoLogo
More resourcesContact us
  • Developers Docs
    • Welcome to scalexpert API docs
  • Ready to start
    • ๐Ÿ†•Before you start
    • ๐Ÿ†•API developer space (merchant portal)
      • Connect your developer space (Merchant portal)
      • ๐Ÿ†•API key
    • Get Started
      • Integrate e-financing with APIs
      • Integrate Warrenty extension with APIs
      • ๐ŸšงIntegrate Fintecture payments
      • ๐ŸšงIntegrate Marketplace services with APIs
  • Integration Guides
    • Integration Modes
      • APIs
        • APIs postman collection
        • ๐ŸงชSandboxes (Beta)
        • ๐Ÿ†•Snippet code for simulation widget
          • Snippet front guide
          • Snippet back-end guide (optional)
      • Plugins CMS solutions
        • Prestashop 1.6, 1.7, 8.1
          • Prestashop installation
          • ๐Ÿ†•Prestashop customization
          • Prestashop financing requests follow-up
          • Prestashop advanced features
        • Magento CE & EE 2.4.4 , 2.4.6, 2.4.7
          • Magento installation
          • Magento customization
        • ๐Ÿ†•WooCommerce
          • WooCommerce installation
          • Woocommerce customization
          • WooCommerce themes setting and customization
          • ๐Ÿ†•WooCommerce statuses mapping
      • ๐ŸšงPSP integration (e-financing only)
      • ๐ŸšงFintecture integration modes
        • No code
        • Merchant integration (plugin)
        • API integration
        • Recipes
      • FAQ
    • Go-Live check-list
  • SOLUTIONS REFERENCE
    • e-Financing journeys
      • Initiate an e-financing journey
      • Split Payment Journey France
      • Long Term Credit Journey France
      • Long Term Credit Journey Germany
      • Delivery, Cancellation journeys
        • ๐Ÿ†•Delivery e-financing journey
        • Cancellation e-financing journey
      • E-financing Status life cycle
    • Contextual Insurance journeys
      • Initiate an insurance journey
      • Create an insurance quotation
      • Subscribe to an insurance policy
      • Insurance Status life cycle
    • Showcasing solutions
    • Testing solutions
    • Payments journeys
      • ๐ŸšงImmediate payment (Fintecture)
      • ๐ŸšงSmart Transfer (Fintecture)
      • ๐ŸšงRequest To Pay (Fintecture)
    • ๐ŸšงMarketplaces journeys
  • API Reference
    • APIs overview
      • API URLs
      • Authentication
      • Scopes
      • Versioning
      • Error object & codes
      • API console (advance features)
        • API catalog (advanced feature)
        • Manage your developer organization (advanced features)
    • ๐Ÿ†•e-Financing API
      • V 1.7.1 - e-Financing API
      • Depreciated versions e-Financing API
        • V 1.7.0 - e-Financing API
        • V 1.6.6 - e-Financing API
        • V 1.3.7 - e-Financing API
      • e-financing error codes
    • ๐Ÿ†•Insurance API
      • V 1.7.1 - Insurance API
      • Retired versions Insurance API
        • V 1.6.0 - Insurance API
        • V 1.3.8 - Insurance API
        • V 1.3.5 - Insurance API
        • V 1.1 - Insurance API
        • V 1.0 - Insurance API
      • Insurance error codes
    • Merchant-Webhooks API
      • V 1.0.6 - Merchant Webhooks API
      • Webhook event types
      • Webhook error codes
    • oAuth2 API
    • ๐ŸšงMarketplace services API
      • ๐Ÿ†•Marketplace Services API
        • Endpoints sellers on boarding
        • Endpoints orders management
      • Marketplace services error codes
    • ๐ŸšงFintecture Payments API reference
    • UAT API for partners
  • Webhooks
    • How to subscribe, use Webhooks
  • Security
    • Security best practices
  • Support
    • How to contact us?
Powered by GitBook
On this page
  • API Integration Guide
  • Table of Contents
  • 1. Introduction
  • 2. API Overview
  • 3. Getting Started
  • 4. API Integration Steps

Was this helpful?

  1. Integration Guides
  2. Integration Modes

APIs

How to integrate our solutions with APIs

API Integration Guide

Table of Contents

  1. Introduction

  2. API Overview

  3. Getting Started

  4. API Integration Steps

  5. Best Practices and Considerations

  6. Troubleshooting and Support

In this guide you will find snippets for Node.js, Java, PHP and Python server langages.

1. Introduction

This API integration guide will walk you through the process of setting up your environments so you can later consume scalexpert APIs into your application or platform.

By integrating these APIs, you'll be able to initiate and manage e-financing subscriptions on behalf of your customers or dynamically propose warranty extensions for some items on their basket prior checkout.

2. API Overview

The APIs allow for seamless interaction with our platform, enabling you to initiate and manage financing or insurance proposals seamlessly pro-grammatically . Here are some key aspects of the APIs:

  • RESTful architecture: Utilize standard HTTP methods (GET, POST, PUT, DELETE) to interact with the API.

  • JSON-based data format: Send and receive data in JSON format, ensuring compatibility and ease of integration across different programming languages.

  • oAuth2 client credentials authentication flow (server to server).

For more details refer to:

Authentication and Authorization

Refer to authentication API reference for more details:

Obtain an oAuth2 access token

Node.js native
var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
  'method': 'POST',
  'hostname': 'api.e-commerce.societegenerale.com',
  'path': '/baas/prod/auth-server/api/v1/oauth2/token',
  'headers': {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Basic ZmU3ZmVmYjktNmEyZ...zdqQW89'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = qs.stringify({
  'grant_type': 'client_credentials',
  'scope': 'e-financing:rw'
});

req.write(postData);

req.end();
PHP - HTTP2_request2
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.e-commerce.societegenerale.com/baas/prod/auth-server/api/v1/oauth2/token');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/x-www-form-urlencoded',
  'Authorization' => 'Basic ZmU3ZmV...dqQW89'
));
$request->addPostParameter(array(
  'grant_type' => 'client_credentials',
  'scope' => 'e-financing:rw'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
Java - OKHttp
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "grant_type=client_credentials&scope=e-financing:rw");
Request request = new Request.Builder()
  .url("https://api.e-commerce.societegenerale.com/baas/prod/auth-server/api/v1/oauth2/token")
  .method("POST", body)
  .addHeader("Content-Type", "application/x-www-form-urlencoded")
  .addHeader("Authorization", "Basic ZmU3ZmV...QW89")
  .build();
Response response = client.newCall(request).execute();
Python request
import requests

url = "https://api.scalexpert.uatc.societegenerale.com/baas/uatc/auth-server/api/v1/oauth2/token"

payload = 'grant_type=client_credentials&scope=e-financing%3Arw'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Authorization': 'Basic ZmU3ZmVm...tRcnc9'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

API Endpoints and Request/Response Formats

The API provides various endpoints for managing subscriptions or retrieving relevant data. Each endpoint supports specific actions and requires specific parameters. Requests should include appropriate headers, and responses are returned in JSON format.

Refer to the API reference section for detailed information on each endpoint, including request/response examples and required parameters.

3. Getting Started

Prerequisites for Integration

Before starting the integration process, make sure you have complete the prerequisites. Refer to "Before you start" pages for more details

Also have a look at "Security best practices" pages. For instance, make attention that API must be implemented at server side and not at front side.

API Access Credentials and Keys

Refer to "Before you start/API key" section for instructions:

Testing Environment Setup

Set up a testing environment to ensure smooth integration and testing of the E-Financing API:

  • API Documentation: Familiarize yourself with the API documentation, including endpoint details, request/response examples, and any available snippets that can expedite the integration process.

4. API Integration Steps

Now let's dive into the steps involved in integrating the E-Financing API into your application or platform:

Step 1: Check Eligible E-Financing Solutions

To determine the eligible e-financing solutions available for a specific purchase, follow these steps:

  1. Collect Purchase Information: Gather relevant purchase details, such as the total amount and country of the buyer end user (or by default country of your site).

  2. Make a GET Request: Utilize the API endpoint responsible for checking eligibility, passing the necessary purchase information.

  3. Handle Response: Capture and process the response, which will indicate the available e-financing solutions and their associated merchant communication kit informations.

  4. According the response render the solution to end users for instance on product page by showcasing the solutions (see next step).

Node.js native
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'api.scalexpert.uatc.societegenerale.com',
  'path': '/baas/uatc/e-financing/api/v1/eligible-solutions?financedAmount=500&buyerBillingCountry=FR',
  'headers': {
    'Authorization': 'Bearer eyJlbmMiOi...TxWr8u9ooNMZ3zI'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();
PHP - HTTP_request2
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.scalexpert.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/eligible-solutions?financedAmount=500&buyerBillingCountry=FR');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer eyJlbmMiOiJBMjU2Q0JDLUhTNT...TxWr8u9ooNMZ3zI'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
Java - OKHttp
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://api.scalexpert.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/eligible-solutions?financedAmount=500&buyerBillingCountry=FR")
  .method("GET", body)
  .addHeader("Authorization", "Bearer eyJlbmMiOiJBMjU2Q0JDLUhTN...Wr8u9ooNMZ3zI")
  .build();
Response response = client.newCall(request).execute();
Python request
import requests

url = "https://api.scalexpert.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/eligible-solutions?financedAmount=1000&buyerBillingCountry=FR"

payload = {}
headers = {
  'Authorization': 'Bearer eyJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwiYWxnIjoiQTI1NktXIn0.ftNiQraQFkH9i0oHOCGXZ465HxD8-lEzdPfczpGVWMk04zY...Fzgpmok-aK9ljGv7cM8'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Step 2: Showcasing the solutions

Response GET /eligible-solutions
{
    "solutions": [
        {
            "solutionCode": "SCFRLT-TXNO",
            "familyCode": "SC",
            "marketCode": "FR",
            "conditions": "PS",
            "communicationKit": {
                "solutionCode": "SCFRLT-TXNO",
                "visualTitle": "<div class=scalexpert_title>Etalez votre paiment avec un crรฉdit</div>",
                "visualDescription": "Un crรฉdit vous engage et doit รชtre remboursรฉ. Vรฉrifiez vos capacitรฉs de remboursement avant de vous engager.",
                "visualInformationIcon": "https://scalexpert.societegenerale.com/app/merchantKit/visual_information_icon.svg",
                "visualAdditionalInformation": "<div class=scalexpert_subtitle>Comment รงa marche ?</div><ol> <li>Ajoutez le produit ร  votre panier et finalisez votre achat. Validez votre panier</li> <li>Au moment du paiement, choisissez d'รฉtaler votre paiement avec un crรฉdit.</li> <li>Renseignez les informations demandรฉes, munissez-vous de votre piรจce d'identitรฉ et signez รฉlectroniquement votre contrat de financement. Obtenez une rรฉponse immรฉdiate de notre partenaire FRANFINANCE. <br>C'est terminรฉ! </li></ol>",
                "visualLegalText": "<div class=scalexpert_subtitle>Mentions lรฉgales</div><p>Un crรฉdit vous engage et doit รชtre remboursรฉ. Vรฉrifiez vos capacitรฉs de remboursement avant de vous engager. Offre valable toute lโ€™annรฉe, ร  partir de 1000 euros de crรฉdit et sous rรฉserve dโ€™acceptation du crรฉdit affectรฉ par FRANFINANCE (SA au capital de 31.357.776,00 euros - 719 807 406 RCS Nanterre - 53 rue du Port, CS 90201, 92724 Nanterre Cedex - France -, Intermรฉdiaire en assurance inscrit lโ€™ORIAS Nยฐ 07 008 346 - www.orias.fr). Vous disposez dโ€™un dรฉlai de rรฉtractation de 14 jours ร  compter de la date de signature du contrat de crรฉdit. Le vendeur est intermรฉdiaire de crรฉdit non exclusif de FRANFINANCE, immatriculรฉ ร  lโ€™ORIAS sous le numรฉro XXXXX (www.orias.fr).</p>",
                "visualTableImage": null,
                "visualLogo": "https://scalexpert.societegenerale.com/app/merchantKit/e_financing_visual_logo_FR.svg",
                "visualInformationNoticeURL": null,
                "visualProductTermsURL": null
            }
        },
```

Rendering of communication KIT (ex long term credit):

<!-- create css classes scalexpert_title and scalexpert_subtitle and standard html tags according your graphical layout standards--> 

<div class=scalexpert_title>Etalez votre paiment avec un crรฉdit</div>

<div class=scalexpert_subtitle>Comment รงa marche ?</div>
<ol> 
    <li>Ajoutez le produit ร  votre panier et finalisez votre achat. Validez votre panier</li>
    <li>Au moment du paiement, choisissez d'รฉtaler votre paiement avec un crรฉdit.</li>
    <li>Renseignez les informations demandรฉes, munissez-vous de votre piรจce d'identitรฉ et signez รฉlectroniquement votre contrat de financement. Obtenez une rรฉponse immรฉdiate de notre partenaire FRANFINANCE. <br>C'est terminรฉ! </li>
</ol>

<div class=scalexpert_subtitle>Mentions lรฉgales</div>
<p>Un crรฉdit vous engage et doit รชtre remboursรฉ. Vรฉrifiez vos capacitรฉs de remboursement avant de vous engager. Offre valable toute lโ€™annรฉe, ร  partir de 1000 euros de crรฉdit et sous rรฉserve dโ€™acceptation du crรฉdit affectรฉ par FRANFINANCE (SA au capital de 31.357.776,00 euros - 719 807 406 RCS Nanterre - 53 rue du Port, CS 90201, 92724 Nanterre Cedex - France -, Intermรฉdiaire en assurance inscrit lโ€™ORIAS Nยฐ 07 008 346 - www.orias.fr). Vous disposez dโ€™un dรฉlai de rรฉtractation de 14 jours ร  compter de la date de signature du contrat de crรฉdit. Le vendeur est intermรฉdiaire de crรฉdit non exclusif de FRANFINANCE, immatriculรฉ ร  lโ€™ORIAS sous le numรฉro XXXXX (www.orias.fr).</p>

.scalexpert_title {
  color: #232323;
  font-weight: 700;
  font-size: x-large;
}
.scalexpert_subtitle {
  color: #232323;
  font-weight: 700;
}
.scalexpert_important {
  text-transform: uppercase;
}

Make sure at minimum "visualLegalText" is always rendered on your site for legal compliance.

Step 3: Initiate an E-Financing Subscription

To initiate an e-financing subscription for a customer, follow these steps:

  1. Collect Customer Information: Gather the required customer information, such as name, contact details, and billing address.

  2. Make a POST Request: Use the appropriate API endpoint, passing the necessary customer information and subscription details.

  3. Handle Response: Capture and process the response, which will contain the subscription ID and any additional information provided by the API.

Node.js - Native
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'api.e-commerce.uatc.societegenerale.com',
  'path': '/baas/uatc/e-financing/api/v1/subscriptions',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJlbmMiOiJBMjU2Q0J...u9ooNMZ3zI'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "financedAmount": 119.9,
  "solutionCode": "SCFRSP-4XTS",
  "merchantBasketId": "647aeb24-a89c-11ed-afa1-0242ac120002",
  "merchantGlobalOrderId": "XbB6_sMPbkvRk0y#206578",
  "merchantBuyerId": "701943",
  "merchantUrls": {
    "confirmation": "https://mymerchand.domain/uri"
  },
  "buyers": [
    {
      "billingContact": {
        "lastName": "Dupont",
        "firstName": "Paul",
        "commonTitle": "Mr.",
        "email": "paul.dupont@mail.com",
        "mobilePhoneNumber": "+33684749393",
        "professionalTitle": "Professor",
        "phoneNumber": "+33184749393"
      },
      "billingAddress": {
        "locationType": "billingAddress",
        "streetNumber": 147,
        "streetNumberSuffix": "B",
        "streetName": "main street",
        "streetNameComplement": "block 47",
        "zipCode": "92060",
        "cityName": "Paris",
        "regionName": "รŽle-de-France",
        "countryCode": "FR"
      },
      "deliveryContact": {
        "lastName": "Dupont",
        "firstName": "Paul",
        "commonTitle": "Mr.",
        "email": "paul.dupont@mail.com",
        "mobilePhoneNumber": "+33684749393",
        "professionalTitle": "Professor",
        "phoneNumber": "+33184749393"
      },
      "deliveryAddress": {
        "locationType": "billingAddress",
        "streetNumber": 147,
        "streetNumberSuffix": "B",
        "streetName": "main street",
        "streetNameComplement": "block 47",
        "zipCode": "92060",
        "cityName": "Paris",
        "regionName": "รŽle-de-France",
        "countryCode": "FR"
      },
      "contact": {
        "lastName": "Dupont",
        "firstName": "P",
        "commonTitle": "Mr.",
        "email": "paul.dupont@mail.com",
        "mobilePhoneNumber": "+33684749393",
        "professionalTitle": "Professor",
        "phoneNumber": "+33184749393"
      },
      "contactAddress": {
        "locationType": "billingAddress",
        "streetNumber": 147,
        "streetNumberSuffix": "B",
        "streetName": "main street",
        "streetNameComplement": "block 47",
        "zipCode": "92060",
        "cityName": "Paris",
        "regionName": "รŽle-de-France",
        "countryCode": "FR"
      },
      "deliveryMethod": "Click & Collect",
      "birthName": "Dupont",
      "birthDate": "01021975",
      "birthCityName": "Montpellier",
      "birthCountryName": "FR",
      "vip": false
    }
  ],
  "basketDetails": {
    "basketItems": [
      {
        "id": "M12345785513211",
        "quantity": 2,
        "model": "5KPM5",
        "label": "PANTALON B MAGO",
        "price": 9500,
        "currencyCode": "EUR",
        "orderId": "OD456742",
        "brandName": "KitchenAid",
        "description": "Le robot pรขtissier ร  bol relevable trรจs rรฉsistant idรฉal pour mixer de grandes quantitรฉs d'ingrรฉdients, รฉquipรฉ d'un bol en acier inoxydable amovible.",
        "specifications": "Puissance (W) 315, Tension (V) 220-240, Frรฉquence (Hz) 50/60",
        "category": "R78757857",
        "isFinanced": true,
        "sku": "50"
      }
    ]
  }
});

req.write(postData);

req.end();
PHP - Http_Request2
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.e-commerce.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/subscriptions');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer eyJlbmMiOiJBMjU2Q0JDLUh...- -_Request28u9ooNMZ3zI'
));
$request->setBody('{
\n    "financedAmount": 119.9,
\n    "solutionCode": "SCFRSP-4XTS",
\n    "merchantBasketId": "647aeb24-a89c-11ed-afa1-0242ac120002",
\n    "merchantGlobalOrderId": "XbB6_sMPbkvRk0y#206578",
\n    "merchantBuyerId": "701943",
\n    "merchantUrls": {
\n        "confirmation": "https://mymerchand.domain/uri"
\n    },
\n    "buyers": [
\n        {
\n            "billingContact": {
\n                "lastName": "Dupont",
\n                "firstName": "Paul",
\n                "commonTitle": "Mr.",
\n                "email": "paul.dupont@mail.com",
\n                "mobilePhoneNumber": "+33684749393",
\n                "professionalTitle": "Professor",
\n                "phoneNumber": "+33184749393"
\n            },
\n            "billingAddress": {
\n                "locationType": "billingAddress",
\n                "streetNumber": 147,
\n                "streetNumberSuffix": "B",
\n                "streetName": "main street",
\n                "streetNameComplement": "block 47",
\n                "zipCode": "92060",
\n                "cityName": "Paris",
\n                "regionName": "รŽle-de-France",
\n                "countryCode": "FR"
\n            },
\n            "deliveryContact": {
\n                "lastName": "Dupont",
\n                "firstName": "Paul",
\n                "commonTitle": "Mr.",
\n                "email": "paul.dupont@mail.com",
\n                "mobilePhoneNumber": "+33684749393",
\n                "professionalTitle": "Professor",
\n                "phoneNumber": "+33184749393"
\n            },
\n            "deliveryAddress": {
\n                "locationType": "billingAddress",
\n                "streetNumber": 147,
\n                "streetNumberSuffix": "B",
\n                "streetName": "main street",
\n                "streetNameComplement": "block 47",
\n                "zipCode": "92060",
\n                "cityName": "Paris",
\n                "regionName": "รŽle-de-France",
\n                "countryCode": "FR"
\n            },
\n            "contact": {
\n                "lastName": "Dupont",
\n                "firstName": "P",
\n                "commonTitle": "Mr.",
\n                "email": "paul.dupont@mail.com",
\n                "mobilePhoneNumber": "+33684749393",
\n                "professionalTitle": "Professor",
\n                "phoneNumber": "+33184749393"
\n            },
\n            "contactAddress": {
\n                "locationType": "billingAddress",
\n                "streetNumber": 147,
\n                "streetNumberSuffix": "B",
\n                "streetName": "main street",
\n                "streetNameComplement": "block 47",
\n                "zipCode": "92060",
\n                "cityName": "Paris",
\n                "regionName": "รŽle-de-France",
\n                "countryCode": "FR"
\n            },
\n            "deliveryMethod": "Click & Collect",
\n            "birthName": "Dupont",
\n            "birthDate": "01021975",
\n            "birthCityName": "Montpellier",
\n            "birthCountryName": "FR",
\n            "vip": false
\n        }
\n    ],
\n    "basketDetails": {
\n        "basketItems": [
\n            {
\n                "id": "M12345785513211",
\n                "quantity": 2,
\n                "model": "5KPM5",
\n                "label": "PANTALON B MAGO",
\n                "price": 9500,
\n                "currencyCode": "EUR",
\n                "orderId": "OD456742",
\n                "brandName": "KitchenAid",
\n                "description": "Le robot pรขtissier ร  bol relevable trรจs rรฉsistant idรฉal pour mixer de grandes quantitรฉs d\'ingrรฉdients, รฉquipรฉ d\'un bol en acier inoxydable amovible.",
\n                "specifications": "Puissance (W) 315, Tension (V) 220-240, Frรฉquence (Hz) 50/60",
\n                "category": "R78757857",
\n                "isFinanced": true,
\n                "sku": "50"
\n            }
\n        ]
\n    }
\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
Java - OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"financedAmount\": 119.9,\r\n    \"solutionCode\": \"SCFRSP-4XTS\",\r\n    \"merchantBasketId\": \"647aeb24-a89c-11ed-afa1-0242ac120002\",\r\n    \"merchantGlobalOrderId\": \"XbB6_sMPbkvRk0y#206578\",\r\n    \"merchantBuyerId\": \"701943\",\r\n    \"merchantUrls\": {\r\n        \"confirmation\": \"https://mymerchand.domain/uri\"\r\n    },\r\n    \"buyers\": [\r\n        {\r\n            \"billingContact\": {\r\n                \"lastName\": \"Dupont\",\r\n                \"firstName\": \"Paul\",\r\n                \"commonTitle\": \"Mr.\",\r\n                \"email\": \"paul.dupont@mail.com\",\r\n                \"mobilePhoneNumber\": \"+33684749393\",\r\n                \"professionalTitle\": \"Professor\",\r\n                \"phoneNumber\": \"+33184749393\"\r\n            },\r\n            \"billingAddress\": {\r\n                \"locationType\": \"billingAddress\",\r\n                \"streetNumber\": 147,\r\n                \"streetNumberSuffix\": \"B\",\r\n                \"streetName\": \"main street\",\r\n                \"streetNameComplement\": \"block 47\",\r\n                \"zipCode\": \"92060\",\r\n                \"cityName\": \"Paris\",\r\n                \"regionName\": \"รŽle-de-France\",\r\n                \"countryCode\": \"FR\"\r\n            },\r\n            \"deliveryContact\": {\r\n                \"lastName\": \"Dupont\",\r\n                \"firstName\": \"Paul\",\r\n                \"commonTitle\": \"Mr.\",\r\n                \"email\": \"paul.dupont@mail.com\",\r\n                \"mobilePhoneNumber\": \"+33684749393\",\r\n                \"professionalTitle\": \"Professor\",\r\n                \"phoneNumber\": \"+33184749393\"\r\n            },\r\n            \"deliveryAddress\": {\r\n                \"locationType\": \"billingAddress\",\r\n                \"streetNumber\": 147,\r\n                \"streetNumberSuffix\": \"B\",\r\n                \"streetName\": \"main street\",\r\n                \"streetNameComplement\": \"block 47\",\r\n                \"zipCode\": \"92060\",\r\n                \"cityName\": \"Paris\",\r\n                \"regionName\": \"รŽle-de-France\",\r\n                \"countryCode\": \"FR\"\r\n            },\r\n            \"contact\": {\r\n                \"lastName\": \"Dupont\",\r\n                \"firstName\": \"P\",\r\n                \"commonTitle\": \"Mr.\",\r\n                \"email\": \"paul.dupont@mail.com\",\r\n                \"mobilePhoneNumber\": \"+33684749393\",\r\n                \"professionalTitle\": \"Professor\",\r\n                \"phoneNumber\": \"+33184749393\"\r\n            },\r\n            \"contactAddress\": {\r\n                \"locationType\": \"billingAddress\",\r\n                \"streetNumber\": 147,\r\n                \"streetNumberSuffix\": \"B\",\r\n                \"streetName\": \"main street\",\r\n                \"streetNameComplement\": \"block 47\",\r\n                \"zipCode\": \"92060\",\r\n                \"cityName\": \"Paris\",\r\n                \"regionName\": \"รŽle-de-France\",\r\n                \"countryCode\": \"FR\"\r\n            },\r\n            \"deliveryMethod\": \"Click & Collect\",\r\n            \"birthName\": \"Dupont\",\r\n            \"birthDate\": \"01021975\",\r\n            \"birthCityName\": \"Montpellier\",\r\n            \"birthCountryName\": \"FR\",\r\n            \"vip\": false\r\n        }\r\n    ],\r\n    \"basketDetails\": {\r\n        \"basketItems\": [\r\n            {\r\n                \"id\": \"M12345785513211\",\r\n                \"quantity\": 2,\r\n                \"model\": \"5KPM5\",\r\n                \"label\": \"PANTALON B MAGO\",\r\n                \"price\": 9500,\r\n                \"currencyCode\": \"EUR\",\r\n                \"orderId\": \"OD456742\",\r\n                \"brandName\": \"KitchenAid\",\r\n                \"description\": \"Le robot pรขtissier ร  bol relevable trรจs rรฉsistant idรฉal pour mixer de grandes quantitรฉs d'ingrรฉdients, รฉquipรฉ d'un bol en acier inoxydable amovible.\",\r\n                \"specifications\": \"Puissance (W) 315, Tension (V) 220-240, Frรฉquence (Hz) 50/60\",\r\n                \"category\": \"R78757857\",\r\n                \"isFinanced\": true,\r\n                \"sku\": \"50\"\r\n            }\r\n        ]\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://api.e-commerce.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/subscriptions")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer eyJlbmMiOiJBMjU2Q0JDLU...vTxWr8u9ooNMZ3zI")
  .build();
Response response = client.newCall(request).execute();
Python Request
import requests
import json

url = "https://api.scalexpert.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/subscriptions"

payload = json.dumps({
  "financedAmount": 3000,
  "solutionCode": "SCFRSP-4XTS",
  "merchantBasketId": "647aeb24-a89c-11ed-afa1-0242ac120002",
  "merchantGlobalOrderId": "6Vh_mhvCUw9Nuvo#562850",
  "merchantBuyerId": "701943",
  "merchantUrls": {
    "confirmation": "https://mymerchand.domain/uri"
  },
  "buyers": [
    {
      "billingContact": {
        "lastName": "Dupont",
        "firstName": "Paul",
        "commonTitle": "MR",
        "email": "paul.dupont@mail.com",
        "mobilePhoneNumber": "+33684749393",
        "professionalTitle": "Professor",
        "phoneNumber": "+33184749393"
      },
      "billingAddress": {
        "locationType": "BILLING_ADDRESS",
        "streetNumber": 147,
        "streetNumberSuffix": "B",
        "streetName": "main street",
        "streetNameComplement": "block 47",
        "zipCode": "92060",
        "cityName": "Paris",
        "regionName": "รŽle-de-France",
        "countryCode": "FR"
      },
      "deliveryContact": {
        "lastName": "Dupont",
        "firstName": "Paul",
        "commonTitle": "MR",
        "email": "paul.dupont@mail.com",
        "mobilePhoneNumber": "+33684749393",
        "professionalTitle": "Professor",
        "phoneNumber": "+33184749393"
      },
      "deliveryAddress": {
        "locationType": "DELIVERY_ADDRESS",
        "streetNumber": 147,
        "streetNumberSuffix": "B",
        "streetName": "main street",
        "streetNameComplement": "block 47",
        "zipCode": "92060",
        "cityName": "Paris",
        "regionName": "รŽle-de-France",
        "countryCode": "FR"
      },
      "contact": {
        "lastName": "Dupont",
        "firstName": "Paul",
        "commonTitle": "MR",
        "email": "paul.dupont@mail.com",
        "mobilePhoneNumber": "+33684749393",
        "professionalTitle": "Professor",
        "phoneNumber": "+33184749393"
      },
      "contactAddress": {
        "locationType": "MAIN_ADDRESS",
        "streetNumber": 147,
        "streetNumberSuffix": "B",
        "streetName": "main street",
        "streetNameComplement": "block 47",
        "zipCode": "92060",
        "cityName": "Paris",
        "regionName": "รŽle-de-France",
        "countryCode": "FR"
      },
      "deliveryMethod": "Click & Collect",
      "birthName": "Dupont",
      "birthDate": "1990-10-21",
      "birthCityName": "Montpellier",
      "birthCountryName": "FR",
      "vip": False
    }
  ],
  "basketDetails": {
    "basketItems": [
      {
        "id": "M12345785513211",
        "quantity": 2,
        "model": "5KPM5",
        "label": "PANTALON B MAGO",
        "price": 1500,
        "currencyCode": "EUR",
        "orderId": "OD456742",
        "brandName": "KitchenAid",
        "description": "Le robot pรขtissier ร  bol relevable trรจs rรฉsistant idรฉal pour mixer de grandes quantitรฉs d'ingrรฉdients, รฉquipรฉ d'un bol en acier inoxydable amovible.",
        "specifications": "Puissance (W) 315, Tension (V) 220-240, Frรฉquence (Hz) 50/60",
        "category": "R78757857",
        "isFinanced": True,
        "sku": "50"
      },
      {
        "id": "M12345786661",
        "quantity": 2,
        "model": "5KPM5",
        "label": "P",
        "price": 1500,
        "currencyCode": "EUR",
        "orderId": "OD456743",
        "brandName": "KitchenAid",
        "description": "Le robot pรขtissier ร  bol relevable trรจs rรฉsistant idรฉal pour mixer de grandes quantitรฉs d'ingrรฉdients, รฉquipรฉ d'un bol en acier inoxydable amovible.",
        "specifications": "Puissance (W) 315, Tension (V) 220-240, Frรฉquence (Hz) 50/60",
        "category": "R78757887",
        "isFinanced": True,
        "sku": "ABC70"
      }
    ]
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer eyJlbmMiOiJBMjU2Q0JDL...aK9ljGv7cM8'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Step 4: Retrieve E-Financing Subscription Details

To retrieve the details of a specific e-financing subscription, follow these steps:

  1. Get Subscription ID: Obtain the unique subscription ID associated with the e-financing subscription you want to retrieve details for.

  2. Make a GET Request: Use the appropriate API endpoint, providing the unique subscription ID, to retrieve the subscription details.

  3. Handle Response: Capture and process the response, which will contain comprehensive information about the requested subscription, including payment schedule, repayment amounts, and status.

Node.Js - Native
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'api.e-commerce.hml.societegenerale.com',
  'path': '/baas/uat/e-financing/api/v1/subscriptions/eb6adb12-5c1d-4b30-9b24-7854d755cd55',
  'headers': {
    'Authorization': 'Bearer eyJlbmMiOiJBMjU2Q0JDLUhTNTE...Uj6m2ZXbgRPYXZ_8wKIRfI'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();
PHP - HttpRequest2
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.e-commerce.hml.societegenerale.com/baas/uat/e-financing/api/v1/subscriptions/eb6adb12-5c1d-4b30-9b24-7854d755cd55');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer eyJlbmMiOiJBMjU2Q0...Uj6m2ZXbgRPYXZ_8wKIRfI'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
Java - OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://api.e-commerce.hml.societegenerale.com/baas/uat/e-financing/api/v1/subscriptions/eb6adb12-5c1d-4b30-9b24-7854d755cd55")
  .method("GET", body)
  .addHeader("Authorization", "Bearer eyJlbmMiOiJBMjU2Q0JDLUhTNTE...zR3VcUj6m2ZXbgRPYXZ_8wKIRfI")
  .build();
Response response = client.newCall(request).execute();
Python Requests
import requests

url = "https://api.scalexpert.uatc.societegenerale.com/baas/uatc/e-financing/api/v1/subscriptions/cd89186e-1054-4ed2-a4ce-e495082c689a"

payload = {}
headers = {
  'Authorization': 'Bearer eyJlbmMiOiJBMjU2Q0JDLU...ok-aK9ljGv7cM8'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
PreviousIntegration ModesNextAPIs postman collection

Last updated 8 months ago

Was this helpful?

To access these APIs, you'll need to authenticate your requests by obtaining . API Keys are obtained from the developer portal, which serves as your access credential. They are used to authenticate your service using Upon authorization for the claimed scopes the issued token will be used to identify each subsequent request.

environment that will simulates the production environment. Use this environment for development, integration, and testing purposes.

Refer to

By "showcasing solutions" we mean rendering the solutions at product or checkout pages (see more details ). This will be possible with the response of and object "communicationKit" and its attributes that contains texts with HTML, logos, images ...

Refer to

Congratulations! You've now completed the API integration guide.

Happy integrating!

๐ŸŽ‰
๐Ÿ‘
APIs overview
Authentication
API Reference
๐Ÿ†•Before you start
Security best practices
๐Ÿ†•API key
API GET /eligible-solutions
here
GET /eligible-solutions
API POST /susbscriptions
oAuth 2.0 client credentials flow.
an oAuth2 access token
Try it on Codepen
User Acceptance Test for customer (UATC)
Communication Kit rendering