Accept Titres-Restaurant payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built an API-only integration. |
Setup steps | Before you begin:
|
Build your payment form for Titres-Restaurant
If you are using the /paymentMethods request to show the available payment methods to your shopper, specify the following in your request:
- countryCode: FR
- amount.currency: EUR
In the response, you receive the meal vouchers available to your shopper as elements in the paymentMethods
array, for example:
Apetiz and mealVoucher_FR_natixis refer to Bimpli, the commercial brand for Natixis.
Render logos and names of the available brands for the shopper to choose. When the shopper selects a type of meal voucher, show the payment form.
Check the balance
After the shopper enters the meal voucher details, check if the balance is enough to make a full payment.
-
Make a /paymentMethods/balance request including:
Field Required Description paymentMethod.type
mealVoucher_FR paymentMethod.number
The meal voucher number. paymentMethod.expiryMonth
Expiry month of the meal voucher. paymentMethod.expiryYear
Expiry year of the meal voucher. reference
Your reference to uniquely identify the transaction. To provide multiple references for a transaction, separate them with hyphens ("-"). Maximum length: 80 characters. The response includes the balance of the meal voucher.
-
If the balance amount is equal to or greater than the full payment amount, then continue to make a payment.
If the balance is less than the full payment amount, create an order and ask the shopper to make partial payments with the meal voucher and a different payment method.
Make a payment
From your server, make a /payments request, specifying:
Field | Required | Description |
---|---|---|
paymentMethod.type |
mealVoucher_FR. | |
paymentMethod.number |
The meal voucher number without separators. | |
paymentMethod.expiryMonth |
The expiry month of the meal voucher. | |
paymentMethod.expiryYear |
The expiry year of the meal voucher. | |
paymentMethod.cvc |
The CVC of the meal voucher. |
The /payments response contains:
- pspReference: Our unique identifier for the transaction.
resultCode
: Use this to present the payment result to your shopper.merchantReference
: Thereference
from the /payments request.
Present the payment result
Use the resultCode from the /payments response to present the payment result to your shopper.
You will also receive the outcome of the payment asynchronously in a webhook. For Titres-Restaurant payments, you can receive the following resultCode
values:
resultCode | Description | Action to take |
---|---|---|
Authorised | The payment was successful. | Inform the shopper that the payment has been successful. If you are using manual capture, you also need to capture the payment. |
Cancelled | The shopper cancelled the payment. | Ask the shopper whether they want to continue with the order, or ask them to select a different payment method. |
Error | There was an error when the payment was being processed. For more information, check the
refusalReason
field. |
Inform the shopper that there was an error processing their payment. |
Refused | The payment was refused. For more information, check the
refusalReason
field. |
Ask the shopper to try the payment again using a different payment method. |
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.