# AgeChecker.net

{% hint style="info" %}
If you do not already have an AgeChecker account please sign up before proceeding.
{% endhint %}

{% hint style="info" %}
AgeChecker.net is an age and identify verification platform. The service is tightly integrated with CheckoutChamp to verify consumers who purchase regulated products. The service is available for both United States and International merchants and consumers.
{% endhint %}

* [Plugin Activation](https://konnektive.atlassian.net/wiki/spaces/CC/pages/2759000065/1account#Plugin-Activation)
* [Callback URL](https://konnektive.atlassian.net/wiki/spaces/CC/pages/2759000065/1account#Callback-URL)
* [Orders](https://konnektive.atlassian.net/wiki/spaces/CC/pages/2759000065/1account#Orders)
* [Checkout Champ pages](https://konnektive.atlassian.net/wiki/spaces/CC/pages/2759000065/1account#Checkout-Champ-pages)
* [Direct API Integration](https://konnektive.atlassian.net/wiki/spaces/CC/pages/2759000065/1account#Direct-API-Integration)

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FxTp2nMFTukSEnSorwpOK%2Fimage.png?alt=media&#x26;token=aba3c65b-48ef-4210-88d2-08625d1f21fd" alt="" width="248"><figcaption></figcaption></figure>

#### Plugin Activation <a href="#plugin-activation" id="plugin-activation"></a>

* Go to CRM. Navigate to Admin → Plugins → Identity Verification
* Click on the AgeChecker.net tile and then the <mark style="color:green;">**Activate**</mark> button

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2Fc6ip5bqHnMfhleUruRJw%2Fimage.png?alt=media&#x26;token=00d6beda-e9bc-47a7-b07d-667d26bcb9e1" alt="" width="375"><figcaption></figcaption></figure>

* **apiKey -** retrieved from AgeChecker.net
* **accountSecret -** retrieved from AgeChecker.net
* **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 <mark style="color:green;">**Connect**</mark> button to complete the plugin activation

{% hint style="warning" %}
Do not delete this plugin while age verifications are in progress!
{% endhint %}

&#x20;

#### Orders <a href="#orders" id="orders"></a>

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.

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2F3KA6TVPPznMg5e2iW3Yv%2Fimage.png?alt=media&#x26;token=dbf6e0cb-2b58-4091-adae-4d411e1c6ce8" alt=""><figcaption></figcaption></figure>

&#x20;

&#x20;

#### Checkout Champ pages <a href="#checkout-champ-pages" id="checkout-champ-pages"></a>

{% hint style="info" %}
This section applies to CheckoutChamp hosted pages only. If using a Direct API integration then proceed to the next section.
{% endhint %}

* Edit the funnel on which to enable AgeChecker.net
* Copy the live URL of the Thank You page that will be used for customer verification
* Go to Settings > Add Ons > Age Verification
* Choose AgeChecker
* Select the AgeChecker 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.
* Save & Continue
* Publish the funnel

&#x20;

#### Direct API Integration <a href="#direct-api-integration" id="direct-api-integration"></a>

{% hint style="info" %}
This section should be skipped if using CheckoutChamp hosted pages
{% endhint %}

1. Edit the plugin and retrieve the AgeChecker ID. Include this ID in the Order Import API call as the **custom\_order\_AgeChecker** parameter. If using the PayPal legacy workflow, also pass it in the Confirm PayPal API call.
2. The date of birth (DOB) is required for AgeChecker. Include the DOB in the Order Import API call as the **dob** parameter. If using the PayPal legacy workflow, also pass it in the Confirm PayPal API call.
3. Set the UUID value by using the "AgeVerificationID" returned from the Order Import API under customFields.
4. Add script similar to below to the body of any page on which to verify age.  Execute AgeCheckerAPI.show(UUID) only if the order **reviewStatus=AGE**.  If the order is not already in browser session memory then call the [Order Query API](https://apidocs.checkoutchamp.com/#76291445-0d28-42f3-89cf-d020a621e37d) with **includeCustomFields=1** to retrieve order details.

{% code fullWidth="true" %}
```javascript
<!-- Example Script Start: Show AgeChecker Popup on page load -->
<script type="text/javascript">
function  myGetCustomerCRMOrderDetails() {
	// Write code to fetch customer CRM order details and return order details as an object
	// this is where you may need to call Order Query API with includeCustomFields=1
}

function myConfigureAgeCheckerPopup() {
	// Calling function to get CRM order details
	var customerCRMOrderDetails = myGetCustomerCRMOrderDetails();

	// Retrieving AgeVerificationID (UUID) from custom fields in CRM order details.
	var ageVerificationUUID = customerCRMOrderDetails.customFields && customerCRMOrderDetails.customFields.AgeVerificationID;

	// Checking if customer need to complete AgeChecker popup verification based on review status and UUID received from CRM order details
	if (customerCRMOrderDetails.reviewStatus !== "AGE" || !ageVerificationUUID) {
		return;
	}

	// Update below variable value with your AgeChecker client id.
	var ageCheckerClientId = "CLIENT ID";

	$("head").append("<noscript><meta http-equiv='refresh' content='0;url=https://agechecker.net/noscript'></noscript>");
        (function(w,d) {
           	const config = {
           	    mode: "manual",
           	    key: ageCheckerClientId,
           	    show_close: true,
           	    onready: function() {
           	    	// Statement to display AgeChecker verification popup with UUID once script is ready
           	        AgeCheckerAPI.show(ageVerificationUUID);
           	    },
           	    onhide: function() {
           	    	// Function gets called when customer closes AgeChecker verification popup without completing verification process.
           	        // Add custom code to alert and record customer verification status
           	    },
           	    onclosed:  function() {
           	    	// Function gets called when customer has completed AgeChecker verification.
           	        // Customer journey is finished at this step and here you can add custom code to record customer verification status
           	    }
           	};
           	w.AgeCheckerConfig=config;
           	if(config.path && (w.location.pathname+w.location.search).indexOf(config.path)) return;
           	var h = d.getElementsByTagName("head")[0];
           	var a = d.createElement("script");
           	a.src = "https://cdn.agechecker.net/static/popup/v1/popup.js";
           	a.crossOrigin = "anonymous";
            a.onerror = function(a) {
            	w.location.href="https://agechecker.net/loaderror";
            };
            h.insertBefore(a,h.firstChild);
        })(window, document);
}

       // Function call to configure and trigger AgeChecker Popup on page
       myConfigureAgeCheckerPopup()
</script>
<!-- Example Script End -->
```
{% endcode %}
