Registering a meal voucher
The Conecs meal voucher can only be registered during a payment.
The Charge/CreateToken Web Service is not supported.
For first generation meal vouchers, or those using the CB contract, the use of the CreateToken Web Service is possible.
To request the registration of a meal voucher during the payment, call the Charge/CreatePayment Web Service.
POSThttps://api.systempay.fr/api-payment/V4/Charge/CreatePayment
Use the same fields as for a single payment and change the value of the formAction field using one of the values below:
Values of the formAction field | Description |
---|---|
REGISTER_PAY | Forces the registration of the meal voucher during the payment. |
ASK_REGISTER_PAY | Proposes the registration of the meal voucher during the payment by means of a checkbox. |
Example of a request:
POST https://api.systempay.fr/api-payment/V4/Charge/CreatePayment
{ "amount": 1715, "currency": "EUR", "formAction": "ASK_REGISTER_PAY", "orderId": "CMD46478", "customer": { "email": "sample@example.com", "reference": "104123487", "billingDetails": { "category": "PRIVATE", "firstName": "Jeanne", ... }
If the payment is accepted, a payment method token is created. The token is returned in the paymentMethodToken field of the response transmitted by the buyer’s browser and in the IPN.