1account

If you do not already have a 1account account please sign up before proceeding.

1account is an age and identify verification platform. The service is tightly integrated with CheckoutChamp to verify consumers who purchase regulated products. The service is targeted to United Kingdom merchants and consumers.

Plugin Activation

  • Go to CRM. Navigate to Admin → Plugins → Age Verification

  • Click on the 1account tile and then the green “Activate” button

  • clientId - retrieved from 1account

  • complianceLevel - choose level 1-4

  • productTags - Optional. Enter one or more values separated by commas. Age verification will take effect if at least one product on the order has the entered tag(s). Enter 0 to clear.

  • stroreName - Required. The store name to display on email communication with the consumer.

  • retryUrl - Required. The full URL to which the consumer will be directed to complete the age verification. If using Checkout Champ hosted pages this must be a Thank You page. This must start with https://.

  • emailServer - Required. Choose the SMTP server from which to send age verification reminder emails to customers. STMP servers are configured at Admin > Plugins > SMTP Maintenance.

  • autoCancelDays - Optional. The number of days after which to automatically cancel the order if age verification is not complete. Valid values are between 5 and 30. Enter 0 to clear. If this value is not entered then unverified orders will remain in a pending state indefinitely.

  • FriendlyName - Optional. Enter a name to identify this plugin throughout the app.

Click the green “Connect” button to complete the plugin activation

Do not delete this plugin while age verifications are in progress!

Callback URL

Edit the plugin to view the callback URL. Share this URL with 1account for webhook setup.

Orders

Age verification is triggered for Complete new sales only.

Age verification is triggered once per customer. Once age is verified then subsequent orders from that customer will not require additional verification.

Fulfillments remain on hold until age is verified

Orders are not exported to Shopify, Woocommerce, or BigCommerce until age is verified

5 reminder emails are automatically sent until the age is verified. 1- after order 2- 4 hours after #1 3- 24 hours after #1 4- 48 hours after #1 5- 72 hours after #1

Admin users can approve the age verification manually. Use the Force Age Approval and Skip Age Approval options on the order details page.

Checkout Champ pages

This section applies to CheckoutChamp hosted pages only. If using a Direct API integration then proceed to the next section.

  • Edit the funnel on which to enable 1account

  • Copy the live URL of the Thank You page that will be used for customer verification

  • Go to Settings > Add Ons

  • Choose 1account

  • Select the 1account plugin. Add or edit a plugin as necessary. Paste the Thank You page live URL into the retryUrl input on the plugin. Save the plugin.

    • Callback URL is not available here. You must login to CRM and edit the 1account plugin to retrieve the Callback URL.

  • Save & Continue

  • Publish the funnel

Direct API Integration

This section should be skipped if using CheckoutChamp hosted pages

  1. Edit the plugin and note the 1AccountID. Pass this on the Order Import API call as the custom_order_1Account parameter. Also pass this on the Confirm PayPal API if using the PayPal legacy workflow.

  2. Populate the authCode value

    1. Use orderId returned from the Order Import API

    2. Use orderId parameter on the retryUrl

  3. Populate validationData with buyer information

  4. Populate avLevel and clientId from 1account values

  5. For thank you page, run the PUSH_API.validate function only when the "reviewStatus" is "AGE".

  6. For retryUrl call the Order Query API to fetch order details

Here is sample script to be placed on the retryUrl page

<!DOCTYPE html>
<html>

<head>
  <title>1Account Push API examples</title>
</head>
<body>

  <!-- Example Script to demo 1Account push API validate function data keys -->
  <script type="text/javascript">
      function collectData(argument) {
        try {
          const ageVerificationLevel = 1 // Could be 2, 3 and 4 based on merchant need.
          // Replace below object value with buyer information.
          // All key values are of type string.
          // If any information is not available pass value as empty string. Values which are passed as empty string will be requested on 1Account popup.
          // If is advised to pass user information to reduce friction for seamless checkout.
          const validationData = {
            msisdn: "", // Buyer valid phone number
            email: "", // Buyer email
            forename: "", // Buyer first name
            surname: "", // Buyer last name
            country: "", // Buyer country should be UK (United Kingdom), GB (Great Britain) or IE (Ireland).
            city: "",
            street: "",
            building: "", 
            postCode: "", 
          }
          // Add DOB information for validation if age verification level is greater than 2.
          // If DOB information is not available pass "dobDay" key as empty string and skip adding "dobMonth" and "dobYear".
          if (ageVerificationLevel > 2) {
            validationData["dobDay"] = "";
            validationData["dobMonth"] = "";
            validationData["dobYear"] = "";
          }
          return validationData;
        } catch (err) {
          console.log(err);
          return null;
        }
      }
  </script>


  <!-- Example Starts: Show 1Account Popup on page load -->
  <script id="one-account-push-api" src="https://www.1account.net/pushApi/index.js"></script>
  <script type="text/javascript">
    try {
      PUSH_API.init({
        authCode: "CRM_ORDER_ID", // CRM Order ID
        avLevel: "YOUR_AV_LEVEL", // '3'
        clientId: "YOUR_CLIENT_ID", // '75412d2-72a1-14e2-1'
        onComplete: function (response) {
          // CUSTOMER journey is finished at this
          // step and here you can call API GET request
          // to your storage to receive information
          // Or write custom logic based on response status
          if (response.status === "AV_SUCCESS") {
            console.log("AV_SUCCESS")
          } else {
            console.log("AV_FAIL")
          }
        },
        onClose: function () {
          // Add custom code to alert or record consumer action
        }
      });
      const iframe = document.querySelector('iframe#one-account-push-api');
      // Adding event listener on load of iframe to trigger 1Account Popup after all assest are loaded.
      iframe && iframe.addEventListener("load", function () {
        if (window.PUSH_API) {
          // Call collectData function to get user details.
          const userData = collectData();
          // Push API validate function with user data will show 1Account popup.
          userData && PUSH_API.validate(userData);
        }
      });
    } catch (err) {
      console.log(err);
    }
  </script>
  <!-- Example Ends -->
</body>
</html>

Last updated