Skip to content

Current SituationΒΆ

Current metrics - tablesΒΆ

Legend for table columns

  • Metric ID is a unique ID, so we can connect the metrics to the flow diagrams below
  • Type:
    • Count - Sends pings when something happens, like when you add something to my cart or page hits
    • Sum - Sends the amount of something, like the order amount or amount of products.
    • Avg - Sends the average of something, like the average weight or price of the products in the cart
    • Median - Sends the mean of something, if you have a list of like [1, 1, 2, 45, 68], the median would be 2 as it's in the middle
    • Data Array - Sends an array of data to the platform
  • Platform:
    • InfluxDB
    • GA4 (Google Analytics and Google Tag Manager)
    • Copernica

Metric ID Title Type Platform Origin Explanation
MT-1 Order Data Data Array Copernica Github link Sends the data of all new orders and updated orders
MT-2 Order Product Data Data Array Copernica Github link Sends the data of all new order details and updated order details (order detail = products of an order)
MT-3 Cart Data Data Array Copernica Github link Sends the data of all new carts and updated carts
MT-4 Cart Product Data Data Array Copernica Github link Sends the data of all new products inside carts and updated products inside carts
MT-5 Customer Data Data Array Copernica Github link Sends the data of all new customers and updated customers
MT-6 Product Data Data Array Copernica Github link Sends the data of all new products and updated products
Metric ID Title Type Platform Origin Description Technical Details
MT-8 ReviewInviteGenericMailCommand: review_invite_sent - sent Event InfluxDB Github Link Tracks when a generic review invitation email is successfully sent to a customer - sent: 1
MT-9 CartController: cart - add Event InfluxDB Github Link Tracks when a product is added to the shopping cart - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: preg_match('/.html$/'
MT-10 CartController: cart - remove Event InfluxDB Github Link Tracks when a product is removed from the shopping cart - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'cart'
MT-11 DocdataExecuteUpdateCommand: order_state_updated - order_value Event InfluxDB Github Link Tracks when an order's status is updated via the Docdata payment gateway, capturing the order value and new status - order_status_id: $new_order_state_ob->id
- order_status: $new_order_state_ob->name
- shop_id: $shop->id
- shop_name: $shop->name
- id_order: $order->id
MT-12 ReviewInviteSendTrustPilotReviewCommand: review_invite_sent - sent Event InfluxDB Github Link Tracks when a TrustPilot review invitation email is successfully sent to a customer - sent: 1
MT-13 AuthController: page_views - view Event InfluxDB Github Link Tracks page views on the login and registration form - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'login_register_form'
MT-14 ContactController: page_views - view Event InfluxDB Github Link Tracks page views on the contact form - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'contact_form'
MT-15 ContactController: contact - success Event InfluxDB Github Link Tracks successful contact form submissions - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-16 ContactController: contact - failed - reason: 'recaptcha_check_failed' Event InfluxDB Github Link Tracks failed contact form submissions due to reCAPTCHA verification failure - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'recaptcha_check_failed'
MT-17 ContactController: contact - failed - reason: 'submission_invalid' Event InfluxDB Github Link Tracks failed contact form submissions due to invalid submission data - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'submission_invalid'
MT-18 ContactController: contact - failed - reason: 'file_upload_failed' Event InfluxDB Github Link Tracks failed contact form submissions due to file upload errors - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'file_upload_failed'
MT-19 ContactController: contact - failed - reason: 'email_invalid' Event InfluxDB Github Link Tracks failed contact form submissions due to invalid email address - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_invalid'
MT-20 ContactController: contact - failed - reason: 'message_blank' Event InfluxDB Github Link Tracks failed contact form submissions due to blank message content - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'message_blank'
MT-21 ContactController: contact - failed - reason: 'message_invalid' Event InfluxDB Github Link Tracks failed contact form submissions due to invalid message format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'message_invalid'
MT-22 ContactController: contact - failed - reason: 'subject_invalid' Event InfluxDB Github Link Tracks failed contact form submissions due to invalid subject selection - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'subject_invalid'
MT-23 ContactController: contact - failed - reason: 'reference_invalid' Event InfluxDB Github Link Tracks failed contact form submissions due to invalid reference number - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'reference_invalid'
MT-24 ContactController: contact - failed - reason: 'reference_invalid' Event InfluxDB Github Link Tracks failed contact form submissions due to invalid reference number (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'reference_invalid'
MT-25 ContactController: contact - failed - reason: 'error_on_message_send' Event InfluxDB Github Link Tracks failed contact form submissions when the email delivery system encounters an error (first error point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'error_on_message_send'
MT-26 ContactController: contact - failed - reason: 'error_on_message_send_2' Event InfluxDB Github Link Tracks failed contact form submissions when the email delivery system encounters an error (second error point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'error_on_message_send_2'
MT-27 ContactController: contact - failed - reason: 'error_on_message_send_3' Event InfluxDB Github Link Tracks failed contact form submissions when the email delivery system encounters an error (third error point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'error_on_message_send_3'
MT-28 ContactController: contact - success Event InfluxDB Github Link Tracks successful contact form submissions (duplicate tracking of MT-15) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-29 OrderConfirmationController: page_views - view Event InfluxDB Github Link Tracks page views on the order confirmation page - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'order_confirmation'
MT-30 OrderConfirmationController: order_confirmation_page_view - page_view Event InfluxDB Github Link Tracks order confirmation page views with detailed cart, module, and order information - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- id_cart: (string)$this->id_cart
- id_module: (string)$this->id_module
- id_order: (string)$this->id_order
MT-31 OrderOpcController: page_views - view Event InfluxDB Github Link Tracks page views on the checkout login/guest selection step - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'checkout_step_login_guest'
MT-32 OrderOpcController: payment - failed - reason: Tools::getValue('reason') Event InfluxDB Github Link Tracks failed payment attempts during checkout with the specific failure reason provided by the payment system - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'checkout_step_payment_methods'
- reason: Tools::getValue('reason')
MT-33 OrderOpcController: page_views - view Event InfluxDB Github Link Tracks page views on the payment method selection step during checkout - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'checkout_step_payment_methods'
MT-34 OrderOpcController: page_views - view Event InfluxDB Github Link Tracks page views on the shopping cart page from the checkout flow - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'cart'
MT-35 OrderOpcController: button_submit - submit Event InfluxDB Github Link Tracks when users click the button to proceed from checkout to payment selection - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- button: 'to_payment'
MT-36 AdminLoginController: admin_login - failed - reason: 'email_empty' Event InfluxDB Github Link Tracks failed admin login attempts due to missing email address - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_empty'
MT-37 AdminLoginController: admin_login - failed - reason: 'email_invalid' Event InfluxDB Github Link Tracks failed admin login attempts due to invalid email format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_invalid'
MT-38 AdminLoginController: admin_login - failed - reason: 'password_empty' Event InfluxDB Github Link Tracks failed admin login attempts due to missing password - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'password_empty'
MT-39 AdminLoginController: admin_login - failed - reason: 'password_invalid' Event InfluxDB Github Link Tracks failed admin login attempts due to invalid password format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'password_invalid'
MT-40 AdminLoginController: admin_login - failed - reason: 'employee_invalid_or_wrong_password' Event InfluxDB Github Link Tracks failed admin login attempts due to incorrect employee credentials or wrong password - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'employee_invalid_or_wrong_password'
MT-41 AdminLoginController: admin_login - failed - reason: 'employee_not_attached_to_shop' Event InfluxDB Github Link Tracks failed admin login attempts when the employee account is not associated with the current shop - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'employee_not_attached_to_shop'
MT-42 AdminLoginController: admin_login - success Event InfluxDB Github Link Tracks successful admin panel login attempts - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-43 PaymentModule: order_as - customer Event InfluxDB Github Link Tracks when an order is placed by a customer (as opposed to by an admin) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-44 PasswordController: password_forgotten - failed - reason: 'invalidEmail' Event InfluxDB Github Link Tracks failed password reset attempts due to invalid email format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'invalidEmail'
MT-45 PasswordController: password_forgotten - failed - reason: 'noAccountRegisteredWithEmail' Event InfluxDB Github Link Tracks failed password reset attempts when no account exists with the provided email - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'noAccountRegisteredWithEmail'
MT-46 PasswordController: password_forgotten - failed - reason: 'customerNotActive' Event InfluxDB Github Link Tracks failed password reset attempts when the customer account is inactive - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'customerNotActive'
MT-47 PasswordController: password_forgotten - failed - reason: 'lastPasswordGenTooFast' Event InfluxDB Github Link Tracks failed password reset attempts when a reset was recently requested (rate limiting protection) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'lastPasswordGenTooFast'
MT-48 PasswordController: password_forgotten - success-mail-sent Event InfluxDB Github Link Tracks successful password reset email sending - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-49 PasswordController: password_forgotten - failed - reason: 'customerNotFound' Event InfluxDB Github Link Tracks failed password reset attempts when the customer cannot be found (different from no account with email) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'customerNotFound'
MT-50 PasswordController: password_forgotten - failed - reason: 'customerNotActive2' Event InfluxDB Github Link Tracks failed password reset attempts when the customer account is inactive (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'customerNotActive2'
MT-51 PasswordController: password_forgotten - failed - reason: 'passwordTokenTimeout' Event InfluxDB Github Link Tracks failed password reset attempts when the reset token has expired - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'passwordTokenTimeout'
MT-52 PasswordController: password_forgotten - success-password-sent Event InfluxDB Github Link Tracks successful password reset completion when new password has been sent - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-53 PasswordController: password_forgotten - failed - reason: 'errorSendingMail' Event InfluxDB Github Link Tracks failed password reset attempts due to email delivery errors - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'errorSendingMail'
MT-54 PasswordController: password_forgotten - failed - reason: 'couldNotUpdateCustomer' Event InfluxDB Github Link Tracks failed password reset attempts when the customer record cannot be updated in the database - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'couldNotUpdateCustomer'
MT-55 PasswordController: password_forgotten - failed - reason: 'emailNotFound' Event InfluxDB Github Link Tracks failed password reset attempts when no email address is found - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'emailNotFound'
MT-56 PasswordController: password_forgotten - failed - reason: 'noTokenOrNoIdCustomer' Event InfluxDB Github Link Tracks failed password reset attempts when the reset token or customer ID is missing - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'noTokenOrNoIdCustomer'
MT-57 PasswordController: page_views - view Event InfluxDB Github Link Tracks page views on the password forgotten/reset page - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'password_forgotten'
MT-58 AuthController: login - failed - reason: 'email_required' Event InfluxDB Github Link Tracks failed customer login attempts due to missing email address - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_required'
MT-59 AuthController: login - failed - reason: 'email_invalid' Event InfluxDB Github Link Tracks failed customer login attempts due to invalid email format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_invalid'
MT-60 AuthController: login - failed - reason: 'password_required' Event InfluxDB Github Link Tracks failed customer login attempts due to missing password - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'password_required'
MT-61 AuthController: login - failed - reason: 'password_invalid' Event InfluxDB Github Link Tracks failed customer login attempts due to invalid password format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'password_invalid'
MT-62 AuthController: login - failed - reason: 'account_unavailable' Event InfluxDB Github Link Tracks failed customer login attempts when the account is unavailable or disabled - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'account_unavailable'
MT-63 AuthController: login - failed - reason: 'authentication_failed' Event InfluxDB Github Link Tracks failed customer login attempts due to authentication failure (wrong credentials) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'authentication_failed'
MT-64 AuthController: login - success Event InfluxDB Github Link Tracks successful customer login attempts - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-65 AuthController: register - failed - reason: 'email_already_in_use' Event InfluxDB Github Link Tracks failed customer registration attempts when the email address is already registered - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_already_in_use'
MT-66 AuthController: register - failed - reason: 'phone_required' Event InfluxDB Github Link Tracks failed customer registration attempts due to missing phone number - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'phone_required'
MT-67 AuthController: register - failed - reason: 'date_of_birth_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid date of birth - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'date_of_birth_invalid'
MT-68 AuthController: register - failed - reason: 'email_confirmation_sent_failed' Event InfluxDB Github Link Tracks failed customer registration attempts when the confirmation email cannot be sent - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_confirmation_sent_failed'
MT-69 AuthController: register - success Event InfluxDB Github Link Tracks successful customer registration attempts - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-70 AuthController: register - failed - reason: 'account_error_create' Event InfluxDB Github Link Tracks failed customer registration attempts due to errors creating the account in the database - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'account_error_create'
MT-71 AuthController: register - failed - reason: 'validate_controller_errors' Event InfluxDB Github Link Tracks failed customer registration attempts due to validation errors from the controller - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'validate_controller_errors'
MT-72 AuthController: register - failed - reason: 'country_not_loaded' Event InfluxDB Github Link Tracks failed customer registration attempts when the country data cannot be loaded - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'country_not_loaded'
MT-73 AuthController: register - failed - reason: 'country_not_active' Event InfluxDB Github Link Tracks failed customer registration attempts when the selected country is not active in the shop - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'country_not_active'
MT-74 AuthController: register - failed - reason: 'zip_code_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid zip/postal code format - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'zip_code_invalid'
MT-75 AuthController: register - failed - reason: 'zip_code_required' Event InfluxDB Github Link Tracks failed customer registration attempts due to missing zip/postal code - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'zip_code_required'
MT-76 AuthController: register - failed - reason: 'zip_code_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid zip/postal code format (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'zip_code_invalid'
MT-77 AuthController: register - failed - reason: 'identification_number_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid identification/ID number - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'identification_number_invalid'
MT-78 AuthController: register - failed - reason: 'country_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid country selection - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'country_invalid'
MT-79 AuthController: register - failed - reason: 'country_choose_state' Event InfluxDB Github Link Tracks failed customer registration attempts when a state/province must be selected for the chosen country - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'country_choose_state'
MT-80 AuthController: register - failed - reason: 'date_of_birth_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid date of birth (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'date_of_birth_invalid'
MT-81 AuthController: register - failed - reason: 'email_already_in_use' Event InfluxDB Github Link Tracks failed customer registration attempts when the email address is already registered (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_already_in_use'
MT-82 AuthController: register - failed - reason: 'date_of_birth_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid date of birth (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'date_of_birth_invalid'
MT-83 AuthController: register - failed - reason: 'customer_error_creating' Event InfluxDB Github Link Tracks failed customer registration attempts due to errors while creating the customer record - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'customer_error_creating'
MT-84 AuthController: register - failed - reason: 'Address' Event InfluxDB Github Link Tracks failed customer registration attempts due to address validation errors - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'Address'
MT-85 AuthController: register - failed - reason: 'email_confirmation_sent_failed' Event InfluxDB Github Link Tracks failed customer registration attempts when the confirmation email cannot be sent (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_confirmation_sent_failed'
MT-86 AuthController: register - success Event InfluxDB Github Link Tracks successful customer registration attempts (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
MT-87 AuthController: register - failed - reason: 'email_invalid' Event InfluxDB Github Link Tracks failed customer registration attempts due to invalid email format (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_invalid'
MT-88 AuthController: register - failed - reason: 'email_already_in_use' Event InfluxDB Github Link Tracks failed customer registration attempts when the email address is already registered (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- reason: 'email_already_in_use'
MT-89 AuthController: page_views - view Event InfluxDB Github Link Tracks page views on the registration form page - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'register_form'
MT-90 cart: cart - remove Event InfluxDB Github Link Tracks when items are removed from the cart via the My Account page - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'my_account'
MT-91 ajax: button_submit - submit Event InfluxDB Github Link Tracks when users click the reorder button to reorder previous purchases - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- button: 'reorder'
MT-92 ajax: cart - add Event InfluxDB Github Link Tracks when items are added to the cart via the My Account reorder functionality - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'my_account'
MT-93 TrustpilotProductReview: review_received - product_review Event InfluxDB Github Link Tracks when a product review is received from Trustpilot with star rating - star_score: (string)$this->stars
- shop_id: (string)$context->shop->id
- shop_name: $context->shop->name
MT-94 validation: cm - validation Event InfluxDB Github Link Tracks successful payment validation via Docdata payment gateway - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- id_cart: $this->context->cart->id
MT-95 validation: cm - validation - reason: 'caughtInException' Event InfluxDB Github Link Tracks failed payment validation via Docdata when an exception is caught during processing - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'caughtInException'
- id_cart: $this->context->cart->id
MT-96 payment: cm - start_payment - reason: 'paymentPnameNotValid' Event InfluxDB Github Link Tracks failed Doc data payment initiation when the payment method name is invalid - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paymentPnameNotValid'
- id_cart: $cart->id
MT-97 payment: cm - start_payment - reason: 'paymentPnameNotValid' Event InfluxDB Github Link Tracks failed Docdata payment initiation when the payment method name is invalid (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paymentPnameNotValid'
- id_cart: $id_cart
MT-98 payment: cm - start_payment Event InfluxDB Github Link Tracks failed Docdata payment initiation attempts - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- payment_type: $paymentType
- id_cart: $id_cart
MT-99 payment: cm - start_payment Event InfluxDB Github Link Tracks failed Docdata payment initiation attempts (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- payment_type: $paymentType
- id_cart: $id_cart
MT-100 payment: cm - start_payment Event InfluxDB Github Link Tracks failed Docdata payment initiation attempts (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- payment_type: $paymentType
- id_cart: $id_cart
MT-101 payment: cm - start_payment Event InfluxDB Github Link Tracks successful Docdata payment initiation - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $paymentType
- id_cart: $id_cart
MT-102 payment: cm - start_payment Event InfluxDB Github Link Tracks failed Docdata payment initiation attempts (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- payment_type: $paymentType
- id_cart: $id_cart
MT-103 payment: cm - start_payment Event InfluxDB Github Link Tracks successful Docdata payment initiation (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $paymentType
- id_cart: $id_cart
MT-104 payment: cm - start_payment - reason: 'noResponse' Event InfluxDB Github Link Tracks failed Docdata payment initiation when no response is received from the payment gateway - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'noResponse'
- payment_type: $paymentType
- id_cart: $id_cart
MT-105 payment: cm - start_payment - reason: 'startSuccessPaymentSuccessNotSet' Event InfluxDB Github Link Tracks failed Docdata payment initiation when payment success status is not properly set despite successful start - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'startSuccessPaymentSuccessNotSet'
- payment_type: $paymentType
- id_cart: $id_cart
MT-106 payment: cm - start_payment - reason: 'redirectNotSet' Event InfluxDB Github Link Tracks failed Docdata payment initiation when the redirect URL is not set in the response - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'redirectNotSet'
- payment_type: $paymentType
- id_cart: $id_cart
MT-107 payment: cm - start_payment Event InfluxDB Github Link Tracks successful Docdata payment initiation (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $paymentType
- id_cart: $id_cart
MT-108 payment: cm - start_payment - reason: 'redirectPurposeNotRedirect' Event InfluxDB Github Link Tracks failed Docdata payment initiation when the redirect purpose is not set to 'redirect' - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'redirectPurposeNotRedirect'
- payment_type: $paymentType
- id_cart: $id_cart
MT-109 payment: cm - start_payment - reason: 'notCaughtInIfStatements' Event InfluxDB Github Link Tracks failed Docdata payment initiation when an unexpected condition occurs (not caught by conditional logic) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'notCaughtInIfStatements'
- payment_type: $paymentType
- id_cart: $id_cart
MT-110 payment: cm - start_payment - reason: 'noResponse' Event InfluxDB Github Link Tracks failed Docdata payment initiation when no response is received from the payment gateway (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'noResponse'
- payment_type: $paymentType
- id_cart: $id_cart
MT-111 payment: cm - start_payment - reason: 'startSuccessPaymentSuccessNotSet' Event InfluxDB Github Link Tracks failed Docdata payment initiation when payment success status is not properly set (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'startSuccessPaymentSuccessNotSet'
- payment_type: $paymentType
- id_cart: $id_cart
MT-112 payment: cm - start_payment Event InfluxDB Github Link Tracks successful Docdata payment initiation (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $paymentType
- id_cart: $id_cart
MT-113 payment: cm - start_payment - reason: 'notCaughtInIfStatements' Event InfluxDB Github Link Tracks failed Docdata payment initiation when an unexpected condition occurs (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'notCaughtInIfStatements'
- payment_type: $paymentType
- id_cart: $id_cart
MT-114 payment: cm - start_payment - reason: 'noResponse' Event InfluxDB Github Link Tracks failed Docdata payment initiation when no response is received (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'noResponse'
- payment_type: $paymentType
- id_cart: $id_cart
MT-115 payment: cm - start_payment - reason: 'startSuccessPaymentSuccessNotSet' Event InfluxDB Github Link Tracks failed Docdata payment initiation when payment success status is not properly set (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'startSuccessPaymentSuccessNotSet'
- payment_type: $paymentType
- id_cart: $id_cart
MT-116 payment: cm - start_payment Event InfluxDB Github Link Tracks successful Docdata payment initiation (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $paymentType
- id_cart: $id_cart
MT-117 payment: cm - start_payment - reason: 'redirectPurposeNotRedirect' Event InfluxDB Github Link Tracks failed Docdata payment initiation when redirect purpose is not set to 'redirect' (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'redirectPurposeNotRedirect'
- payment_type: $paymentType
- id_cart: $id_cart
MT-118 payment: cm - start_payment - reason: 'notCaughtInIfStatements' Event InfluxDB Github Link Tracks failed Docdata payment initiation when an unexpected condition occurs (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'notCaughtInIfStatements'
- payment_type: $paymentType
- id_cart: $id_cart
MT-119 payment: cm - start_payment - reason: 'validatePaymentResponse' Event InfluxDB Github Link Tracks failed Docdata payment initiation when payment response validation fails - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'validatePaymentResponse'
- id_cart: $cart->id
MT-120 failed: payment - failed - reason: 'failed-fallback' Event InfluxDB Github Link Tracks failed payments via Docdata fallback handler - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- page: 'checkout_step_payment_methods'
- reason: 'failed-fallback'
- id_cart: $cart->id
MT-121 proceed: cm - proceed_payment - reason: 'paymentOrderKeyInvalid' Event InfluxDB Github Link Tracks failed payment proceed attempts when the payment order key is invalid - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paymentOrderKeyInvalid'
- id_cart: $this->context->cart->id
MT-122 proceed: cm - proceed_payment - reason: 'orderNotObjectOrIdMissing' Event InfluxDB Github Link Tracks failed payment proceed attempts when the order object is not valid or ID is missing - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'orderNotObjectOrIdMissing'
- payment_type: $ddp_transaction->default_pm
- id_cart: $this->context->cart->id
MT-123 proceed: cm - proceed_payment Event InfluxDB Github Link Tracks successful payment proceed through Docdata - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $ddp_transaction->default_pm
- id_cart: $this->context->cart->id
MT-124 proceed: cm - proceed_payment - reason: 'paymentNotCorrect' Event InfluxDB Github Link Tracks failed payment proceed attempts when the payment details are not correct - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paymentNotCorrect'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-125 proceed: cm - proceed_payment Event InfluxDB Github Link Tracks successful payment proceed through Docdata (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-126 proceed: cm - proceed_payment - reason: 'paypalTokenOrPayerIdMissing' Event InfluxDB Github Link Tracks failed payment proceed attempts when PayPal token or payer ID is missing - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paypalTokenOrPayerIdMissing'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-127 proceed: cm - proceed_payment Event InfluxDB Github Link Tracks successful payment proceed through Docdata (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-128 proceed: cm - proceed_payment - reason: 'creditcardMdNotValid' Event InfluxDB Github Link Tracks failed payment proceed attempts when credit card MD (Merchant Data) is not valid - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'creditcardMdNotValid'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-129 proceed: cm - proceed_payment - reason: 'creditcardPaResNotValid' Event InfluxDB Github Link Tracks failed payment proceed attempts when credit card PaRes (Payer Authentication Response) is not valid - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'creditcardPaResNotValid'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-130 proceed: cm - proceed_payment - reason: 'paypalTokenNotValid' Event InfluxDB Github Link Tracks failed payment proceed attempts when the PayPal token is not valid - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paypalTokenNotValid'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-131 proceed: cm - proceed_payment - reason: 'paymentMethodKlarna' Event InfluxDB Github Link Tracks payment proceed attempts using Klarna payment method (in progress status) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'in_progress'
- reason: 'paymentMethodKlarna'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-132 proceed: cm - proceed_payment - reason: 'proceedPaymentFailed' Event InfluxDB Github Link Tracks failed payment proceed attempts when the proceed operation fails - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'proceedPaymentFailed'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-133 proceed: cm - proceed_payment - reason: 'proceedErrorsPaymentNotCorrect' Event InfluxDB Github Link Tracks failed payment proceed attempts when proceed errors occur and payment is not correct - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'proceedErrorsPaymentNotCorrect'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-134 proceed: cm - proceed_payment - reason: 'proceedErrors' Event InfluxDB Github Link Tracks payment proceed attempts with errors (in progress status) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'in_progress'
- reason: 'proceedErrors'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-135 proceed: cm - proceed_payment - reason: 'paymentAmountNotCorrect' Event InfluxDB Github Link Tracks failed payment proceed attempts when the payment amount does not match expected amount - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'failed'
- reason: 'paymentAmountNotCorrect'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-136 proceed: cm - proceed_payment Event InfluxDB Github Link Tracks successful payment proceed through Docdata (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'success'
- payment_type: $this->paymentMethod
- id_cart: $this->context->cart->id
MT-137 StartPaymentResponse: cm - start_payment - reason: 'startSuccessPaymentSuccessNotSet' Event InfluxDB Github Link Tracks cancelled payment responses when payment success is not properly set in the start payment response - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'cancelled'
- reason: 'startSuccessPaymentSuccessNotSet'
- payment_type: $paymentMethod
- id_cart: $order->id_cart
MT-138 StartPaymentResponse: cm - start_payment - reason: 'startSuccessPaymentSuccessNotSet' Event InfluxDB Github Link Tracks cancelled payment responses when payment success is not properly set (duplicate tracking point) - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'cancelled'
- reason: 'startSuccessPaymentSuccessNotSet'
- payment_type: $paymentMethod
- id_cart: $order->id_cart
MT-139 StartPaymentResponse: cm - start_payment - reason: 'redirectType' Event InfluxDB Github Link Tracks payment responses with unknown status when redirect type is encountered - shop_id: (string)$this->context->shop->id
- shop_name: $this->context->shop->name
- status: 'unknown'
- reason: 'redirectType'
- payment_type: $paymentMethod
- id_cart: $order->id_cart
Metric ID Title Type Platform Origin Explanation
MT-8 Order Purchase Count InfluxDB [Github link]( Simple count of all the orders made

Current User flow - FlowchartΒΆ

Happy flow

Warning! This flow only has the happy flow worked out. So it only contains the steps if it goes well and the payment is approved.

Flowchart - click to expand
---
  config:
    flowchart:
      curve: monotoneY
      nodeSpacing: 30
      rankSpacing: 40
      padding: 10
      wrappingWidth: 120
---
flowchart TD

%% Example comment label
%% CheckoutStep1@{ shape: braces, label: EXAMPLE UF-1} -.-> RedirectCheckout 


%% Pre-checkout

Start@{ shape: circle} --> ToMyAccount[Go to my account]
ToMyAccount --> MyAccountReorder[Add to Cart: My account reorder]
MyAccountReorder ---> ToCheckoutMyAccount[Go to checkout]
ToCheckoutMyAccount ---> MyAccountPassthrough(User is logged in, thus you can continue to payment method selection)
MyAccountPassthrough ----> SelectMethod

Start@{ shape: circle} --> GoToPDPPLP[Go to PDP or PLP]
GoToPDPPLP --> AddToCart[Add to Cart: PDP or PLP]
AddToCart --> ToCart[Go to Cart]
ToCart --> RedirectCheckout[Go to checkout]

%% Checkout Step 1: UserData

RedirectCheckout --> IsLoggedIn{Is Logged in?}

IsLoggedIn -->|Yes| SelectMethod{Choose payment method}

IsLoggedIn -->|No| AuthChoice{Choose authentication method}

AuthChoice -->|Log in| Login@{shape: manual-input, label: Enter credentials} ---> SelectMethod


AuthChoice -->|Register| Registration@{ shape: manual-input, label: Fill registration form **with** password} ---> SelectMethod

AuthChoice -->|Guest| GuestForm@{ shape: manual-input, label: Fill registration form **without** password -> as guest} ---> SelectMethod

AuthChoice -->|Forgot password| ForgotPassword(Redirect to forgot password) 
ForgotPassword --> ResetPassword@{shape: procs, label: Set a new password with password reset email} --> RedirectCheckout



%% Checkout Step 2: Payment Selection

%% BANKTRANSFER
CreatePaymentBankTransfer@{shape: procs, label: Create Bank transfer payment at CM}
OpenBankTransferModal@{shape: event, label: Open Bank Transfer Modal}

SelectMethod -- Bank Transfer --> CreatePaymentBankTransfer
CreatePaymentBankTransfer --> OpenBankTransferModal
OpenBankTransferModal -------> RedirectToValidationPage

%% IDEAL
PaymentIDEAL@{shape: procs, label: Start payment at CM for iDEAL}
RedirectToIdeal@{shape: event, label: Redirect to iDEAL}
PayIdeal@{shape: process, label: Pay the amount in iDEAL}

SelectMethod -- IDEAL --> PaymentIDEAL
PaymentIDEAL --> RedirectToIdeal
RedirectToIdeal --> PayIdeal
PayIdeal ------> RedirectToValidationPage

%% PAYPAL
PaymentPaypal@{shape: procs, label: Start payment at CM for PayPal}
RedirectToPayPal@{shape: event, label: Redirect to PayPal}
PayPayPal@{shape: process, label: Pay the amount in PayPal}

SelectMethod -- PayPal --> PaymentPaypal
PaymentPaypal --> RedirectToPayPal
RedirectToPayPal --> PayPayPal
PayPayPal ------> RedirectToValidationPage

%% MAESTRO - TODO: Flow unclear, cannot verify in test environment (test card numbers not accepted)
%% Expected to work similar to creditcard flow but needs verification
PaymentMaestro@{shape: procs, label: "TODO: Start payment at CM for Meastro"}
RedirectToMaestro@{shape: event, label: "TODO: Redirect to Meastro"}
PayMeastro@{shape: process, label: "TODO: Pay the amount in Meastro"}

SelectMethod -- "Maestro (TODO)" --> PaymentMaestro
PaymentMaestro --> RedirectToMaestro
RedirectToMaestro --> PayMeastro
PayMeastro ------> RedirectToValidationPage

%% KLARNA
HasPhoneNumber@{shape: diamond, label: Has Customer a phone number?}
FillPhoneNumberModal@{shape: manual-input, label: Fill phone number for payment}
PaymentKlarna@{shape: procs, label: Start payment at CM for Klarna}
RedirectToKlarna@{shape: event, label: Redirect to Klarna}
PayKlarna@{shape: process, label: Pay the amount in Klarna}

SelectMethod -- Klarna --> HasPhoneNumber
HasPhoneNumber -- Yes --> PaymentKlarna
HasPhoneNumber -- No --> FillPhoneNumberModal
FillPhoneNumberModal --> PaymentKlarna
PaymentKlarna --> RedirectToKlarna
RedirectToKlarna --> PayKlarna
PayKlarna ----> RedirectToValidationPage

%% VISA & MASTERCARD
SelectMethod -- Creditcard (Mastercard & Visa) --> GoToCreditcardPage

%% MISTERCASH (Bancontact)
SelectMethod -- Mistercash (Bancontact) --> GoToBancontactPage


%% Generic validation and completion
RedirectToValidationPage@{shape: event, label: Redirect to Validation Page}
ValidateOrderPayment@{shape: procs, label: Validate Order payment}
IsOrderPaymentValid@{shape: diamond, label: Is Order payment valid?}

RedirectToValidationPage --> ValidateOrderPayment
ValidateOrderPayment --> IsOrderPaymentValid

IsOrderPaymentValid -- No --> SelectMethod

IsOrderPaymentValid -- Yes --> RedirectOrderConfirmation@{shape: rect, label: Redirect to Order Confirmation}


%% Sub-flows

%% Creditcard Sub-flow
subgraph Creditcard Flow
GoToCreditcardPage@{ shape: rect, label: Go to payment with Creditcard} --> UseSavedCard@{shape: diamond, label: Use existing card?}

%% Use existing card

UseSavedCard -- Use existing card --> UseCardCM@{ shape: procs, label: Gets existing card from CM and uses that card}
UseCardCM ---> PaymentCreditcard

%% Use new card

UseSavedCard -- No --> EnterCardDetails[Enter card details]
EnterCardDetails --> SaveCard{Save new card?}

%% Save new card
SaveCard -- Yes --> SaveCardCM@{ shape: procs, label: Saves new card to CM and uses that card}
SaveCardCM --> PaymentCreditcard@{shape: procs, label: Process payment}

%% Don't save new card
SaveCard -- No --> PaymentCreditcard

PaymentCreditcard --> Handle3dSecure@{shape: event, label: Handle 3D Secure and authenticate payment}
click Handle3dSecure href "#threedsecure" "Information on 3D secure"

end
Handle3dSecure ---> RedirectToValidationPage

%% Bancontact Sub-flow
subgraph Bancontact flow
GoToBancontactPage@{shape: rect, label: Go to payment with Bancontact} --> CreateBancontactOrder@{shape: procs, label: Create order and get QR/App URLs from CM}
CreateBancontactOrder --> UseBancontactQr@{shape: diamond, label: Use Bancontact App/QR?}

%% Use QR/App - Desktop: scan QR, Mobile: open app
UseBancontactQr -- Yes (Desktop) --> ShowQrCode@{shape: event, label: Display QR code on screen}
ShowQrCode --> ScanQrCode@{shape: manual-input, label: User scans QR with phone}
ScanQrCode --> AuthorizeInApp@{shape: process, label: Authorize payment in Bancontact App}
AuthorizeInApp --> PollPaymentStatus@{shape: procs, label: Original browser polls payment status}
PollPaymentStatus --> PayBancontactApp@{shape: event, label: Payment confirmed - redirect original browser}

UseBancontactQr -- Yes (Mobile) --> OpenBancontactApp@{shape: event, label: Open Bancontact App via Intent URL}
OpenBancontactApp --> PayBancontactApp

%% Don't use QR/App - Use card

UseBancontactQr -- No --> UseSavedCardBancontact@{shape: diamond, label: Use existing card?}

%% Use existing card

UseSavedCardBancontact -- Use existing card --> UseCardCMBancontact@{ shape: procs, label: Gets existing card from CM and uses that card}
UseCardCMBancontact ---> PaymentBancontact

%% Use new card

UseSavedCardBancontact -- No --> EnterCardDetailsBancontact[Enter card details]
EnterCardDetailsBancontact --> SaveCardBancontact{Save new card?}

%% Save new card
SaveCardBancontact -- Yes --> SaveCardCMBancontact@{ shape: procs, label: Saves new card to CM and uses that card}
SaveCardCMBancontact --> PaymentBancontact@{shape: procs, label: Process payment}

%% Don't save new card
SaveCardBancontact -- No --> PaymentBancontact

PaymentBancontact --> Handle3dSecureBancontact@{shape: event, label: Handle 3D Secure and authenticate payment}
click Handle3dSecureBancontact href "#threedsecure" "Information on 3D secure"

end
PayBancontactApp ----> RedirectToValidationPage
Handle3dSecureBancontact --> RedirectToValidationPage

%% APPLE_PAY & GOOGLE_PAY - NOT IMPLEMENTED TO THE SIDE
SelectMethod -. Apple Pay & Google Pay ..-x NotImplemented@{ shape: stadium, label: Not Implemented}
subgraph gone [" "]
NotImplemented
end

style gone fill:none,stroke:none
3D Secure

Step: Handle 3D Secure and Authenticate PaymentΒΆ

This step handles the 3D Secure authentication required by most banks and credit card providers.
There are two possible types of 3D Secure flows:

  1. Direct Redirect URL
  2. Authorization via Credit Card / Bank App (iFrame)

Both types load JavaScript provided by CM Payments (formerly known as Docdata).

1. Authorization via Credit Card / Bank App (iFrame)ΒΆ

In this flow, an iFrame is loaded with a specific URL from CM Payments.
Within this iFrame, a bank-specific page is displayed that instructs the user to authorize the payment in their Credit Card or Bank App.
This page acts as a loading indicator until the authorization is completed.
Once the user authorizes the payment and returns, the iFrame receives an update and the user proceeds to the next step in the checkout process.


2. Direct Redirect URLΒΆ

In this flow, the user is directly redirected to the next checkout step after authentication.
However, this type appears to be rarely used nowadays, as nearly all banks now support the 3D Secure authorization flow described above.


Current Technical flow - Sequence diagramΒΆ

Legend

Highlight Color Meaning
TODO Green Task that still needs to be completed
ROUGH Fuchsia Part that might not be complete or accurate
Go Back to -> Orange Reference to return to a previous step
πŸ“‹ Link Blue Clickable link to another section or flow
πŸ“Š MT-X - Metric tracked at this step - click to view details in metrics tables

⚠️ Warning: Metric placements (πŸ“Š) are approximate and may not reflect the exact line of code where the metric is written. They indicate the general step in the flow where tracking occurs.

Main flowΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend %% Pre-Checkout U -> B: πŸ“‹ Pre-Checkout - Add to cart flow activate B U ->> B: Go to Checkout - Redirect to /checkout?isPaymentStep=true B ->> B: Is User logged in? - (FrontControllerCore 'is_logged' => $this->context->customer->isLogged()) B -->> U: Response checkout isPaymentStep=true page note over B: πŸ“Š MT-31: page_views - checkout_step_login_guest %% Checkout Step 1: Authentication U -> B: πŸ“‹ Checkout step 1 - Authentication flow %% Checkout Step 2: Payment Selection U -> B: πŸ“‹ Checkout step 2 - Payment selection %% Checkout Step 3: Payment alt Checkout step 3 - Payment note over U, B: User selected Bank transfer U -> B: πŸ“‹ Payment method - Bank transfer else note over U, B: User selected IDEAL U -> B: πŸ“‹ Payment method - IDEAL else note over U, B: User selected PayPal U -> B: πŸ“‹ Payment method - PayPal else note over U, B: User selected Maestro U -> B: πŸ“‹ Payment method - Maestro (TODO) note right of U: TODO: Flow needs verification! else note over U, B: User selected Klarna U -> B: πŸ“‹ Payment method - Klarna else note over U, B: User selected Creditcard (Visa & MasterCard) U -> B: πŸ“‹ Payment method - Creditcard - Card Selection U -> B: πŸ“‹ Payment method - Creditcard - Payment Flow else note over U, B: User selected Mistercash (Bancontact) U -> B: πŸ“‹ Payment method - Bancontact - Card Selection & Order U -> B: πŸ“‹ Payment method - Bancontact - QR Code (Desktop) U -> B: πŸ“‹ Payment method - Bancontact - App (Mobile) U -> B: πŸ“‹ Payment method - Bancontact - Card Flow else note over U, B: User selected Apple Pay & Google Pay note right of U: To be Implemented! end %% Checkout Step 4: Validation & Completion U -> B: πŸ“‹ Checkout step 4 - Proceed, Validation and Confirmation deactivate B

Partial flowsΒΆ

Legend - Flow Icons

  • πŸ“‹ Main flow - Primary payment flows and major checkout steps
  • πŸ”„ Sub-flow - Nested flows within a payment method (e.g., card selection, payment processing)
  • ℹ️ Optional - Optional flows that can be skipped (e.g., remove saved card)
  • ⚠️ Incomplete - Flows that need verification or are marked as ROUGH/TODO

Pre-checkout - Add to cart flowΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend %% Pre-Checkout alt Add to cart note over U,B: Add to cart - using PDP or PLP U ->> B: Add to Cart - Ajax POST Request to /?rand=X -> (cart controller add) activate B note over B: πŸ“Š MT-9: cart - add B -->> U: Response with updated cart U ->> B: Go to Cart - Redirect to /checkout (or like /winkelwagen) B -->> U: Response cart page note over B: πŸ“Š MT-34: page_views - cart U ->> B: Get cart details - Ajax POST Request to /?rand=X -> (cart controller) B -->> U: Response cart details else note over U,B: Add to cart - using My account reorder U ->> B: Go to My account - Redirect to /mijn-account#account B -->> U: Response My account page and data U ->> B: Go to My account Order History - AccountManagment.vue uiTabActive from 'account' -> 'order-history' U -->> U: Show 'order-history' tab U ->> B: Reorder add to cart - Ajax POST Request /module/brekz_reorder/ajax containing the product note over B: πŸ“Š MT-92: ajax: cart - add B -->> U: Response success U ->> B: Get cart details - GET Request to /module/brekz_my_account_api/cart?action=get B -->> U: Response cart details end

Cart removal metrics (not in happy flow)

When a user removes items from the cart, the following metrics are tracked:

  • πŸ“Š MT-10: CartController: cart - remove
  • πŸ“Š MT-90: cart: cart - remove

Checkout step 1 - Authentication flowΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend %% Checkout Step 1: Authentication alt Authentication - only if Not Logged In B -->> U: Show Authentication method options note over B: πŸ“Š MT-13, MT-89: page_views - login_register_form activate B alt Authentication methods note over U,B: Authentication methods - Log In U ->> B: Fill in e-mail address and password U ->> B: Press login button - Send Ajax POST request to /authentication?rand=X (or like /aanmelden) with email and passwd break note right of U: Login attempt - Failed note over B: πŸ“Š MT-58 to MT-63: login - failed B -->> U: Response Error (example. 'The conmbination of username and password is not valid.') B -->> U: Show error on screen U --> B: Go back to -> Checkout Step 1: Authentication end break note right of U: Login attempt - Succeeded note over B: πŸ“Š MT-64: login - success B ->> B: TODO - Combine carts in extra flow B -->> U: Redirect to /checkout - with new cart U --> B: Go back to -> πŸ“‹ Main flow - Go to Checkout - Redirect to /checkout?isPaymentStep=true end else note over U,B: ROUGH: Authentication methods - Register new customer U ->> B: Press register button - Send POST request to /authentication (or like /aanmelden) B -->> U: Response success B -->> U: Show register form with password (and country selector if the country is Netherlands, France or Luxembourg) U ->> B: Fill in registration form U ->> B: Submit registration form - Send Ajax POST request to /authentication?rand=X (or like /aanmelden) with all the registration data note over B: πŸ“Š MT-65 to MT-88: register - failed (various) note over B: πŸ“Š MT-69, MT-86: register - success B ->> B: ROUGH: Create Customer and set correct context for cart, customer etc. B -->> U: ROUGH: Response success - set static token B -->> U: ROUGH: Send Ajax POST request to /checkout?rand=X with getAddressBlockAndCarriersAndPayments and static token B ->> B: ROUGH: Check if customer has an address and return some html and tpl blocks B -->> U: ROUGH: Response success - Reload page while being logged in - location.reload() B -->> U: Show payment method selection step else note over U,B: ROUGH: Authentication methods - Register guest customer U ->> B: Press register button - Send POST request to /authentication (or like /aanmelden) B -->> U: Response success B -->> U: Show register form without password (and country selector if the country is France or Luxembourg) U ->> B: Fill in registration form U ->> B: Submit registration form - Send Ajax POST request to /authentication?rand=X (or like /aanmelden) with all the registration data note over B: πŸ“Š MT-65 to MT-88: register - failed (various) note over B: πŸ“Š MT-69, MT-86: register - success B ->> B: Create Guest Customer and set correct context for cart, customer etc. B -->> U: Response success - set static token B -->> U: Send Ajax POST request to /checkout?rand=X with getAddressBlockAndCarriersAndPayments and static token B ->> B: Check if customer has an address and return some html and tpl blocks B -->> U: Response success - Reload page while being logged in - location.reload() B -->> U: Show payment method selection step else note over U,B: Authentication methods - Forgot password U ->> B: Go to forgot password - Redirect to /password-recovery (or like /wachtwoord-vergeten) B -->> U: Response password reset page note over B: πŸ“Š MT-57: page_views - password_recovery U ->> B: Fill in e-mail address U ->> B: Send request for password reset - Form POST request to /password-recovery (or like /wachtwoord-vergeten) with email note over B: πŸ“Š MT-44 to MT-56: password_forgotten - failed/success B -->> U: Send e-mail to filled in e-mail address U ->> B: Open mailbox and open link - Open to https://{brekz url}/password-recovery?reset_token={reset_token}&id_customer={id_customer} B -->> U: Response change password page U ->> B: Put in new password twice U ->> B: Send request for new password - Form POST request to /password-recovery (or like /wachtwoord-vergeten) with reset_token, id_customer and new_password note over B: πŸ“Š MT-52: password_forgotten - success-password-sent B -->> U: Response password has changed page break U --> B: Go back to -> Checkout Step 1: Authentication end end end deactivate B

Checkout step 2 - Payment selectionΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend activate B B ->> B: Get active payment methods - (OrderOpcController -> docdatapayments->getActivePaymentMethods) B -->> U: Response checkout page with payment methods - (order-opc.tpl -> CheckoutPaymentStep.vue -> CheckoutSelectPayment.vue) note over B: πŸ“Š MT-33: page_views - checkout_step_payment_methods U -->> U: Select payment method - (CheckoutSelectPayment.vue) alt Klarna - phone number required note over U,B: Klarna selected and no phone number on delivery address U -->> U: Submit button greyed out - (CheckoutPaymentStep.vue removes js-hook-submit-checkout class) U ->> U: Click submit button - (order-opc.js blocks submit, shows error) U -->> U: Show phone number modal - (CheckoutPhoneNumberRequiredModal.vue) U ->> B: Update address with phone - PUT /module/brekz_my_account_api/address?action=update B -->> U: Response success U -->> U: Submit button enabled - (CheckoutPaymentStep.vue adds js-hook-submit-checkout class) end U ->> B: Submit checkout form - Form POST to /checkout with submitCheckout=true (order-opc.js) note over B: πŸ“Š MT-35, MT-91: button_submit - to_payment B ->> B: Store payment preferences in cookie - (OrderOpcController) alt Redirect to payment note over U,B: Creditcard selected B -->> U: Redirect to card payment page - /checkout?isPaymentStep=true&paymentMethod=creditcard else note over U,B: Bancontact selected B -->> U: Redirect to card payment page - /checkout?isPaymentStep=true&paymentMethod=bancontact else note over U,B: Other payment method selected B -->> U: Redirect to payment module - /module/docdatapayments/payment?pname=X end deactivate B

Checkout step 3 - PaymentΒΆ

CM API Base URLs

API Tag Description Production Sandbox
CM REST API {restBaseUrl} Modern REST interface for payment methods like iDEAL and PayPal https://secure.docdatapayments.com/ps/api/public/v1/merchants/{merchant_key} https://testsecure.docdatapayments.com/ps/api/public/v1/merchants/{merchant_key}
CM SOAP Order/Payment API {soapBaseUrl} Legacy SOAP interface for payment operations (create, start, proceed, status) https://secure.docdatapayments.com/ps/services/paymentservice/1_3?wsdl https://test.docdatapayments.com/ps/services/paymentservice/1_3?wsdl
CM SOAP Token API {soapTokenBaseUrl} SOAP interface for managing saved payment tokens (add, list, delete) For example for saved creditcards https://secure.docdatapayments.com/token/services/tokenservice/1_0?wsdl https://test.docdatapayments.com/token/services/tokenservice/1_0?wsdl

SOAP-based payment methods:

πŸ“‹ Bank TransferΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP Order/Payment API U ->> B: Redirect to /module/docdatapayments/payment?pname=BANK_TRANSFER activate B B ->> B: Validate order - (payment.php -> validateOrder) note over B: πŸ“Š MT-43: order_as - customer B ->> CMS: Create payment - SOAP {soapBaseUrl} β†’ create() with customer email (DocDataPaymentApi->createPayment) activate CMS CMS -->> B: Response with payment_cluster_key B ->> CMS: Start payment - SOAP {soapBaseUrl} β†’ start() with email address (DocDataPaymentApi->startPaymentWithoutToken) note over B: πŸ“Š MT-98 to MT-118: cm - start_payment (various) note over B: πŸ“Š MT-137 to MT-139: StartPaymentResponse metrics CMS -->> B: Response with status AUTHORIZED deactivate CMS B -->> U: Redirect to /module/docdatapayments/proceed?key={payment_cluster_key} deactivate B U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key}

⚠️ TODO: Maestro¢

TODO - Maestro flow unclear

Current implementation status unclear.

Based on code analysis, Maestro should likely follow the creditcard flow (card details entry + 3D Secure authentication). However:

  • Issue: Test environment does not accept Maestro test card numbers, making it impossible to verify the actual payment flow
  • Database/code routing: The Maestro method in the ddp_pmethods table is active, but it is not connected to any country or lang in the ddp_method_lang and ddp_method_country
  • Expected behavior: Should work similarly to Visa/Mastercard creditcard flow

Action needed: Verify actual Maestro payment flow in production or with CM Payments to confirm the implementation and document the complete flow.

πŸ“‹ KlarnaΒΆ

Klarna notes

  • Phone number required: This has already been checked in the payment selection step.
  • Uses proceedWaiting: Unlike other SOAP methods, Klarna doesn't return authentication data. It uses a polling mechanism to wait for async status updates. See πŸ“‹ Klarna Proceed Flow below.
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP Order/Payment API participant P as Klarna U ->> B: Redirect to /module/docdatapayments/payment?pname=KLARNA activate B B ->> B: Validate order - (payment.php -> validateOrder) note over B: πŸ“Š MT-43: order_as - customer B ->> CMS: Create payment - SOAP {soapBaseUrl} β†’ create() with Klarna parameters (DocDataPaymentApi->createPayment) activate CMS note right of CMS: Klarna requires additional shopper details:
gender, date of birth, phone number CMS -->> B: Response with payment_cluster_key B ->> CMS: Start payment - SOAP {soapBaseUrl} β†’ start() (DocDataPaymentApi->startPaymentWithoutToken) note over B: πŸ“Š MT-98 to MT-118: cm - start_payment (various) note over B: πŸ“Š MT-137 to MT-139: StartPaymentResponse metrics CMS -->> B: Response with redirect URL (status: REDIRECTED_FOR_AUTHENTICATION) deactivate CMS B -->> U: Redirect to Klarna hosted checkout page U ->> P: Complete payment authorization in Klarna activate P P -->> U: Redirect to /module/docdatapayments/proceed?key={payment_cluster_key} deactivate P deactivate B U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key} U -> B: πŸ“‹ Continue to Klarna Proceed Flow

πŸ“‹ Creditcard (Visa&MasterCard)ΒΆ

πŸ”„ Card SelectionΒΆ
Card Selection Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMT as CM SOAP Token API U ->> B: Redirect to /checkout?isPaymentStep=true&paymentMethod=creditcard activate B B -->> U: Show creditcard selection page - (CheckoutPaymentCreditcard.vue) deactivate B U ->> B: Load saved cards - GET request (endpoint.php) activate B B ->> CMT: List tokens - SOAP {soapTokenBaseUrl} β†’ listTokens() (DocDataTokenSoapApi) activate CMT CMT -->> B: Return saved cards with token keys deactivate CMT B -->> U: Display saved cards (if any) deactivate B alt Card selection note over U,B: User selects saved card U ->> U: Select saved card with token key (ddp_token_key) else note over U,B: User enters new card details U ->> U: Enter card number, holder name, expiry, CVV U ->> U: Encrypt card data client-side - (cseEncrypt) β†’ card_cipher opt Save card for future use U ->> B: Save card - POST with card_cipher and createToken (endpoint.php) activate B B ->> CMT: Add token - SOAP {soapTokenBaseUrl} β†’ addToken() (DocDataTokenSoapApi) activate CMT CMT -->> B: Token saved with key (ddp_token_key) deactivate CMT B -->> U: Card saved confirmation deactivate B end U ->> U: Store card_cipher for payment end note right of U: User proceeds to payment with either:
- ddp_token_key (saved card)
- card_cipher (new card) U -> B: πŸ“‹ Continue to Payment Flow
πŸ”„ Payment FlowΒΆ
Payment Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP Order/Payment API participant ACS as 3D Secure ACS alt Payment initiation note over U,B: Using saved card U ->> B: Start payment - POST with ddp_token_key (endpoint.php) else note over U,B: Using new card U ->> B: Start payment - POST with card_cipher (endpoint.php) end activate B B ->> B: Validate order - (endpoint.php -> validateOrder) B ->> CMS: Create payment - SOAP {soapBaseUrl} β†’ create() (DocDataPaymentApi->createPayment) activate CMS CMS -->> B: Response with payment_cluster_key alt Start payment note over B,CMS: Using saved card B ->> CMS: Start payment with token - SOAP {soapBaseUrl} β†’ start() (DocDataPaymentApi->startPaymentWithToken) else note over B,CMS: Using new card B ->> CMS: Start payment - SOAP {soapBaseUrl} β†’ start() with encrypted card data end CMS -->> B: Response with 3DS authentication URL deactivate CMS B -->> U: Return authentication URL and data deactivate B U -> B: πŸ“‹ 3D Secure Authentication
ℹ️ Optional: Remove CardΒΆ
Remove Card Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMT as CM SOAP Token API U ->> B: Delete card - POST with ddp_token_key and deleteToken (endpoint.php) activate B B ->> CMT: Delete token - SOAP {soapTokenBaseUrl} β†’ deleteToken() (DocDataTokenSoapApi) activate CMT CMT -->> B: Token deleted deactivate CMT B -->> U: Card removed confirmation deactivate B

πŸ“‹ Mistercash (Bancontact)ΒΆ

Bancontact (also known as Mistercash) has a unique flow compared to other payment methods. It creates the order before the user selects their payment option (saved card, new card, or QR/App). This allows the system to generate QR codes and app intent URLs for mobile payments.

Key Differences from Creditcard Flow

  1. Early Order Creation: Order created on page load (via bancontactqr) instead of on payment submit - needed to generate QR code and Intent URL
  2. QR Code Payment (Desktop): User scans QR β†’ authorizes in app β†’ original browser polls every 3 seconds β†’ redirects to validation when complete
  3. Intent URL (Mobile): A deep link URL (e.g. BancontactMobile://...) that opens the Bancontact app directly on mobile devices with the payment data pre-filled. After authorization, the app redirects back to the shop.
  4. Cookie-based State: payment_cluster_key and order_id stored in cookies between page load and payment start
  5. Cancel Payment Flow: Since order is created before payment starts, Bancontact needs bankcontactCancelPayment to cancel the order if user backs out. Other payment methods don't need this since no order exists until payment is submitted.
πŸ”„ Card Selection & Order CreationΒΆ
Card Selection Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP Order/Payment API participant CMT as CM SOAP Token API U ->> B: Redirect to /checkout?isPaymentStep=true&paymentMethod=bancontact activate B B -->> U: Show Bancontact selection page - (CheckoutPaymentBancontact.vue) deactivate B U ->> B: Load saved cards - GET with payment_type=MISTERCASH (endpoint.php) activate B B ->> CMT: List tokens - SOAP {soapTokenBaseUrl} β†’ listTokens() for MISTERCASH activate CMT CMT -->> B: Return saved Bancontact cards deactivate CMT B -->> U: Display saved cards (if any) deactivate B note over U,CMS: Order created early for QR/App support U ->> B: Get mobile payment data - POST with bancontactqr (endpoint.php) activate B B ->> B: Validate and create shop order B ->> CMS: Create payment - SOAP {soapBaseUrl} β†’ create() activate CMS CMS -->> B: Response with payment_cluster_key B ->> CMS: List payment methods - SOAP {soapBaseUrl} β†’ listPaymentMethods() CMS -->> B: Response with QR code URL and Intent URL deactivate CMS B ->> B: Store payment_cluster_key and order_id in cookie B -->> U: Return QR code, Intent URL, and payment_order_key alt User chooses payment option note over U,B: Desktop: QR code is displayed, user scans with phone U -> B: πŸ“‹ QR Code Payment Flow (Desktop) else note over U,B: Mobile: User clicks "Pay with Bancontact App" U -> B: πŸ“‹ App Payment Flow (Mobile) else note over U,B: User selects saved card or enters new card details U -> B: πŸ“‹ Card Payment Flow end deactivate B
πŸ”„ QR Code Payment Flow (Desktop)ΒΆ
QR Code Flow - click to expand
sequenceDiagram autonumber participant Browser as User (Desktop Browser) participant Phone as User (Phone) participant B as Prestashop Backend participant App as Bancontact App note over Browser,App: Order already created, QR code displayed on screen Browser ->> Browser: Display QR code on screen Phone ->> Browser: Scan QR code with phone camera Phone ->> App: Open Bancontact app activate App App ->> App: User authorizes payment in app deactivate App loop Browser polls every 3 seconds Browser ->> B: Check status - POST getPaymentStatusCreditCard activate B B -->> Browser: paymentComplete: false end note over Browser,B: App authorization completes Browser ->> B: Check status - POST getPaymentStatusCreditCard B -->> Browser: paymentComplete: true, redirectUrl deactivate B Browser -->> Browser: Redirect to /module/docdatapayments/proceed?key={payment_cluster_key} Browser ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key}
πŸ”„ App Payment Flow (Mobile)ΒΆ
App Flow - click to expand
sequenceDiagram autonumber participant U as User (Mobile Browser) participant App as Bancontact App note over U,App: Order already created, Intent URL available U ->> U: Click "Pay with Bancontact App" button U ->> App: Open Bancontact app via Intent URL (e.g. BancontactMobile://...&returnUrl=...) activate App App ->> App: User authorizes payment in app App ->> U: Open return URL in browser deactivate App U ->> U: Browser opens /module/docdatapayments/proceed?key={payment_cluster_key} U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key}
πŸ”„ Card Payment FlowΒΆ
Card Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP Order/Payment API note over U,CMS: Order already created (stored in cookie) U ->> B: Start payment - POST bankcontactStartPayment (endpoint.php) activate B B ->> B: Retrieve payment_cluster_key and order_id from cookie activate CMS alt Payment Initiation note over B,CMS: Using saved card B ->> CMS: SOAP {soapBaseUrl} β†’ start() with ddp_token_key else note over B,CMS: Using new card B ->> CMS: SOAP {soapBaseUrl} β†’ start() with encrypted card data end CMS -->> B: Response with 3DS data or AUTHORIZED status deactivate CMS alt Payment Authorization note over U,B: Payment authorized without 3DS B ->> B: Clear payment cookies B -->> U: Redirect to /module/docdatapayments/proceed?key={payment_cluster_key} U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key} else note over U,B: 3D Secure authentication required B -->> U: Return 3DS authentication URL U -> B: πŸ“‹ 3D Secure Authentication (shared flow) end deactivate B
ℹ️ Optional: Remove Bancontact CardΒΆ
Remove Card Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMT as CM SOAP Token API U ->> B: Delete card - POST with ddp_token_key and deleteToken (endpoint.php) activate B B ->> CMT: Delete token - SOAP {soapTokenBaseUrl} β†’ deleteToken() activate CMT CMT -->> B: Token deleted deactivate CMT B -->> U: Card removed, return updated card list deactivate B
ℹ️ Optional: Cancel PaymentΒΆ
Cancel Payment Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend U ->> B: Cancel payment - POST bankcontactCancelPayment (endpoint.php) activate B B ->> B: Load order from cookie, cancel order B ->> B: Create new cart from original cart B -->> U: Redirect to /checkout?isPaymentStep=true deactivate B

REST-based payment methods:

πŸ“‹ IDEALΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMR as CM REST API participant P as iDEAL U ->> B: Redirect to /module/docdatapayments/payment?pname=IDEAL activate B B ->> B: Validate and create shop order - (payment.php -> validateOrder) note over B: πŸ“Š MT-43: order_as - customer B ->> CMR: Create payment order for shop order - POST {restBaseUrl}/orders (DocDataTokenRestApi->createOrder) activate CMR CMR -->> B: Response with order_key B ->> CMR: Start payment - POST {restBaseUrl}/orders/{order_key}/payments (DocDataTokenRestApi->startPayment) CMR -->> B: Response with redirect URL deactivate CMR B -->> U: Redirect to iDEAL U ->> P: Pay the amount in iDEAL activate P P -->> U: Redirect to /module/docdatapayments/validation?key={order_key} deactivate P U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={order_key} deactivate B

πŸ“‹ PayPalΒΆ

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMR as CM REST API participant P as PayPal U ->> B: Redirect to /module/docdatapayments/payment?pname=PAYPAL activate B B ->> B: Validate order - (payment.php -> validateOrder) note over B: πŸ“Š MT-43: order_as - customer B ->> CMR: Create order - POST {restBaseUrl}/orders (class DocDataTokenRestApi->createOrder()) activate CMR CMR -->> B: Response with order_key B ->> CMR: Start payment - POST {restBaseUrl}/orders/{order_key}/payments (class DocDataTokenRestApi->startPayment()) CMR -->> B: Response with redirect URL deactivate CMR B -->> U: Redirect to PayPal U ->> P: Pay the amount in PayPal activate P P -->> U: Redirect to /module/docdatapayments/validation?key={order_key} deactivate P U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={order_key} deactivate B

Shared flows:

⚠️ ROUGH: 3D Secure Authentication¢

Rough: Flow - click to expand

This flow is most likely not correct, but it is added to give an understanding to the full flow.

sequenceDiagram autonumber participant U as User participant ACS as 3D Secure ACS U ->> U: ROUGH: Handle 3DS authentication - POST to CM authentication URL (docdata.js) activate ACS alt ROUGH: 3DS authentication note over U,ACS: ROUGH: 3DS Challenge required ACS -->> U: ROUGH: Response with CHALLENGE U ->> U: ROUGH: Display 3DS challenge in iframe - (nca3DSWebSDK.init3DSChallengeRequest) U ->> ACS: ROUGH: Complete authentication in iframe ACS -->> U: ROUGH: Return PaRes and MD parameters else note over U,ACS: ROUGH: Frictionless flow ACS -->> U: ROUGH: Response with AUTHORIZED (no challenge needed) end deactivate ACS U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key} with PaRes and MD

Checkout step 4 - Proceed, Validation and ConfirmationΒΆ

Return URL by API type

The Return URL's are set using the CM portal. So NOT from our code.

API Type Return URL Payment Methods
SOAP /module/docdatapayments/proceed Bank Transfer, Klarna, Creditcard, Bancontact
REST /module/docdatapayments/validation iDEAL, PayPal

πŸ“‹ Proceed Flow (SOAP-based methods, except Klarna)ΒΆ

This flow handles the return from external payment providers for SOAP-based payment methods. The proceed endpoint processes authentication data and calls proceedPayment() to finalize the payment with CM.

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP Order/Payment API U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key} activate B B ->> B: Validate payment key (32-char alphanumeric) B ->> B: Load DDP_Transaction by payment_cluster_key B ->> B: Load Order from transaction alt Order already paid B -->> U: Skip proceed, redirect to validation?key={key}&success=1 end alt Payment method specific handling note over U,CMS: Creditcard / Bancontact (with 3DS data) note right of U: Returns with PaRes and MD from 3D Secure B ->> B: Validate PaRes (Base64, max 5000 chars) and MD (0-10 digits) B ->> CMS: SOAP {soapBaseUrl} β†’ proceedPayment() with threeDomainSecureAuthenticationResult note over B: πŸ“Š MT-121 to MT-136: cm - proceed_payment (various) activate CMS CMS -->> B: Payment authorization result deactivate CMS else note over U,CMS: Bank Transfer note right of U: No authentication data needed B ->> B: Payment already AUTHORIZED at start B -->> U: Redirect to /module/docdatapayments/validation?key={key}&success=1 U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key}&success=1 end B ->> B: Check proceedPayment response alt Response validation note over U,CMS: proceedSuccess with AUTHORIZED status B ->> CMS: SOAP {soapBaseUrl} β†’ status() - verify payment status activate CMS CMS -->> B: Response with confidenceLevel deactivate CMS alt Confidence level check note over U,B: confidenceLevel == ACQUIRER_APPROVED B -->> U: Redirect to /module/docdatapayments/validation?key={key}&success=1 U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key}&success=1 else note over U,B: Payment not approved B -->> U: Redirect to /module/docdatapayments/validation?key={key}&canceled=1 U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key}&canceled=1 end else note over U,CMS: proceedErrors or no response B ->> CMS: SOAP {soapBaseUrl} β†’ status() - check if already AUTHORIZED activate CMS CMS -->> B: Response with authorization status deactivate CMS alt Already authorized B -->> U: Redirect to /module/docdatapayments/validation?key={key}&success=1 U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key}&success=1 else B -->> U: Redirect to /module/docdatapayments/validation?key={key}&error=1&reason={reason} U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key}&error=1&reason={reason} end end deactivate B U -> B: πŸ“‹ Continue to Validation Flow

πŸ“‹ Proceed Flow (Klarna)ΒΆ

Klarna has its own proceed flow

Klarna does not use the standard SOAP Proceed Flow above. It uses a unique proceedWaiting polling mechanism because Klarna doesn't return authentication data. Instead, Klarna updates the order status asynchronously (via webhook), so the system must poll until the order is marked as paid.

Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant P as Klarna note over U,P: User returns from Klarna hosted checkout P -->> U: Redirect to /module/docdatapayments/proceed?key={payment_cluster_key} U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={payment_cluster_key} loop Until (order->hasBeenPaid() && order->valid) == true note over U,B: Proceed (proceed.php) activate B B ->> B: Validate payment key, load DDP_Transaction and Order alt Proceed check note over U,B: Order already paid (proceed.php:67) B -->> U: JSON { redirect_url: /module/docdatapayments/validation?key={key}&success=1 } U ->> U: JavaScript handles redirect note right of U: Break loop else note over U,B: Order not yet paid (proceed.php:270) B ->> B: Sleep 3 seconds B -->> U: JSON { redirect_url: /module/docdatapayments/proceedWaiting?key={key} } U ->> U: JavaScript handles redirect U ->> B: Redirect to ProceedWaiting - /module/docdatapayments/proceedWaiting?key={key} end deactivate B note over U,B: ProceedWaiting (proceedWaiting.php) activate B B ->> B: Validate payment key, load DDP_Transaction and Order alt ProceedWaiting check note over U,B: Order already paid (proceedWaiting.php:89) B -->> U: Redirect to /module/docdatapayments/validation?key={key}&success=1 note right of U: Break loop else note over U,B: Order not yet paid B -->> U: Display waiting page (proceed_waiting.tpl) U ->> U: JavaScript auto-submits form U ->> B: Redirect to Proceed - /module/docdatapayments/proceed?key={key} end deactivate B end U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key}&success=1 U -> B: πŸ”„ Validation: Success

πŸ“‹ Validation Flow (All payment methods)ΒΆ

All payment methods end up here, either directly (REST) or via proceed (SOAP).

πŸ”„ Common validation startΒΆ
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant CMS as CM SOAP API U ->> B: Redirect to Validation - /module/docdatapayments/validation?key={key} activate B B ->> B: Validate payment key, load DDP_Transaction and Order B ->> CMS: SOAP {soapBaseUrl} β†’ status() - get payment report (validation.php) note over B: πŸ“Š MT-94, MT-95: cm - validation activate CMS CMS -->> B: Payment report with confidenceLevel, totalRegistered, totalCaptured deactivate CMS note right of B: If multiple payments, find first non-CANCELED with confidenceLevel set alt Route by URL parameter or payment method note over U,B: success=1 U -> B: πŸ”„ Validation: Success else note over U,B: canceled=1 OR authorization.status == CANCELED U -> B: πŸ”„ Validation: Canceled else note over U,B: error=1 U -> B: πŸ”„ Validation: Error else note over U,B: Payment method: BANK_TRANSFER U -> B: πŸ”„ Validation: Bank Transfer else note over U,B: No parameter (direct REST return: iDEAL, PayPal) U -> B: πŸ”„ Validation: REST (iDEAL, PayPal) end deactivate B

Payment method validation notes

  • Bank Transfer: Payment not completed at checkout. Order placed with _PS_OS_BANKWIRE_ (awaiting). Customer receives email with bank details and transfers manually.
  • iDEAL & PayPal: REST API - return directly to /validation (not /proceed). No proceedPayment() needed.
  • Creditcard & Bancontact: Return to /proceed with 3DS data (PaRes/MD), then redirect to /validation?success=1. See ⚠️ 3D Secure.
  • Klarna: Has its own proceed flow with proceedWaiting polling loop. See πŸ“‹ Klarna Proceed Flow.
πŸ”„ Validation: SuccessΒΆ
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend note over U,B: URL parameter: success=1 activate B B ->> B: Extract confidenceLevel, totalRegistered (to pay), totalCaptured (paid) alt Validation result note over U,B: confidenceLevel == ACQUIRER_APPROVED AND
amount matches (Β±10 cents) B ->> B: Set order state to _PS_OS_PAYMENT_ (paid), addPrestashopOrderHistory note over B: πŸ“Š MT-11: order_state_updated B -->> U: Redirect to /order-confirmation?id_cart&id_module&id_order&key U ->> B: Redirect to Order Confirmation - /order-confirmation?id_cart&id_module&id_order&key note over B: πŸ“Š MT-29, MT-30: page_views - order_confirmation B -->> U: Order confirmation page else note over U,B: Payment not approved or amount mismatch B -->> U: Stay on validation (log failure, no state change) end deactivate B
πŸ”„ Validation: CanceledΒΆ
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend note over U,B: URL parameter: canceled=1 OR authorization.status == CANCELED activate B alt Order status note over U,B: Order not yet paid B ->> B: Cancel order, rebootOrderIntoFreshCart B -->> U: Redirect to /checkout?isPaymentStep=true&reason=canceled U ->> B: Redirect to Checkout - /checkout?isPaymentStep=true&reason=canceled B -->> U: Checkout page with canceled message else note over U,B: Order already paid B -->> U: Redirect to /order-confirmation?id_cart&id_module&id_order&key U ->> B: Redirect to Order Confirmation - /order-confirmation?id_cart&id_module&id_order&key B -->> U: Order confirmation page (skip cancel) end deactivate B
πŸ”„ Validation: ErrorΒΆ
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend note over U,B: URL parameter: error=1 activate B B ->> B: Set order state to _PS_OS_ERROR_, rebootOrderIntoFreshCart note over B: πŸ“Š MT-120: payment - failed note over B: πŸ“Š MT-32: payment - failed (on redirect) B -->> U: Redirect to /checkout?isPaymentStep=true&reason=error U ->> B: Redirect to Checkout - /checkout?isPaymentStep=true&reason=error B -->> U: Checkout page with error message deactivate B
πŸ”„ Validation: Bank TransferΒΆ
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend participant E as Email System note over U,B: Payment method: BANK_TRANSFER activate B B ->> B: Set order state to _PS_OS_BANKWIRE_ (awaiting payment) note over B: πŸ“Š MT-11: order_state_updated B -->> U: Redirect to /order-confirmation?id_cart&id_module&id_order&key U ->> B: Redirect to Order Confirmation - /order-confirmation?id_cart&id_module&id_order&key note over B: πŸ“Š MT-29, MT-30: page_views - order_confirmation B -->> U: Order confirmation page with bank transfer modal deactivate B E ->> U: Email with bank account transfer details note right of U: Customer manually transfers money to provided bank account
πŸ”„ Validation: REST (iDEAL, PayPal)ΒΆ
Flow - click to expand
sequenceDiagram autonumber participant U as User participant B as Prestashop Backend note over U,B: No URL parameter - direct REST return activate B alt Payment status check note over U,B: confidenceLevel == ACQUIRER_APPROVED B ->> B: Set order state to _PS_OS_PAYMENT_ (paid), addPrestashopOrderHistory note over B: πŸ“Š MT-11: order_state_updated B -->> U: Redirect to /order-confirmation?id_cart&id_module&id_order&key U ->> B: Redirect to Order Confirmation - /order-confirmation?id_cart&id_module&id_order&key note over B: πŸ“Š MT-29, MT-30: page_views - order_confirmation B -->> U: Order confirmation page else note over U,B: authorization.status == CANCELED B ->> B: Cancel order, rebootOrderIntoFreshCart B -->> U: Redirect to /checkout?isPaymentStep=true&reason=canceled U ->> B: Redirect to Checkout - /checkout?isPaymentStep=true&reason=canceled B -->> U: Checkout page with canceled message else note over U,B: Payment error B ->> B: Set order state to _PS_OS_ERROR_, rebootOrderIntoFreshCart note over B: πŸ“Š MT-120: payment - failed note over B: πŸ“Š MT-32: payment - failed (on redirect) B -->> U: Redirect to /checkout?isPaymentStep=true&reason=error U ->> B: Redirect to Checkout - /checkout?isPaymentStep=true&reason=error B -->> U: Checkout page with error message end deactivate B