This page explains how to add Titres-Restaurant to your existing Web Components integration.
Requirements
| Requirement | Description |
|---|---|
| Integration type | Make sure that you have built your Web Components integration. The minimum required version is 5.4.0. |
| Setup steps | Before you begin:
|
Import resources for v6
If you are using Web Components v6, import the Component that you need for Titres-Restaurant:
import { AdyenCheckout, MealVoucherFR } from '@adyen/adyen-web'
API reference
You do not need to send additional fields for Titres-Restaurant. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:
- /sessions: This is the default with Components v5.0.0 or later. For partial payments, you do not implement additional API requests. You only make the /sessions request from your server, with the full amount of the purchase. The Component handles the complete partial payment flow.
- /payments: This is for the Advanced flow. If you accept partial payments, you must implement additional API requests that are triggered by events in the Component configuration.
Component configuration
When creating an instance of the Component, specify which meal voucher issuer you want to use:
- mealVoucher_FR_natixis for Bimpli.
- mealVoucher_FR_sodexo for Sodexo.
- mealVoucher_FR_groupeup for Up Dejeuner.
Apetiz and mealVoucher_FR_natixis refer to Bimpli, the commercial brand for Natixis.
Step 1: Create a DOM element
Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:
<div id="mealVoucher_FR_sodexo-container"></div>
Step 2: Create an instance of the Component
Select your integration:
Test and go live
To test Titres-restaurant payments, you must get test credentials directly from the meal voucher issuer (Bimpli, Sodexo, or Up Déjeuner).
Before you can accept live payments, you must contact our Support Team to activate Titres-restaurant in your live environment.
Partial payments
For the Sessions flow:
When the meal voucher balance or transaction limit is less than the payment amount, the shopper can pay the rest with another payment method. A partial payment with a meal voucher works as follows:
- Your server makes a /sessions request with the full amount of the purchase.
- The Component sets up the session.
-
The shopper enters their meal voucher details, and the Component checks the meal voucher balance.
If the balance and the transaction limit cover the full amount, the Component makes the payment with the meal voucher, and does not create an order.
- If the balance or the transaction limit is less than the amount, the Component creates an order for the full amount. We send you a webhook message with
eventCode: ORDER_OPENED. - The Component makes the first partial payment with the meal voucher. We send you a webhook message with
eventCode: AUTHORISATION. - The Component updates the amount to the remaining amount, and calls
onOrderUpdated. In this event, you create Components for the payment methods that the shopper can use to pay the remaining amount. - The shopper pays the remaining amount with another payment method, for example a card. Additional actions, like 3D Secure authentication or a redirect, work the same way as for any other payment. We send you a webhook message with
eventCode: AUTHORISATION. - When the authorized payments cover the full amount, we send you a webhook message with
eventCode: ORDER_CLOSED andsuccess: true. You can use this to fulfill the order, without waiting for the payments to be captured.
If the shopper does not pay the remaining amount, the order expires. We then cancel or refund the partial payments, and we send you a webhook message with eventCode: ORDER_CLOSED and success: false.