Payment with Electronic Meal Vouchers

The Marketplace application allows to make partial or full payments with Electronic Meal Vouchers (TRD).

This functionality concerns only marketplaces that are eligible for TRD.

It requires for merchant TRD contracts to be previously specified in the marketplace.

  1. Merchant configuration

    Merchants are configured via the Marketplace Back Office or during the enrollment process. The merchant TRD contract number is assigned to them by entering the trd_contract attribute.

    Example of POST REGISTRATION (extract):
    {       
    "marketplace": "d085b6bb-4b8e-4f23-b84a-c9e5fafaf3dd",      
    "name": "Acme Corporation",      
    "person_type": "PM",      
    "trading_name": "Acme Corp.",       
    "nature": "SARL",       
    "reference": "registration002",       
    "trd_contract": "1234567",       
    "iban": "FR76000000000000000000",       
    "vat_number": "FRXX123456789",      
    "legal_form": 5710,       
    "external_ref": "000123",       
    …

  2. Order preparation

    For each item eligible for a TRD payment, indicate the maximum amount payable in TRD when creating the order in the marketplace. This amount is specified via the max_trd_amount attribute and it does not necessarily correspond to the full item amount.

    Example of POST ORDER with items eligible for TRD:
    {
    	"marketplace": "d085b6bb-4b8e-4f23-b84a-c9e5fafaf3dd",
    	"reference": "cmd00054",
    	"description": "Order eligible for TRD payment",
    	"currency": “EUR",
    	"url_return": "https://docs.lyra.com/fr/",
    	"language":"en",
    	"capture_delay": 3,
    	"items": [
    			{
    				"seller": "fa740b68-d873-4eab-9639-88a8ac413e42",
    				"reference": "demoeYDPnZuC",
    				"description": “Menu voucher",
    				"amount": 1500,
    				"type": "FOOD_AND_GROCERY",
    				"is_commission": false,
    				"max_trd_amount": 1000
    			},
    			{
    				"seller": "fa740b68-d873-4eab-9639-88a8ac413e42",
    				"reference": "azraty",
    				"description": "Wine voucher",
    				"amount": 2000,
    				"type": "FOOD_AND_GROCERY",
    				"is_commission": false
    			},
    			{
    				"seller": "4d20a9d4-0526-4474-b452-e936dc25418d",
    				"reference": "pemo9knR",
    				"description": "Café voucher",
    				"amount": 500,
    				"type": "FOOD_AND_GROCERY",
    				"is_commission": false,
    				"max_trd_amount": 500
    			},
    				],
    				"buyer": {
    						"type": "PRIVATE",
    						"email": "paulette17@goncalves.org",
    						"phone_number": "+33 (0)5 11 08 12 32",
    						"reference": "ZhIsYM"
    						},
    				"shipping": 
    						 {
    							"address": 
    							{
    							"zipcode": "59259",
    							"street_number": "37",
    							"country": "FR",
    							"state": "Meurthe-et-Moselle",
    							"street": "rue Marcel Philippe",
    							"district": "Wallis-et-Futuna",
    							"city": "Dupont"
    							},
    							"shipping_method": “ETICKET",
    							"delay": 2
    						}
    }
    							
    						

    Example of POST ORDER with items both eligible and non-eligible for TRD:
    {
    	"marketplace": "d085b6bb-4b8e-4f23-b84a-c9e5fafaf3dd",
    	"reference": "cmd00077",
    	"description": "Order eligible and NON eligible for TRD payment",
    	"currency": “EUR",
    	"url_return": "https://docs.lyra.com/fr/",
    	"language":"fr",
    	"items": [
    			{
    				"seller": "fa740b68-d873-4eab-9639-88a8ac413e42",
    				"reference": “butterham",
    				"description": “Restaurant",
    				"amount": 1550,
    				"quantity": 1,
    				"max_trd_amount": 1550
    			},
    			{
    				"seller": "fa740b68-d873-4eab-9639-88a8ac413e42",
    				"reference": "mug",
    				"description": “RestaurantMug",
    				"amount": 950,
    				"quantity": 1
    			},
    			{
    				"seller": "fa740b68-d873-4eab-9639-88a8ac413e42",
    				"reference": "commission",
    				"description": "commission",
    				"amount": 160,
    				"quantity": 1,
    				"is_commission": true
    			},
    				],
    				"buyer": {
    						"type": "PRIVATE",
    						"email": "paulette17@goncalves.org",
    						"phone_number": "+33 (0)5 11 08 12 32",
    						"reference": "ZhIsYM"
    						},
    				"shipping": 
    						 {
    							"address": 
    							{
    							"zipcode": "59259",
    							"street_number": "37",
    							"country": "FR",
    							"state": "Meurthe-et-Moselle",
    							"street": "rue Marcel Philippe",
    							"district": "Wallis-et-Futuna",
    							"city": "Dupont"
    							},
    							"shipping_method": “ETICKET",
    							"delay": 2
    						}
    }
    							
    						

    At the moment of the GET call for the order in view of freezing the order, the total order amount is calculated together with the amount eligible for TRD payment.

    Only one merchant per order can be paid with TRD.

    To do this, the application uses the following selection algorithm:
    • calculation of the total amount payable in TRD by the merchant
    • selection of the merchant who has the highest amount payable in TRD

    If the eligible amount is identical for several merchants, the merchant with the smallest MID number will be selected.

    The MID number of the selected merchant is added to the order to be submitted to the payment gateway together with the eligible amount.

  3. Payment

    The payment is handled by the Lyra Collect platform.

    • Payment in full with TRD

      The total amount of the order is paid with TRD. One single transaction is generated in the marketplace.

    • Partial payment with TRD

      The amount eligible for TRD is lower than the total amount of the order, the buyer uses a Meal Voucher to pay the part eligible for TRD and completes the remaining balance with another payment method.

      This is referred to as cascading payment as there are 2 associated payment methods, therefore 2 different transactions are generated in the marketplace.

    NOTE

    Even if the order is eligible for TRD payment, the buyer may decide to not pay with Electronic Meal Voucher.

    It is possible to cancel an order containing CONECS transactions. However, a CONECS transaction cannot be edited.