Processing the response data
Here is an example of analysis to guide you through processing the response data.
- Identify the order by retrieving the value of the vads_order_id field. Make sure that the order status has not been updated yet.
- Retrieve the field vads_trans_uuid containing the transaction unique reference generated by the payment server.
- Retrieve the value of the vads_trans_date field to identify the payment date.
- Retrieve the used amount and currency. To do this, retrieve the values of the following fields:
Field name Description vads_amount Payment amount in the smallest currency unit. vads_currency Numeric code of the currency used for the payment. - Retrieve all the order, buyer and shipping details. These details will be provided in the response only of they have been transmitted in the payment form.Their values are identical to the ones submitted in the form.
- Analyze the value of the vads_sequence_number field:
VALUE DESCRIPTION 0 Case of a cascading payment. Several payment methods were used to pay for the order.
The list of payment methods used by the Buyer can be found in the vads_payment_seq field (in the JSON format).
For more information, see chapter Analyzing the result of a cascading payment.
1 Order paid entirely with Meal Vouchers. - Analyze the value of the vads_card_brand field: Its value allows to know if the order has been paid in full with Titre-Restaurant or if a complementary payment is required.
VALUE DESCRIPTION MULTI Case of a cascading payment. Several payment methods were used to pay for the order.
The list of payment methods used by the Buyer can be found in the vads_payment_seq field (in the JSON format).
For more information, see chapter Analyzing the result of a cascading payment.
SODEXO Order paid entirely with "Pass Restaurant" meal vouchers. EDENRED Order paid entirely with "Titre Restaurant Mastercard" meal vouchers. CHQ_DEJ Order paid entirely with "Chèque Déjeuner" meal vouchers. APETIZ Order paid entirely with Bimpli (ex Apetiz) meal vouchers. - If the order was paid entirely with Titre-Restaurant, retrieve the payment result transmitted in the vads_trans_status field. Its value allows you to define the order status.
VALUE DESCRIPTION AUTHORISED The transaction has been accepted and will be automatically captured at the bank on the expected date.
AUTHORISED_TO_VALIDATE To be validated
The transaction, created with manual validation, is authorized. The Merchant must manually validate the transaction in order for it to be captured.
The transaction can be validated as long as the expiration date of the authorization request has not passed. If the authorization validity period has passed, the payment status changes to EXPIRED. The Expired status is final.
REFUSED Refused
Transaction is declined.
See the chapter Analyzing the result of the authorization request to obtain more information on the reason of payment rejection.
ABANDONED Abandoned Payment abandoned by the buyer
The transaction is visible in the Merchant Back Office.
- If the order was paid using several payment methods, see the following chapter with the vads_payment_seq field analysis.
- Proceed to order update.