Skip to content
English
  • There are no suggestions because the search field is empty.

Market Listing Automation Part 1: Using the Access Code System

Admin How-To Guide: Market Listing Access Code System

Why it exists...

This system allows customers to purchase one or more market listing submissions through our website, receive unique access codes by email, and use those codes to unlock the market listing submission form. It also keeps WordPress, Stripe, HubSpot and Zapier in sync so our team can track purchases, form submissions, and code usage.

What it does...

When a customer purchases a market listing product, the system automatically creates an access code record in WordPress, creates the relevant deal and ticket records in HubSpot, emails the customer their code and submission link, and then marks the code as used once the customer successfully submits the form.

Platforms involved

This workflow uses the following systems together:

  • WordPress

  • Stripe

  • Zapier

  • HubSpot

Process Overview

The full process works like this:

  1. A customer sees a market listing product on our website.

  2. They click through to Stripe and complete their purchase.

  3. The Stripe purchase triggers a Zap.

  4. That Zap does three things:

    • sends the purchase data to WordPress to create the access code record

    • sends the purchase data to HubSpot to create a Closed Won deal and an open ticket for asset delivery

    • sends the customer an email containing their access code(s) and a link to the validation page.

  5. The customer clicks the link in the email and lands on the access code validation page.

  6. The customer enters a valid unused access code. If the code is valid, they are redirected to the market listing form submission page.

  7. The market listing form is a HubSpot form embedded on a WordPress page. When the customer submits the form:

    • a HubSpot workflow updates the open ticket

    • a Zap sends the used access code back to WordPress.

  8. WordPress marks that code as used so it cannot be used to reach the form again.


WordPress component

The WordPress side of the system is handled by the custom Access Codes plugin.

This plugin is responsible for:

  • storing access codes and their status

  • checking whether a code is valid or already used

  • allowing admins to manually create codes when needed

  • allowing admins to view active and used codes

  • allowing admins to manage the write endpoint security secret

Access Codes admin area

In WordPress admin, go to Access Codes in the left-hand menu.

This is where admins can:

  • view all active and used codes

  • manually create a new access code

  • manage the write endpoint security settings

Manually creating an access code

If a code ever needs to be created manually, go to Access Codes and click Create Access Code.

Admins can enter:

  • an access code manually, or leave it blank to auto-generate one

  • a customer email, or leave it blank

  • a purchase ID, or leave it blank

If the access code field is left blank, WordPress will generate a new code automatically.

Use manual code creation only when needed, such as:

  • replacing a missing code

  • issuing a manual code for customer service reasons

  • testing the workflow

How the validation page works

The validation page is where the customer enters their code. The link to this page is sent to the customer in their automated purchase confirmation email.

When a customer submits a code on the validation page:

  • WordPress checks whether the code exists

  • WordPress checks whether the code has already been used

  • if valid, the customer is redirected to the market listing form page

  • if invalid or used, they see an error message

How codes become marked as used

A code is not marked as used when the customer lands on the form page.

A code is only marked as used after the form has been successfully submitted and the Zap sends confirmation back to WordPress.

This is important because it prevents a code from being consumed just by visiting the page.

Write endpoint security

The Access Codes plugin includes security for the WordPress write endpoints used by Zapier. This protects the endpoints that add access code records, and mark them as used.

The endpoint security 'secret' is like a password which lets Zapier talk securely to WordPress.

The 'secret; is managed inside Access Codes under Write Endpoint Security. Only admins should change this value.

If the secret is ever updated: the matching secret in Zapier must also be updated otherwise the Zapier POST steps will fail.

When to update the endpoint secret

Only change the secret if there is a clear reason, such as: security best practice, a credential rotation, concern that the secret may have been exposed. If the secret is changed, update all relevant Zapier POST steps in Zap 1 and Zap 2 immediately.


HubSpot component

HubSpot is used for two parts of this workflow:

After purchase

  • create a Closed Won deal

  • create an open ticket for managing the purchased asset

  • sends the customer a confirmation email with their access codes and validation page link

After form submission

  • update the open ticket to reflect that the submission has been received


Zapier component

Zapier connects the systems together. The relevant zaps are in the Market Automation Zaps folder.

Zap 1: Purchase Zap

Triggered by Stripe after purchase. Find Zap 1 here. This Zap:

  • generates the access code(s)
  • sends purchase details to WordPress to create the access code record(s)

  • sends purchase details to HubSpot to create the deal and ticket

    • HubSpot then uses that information to send the customer's confirmation email

Zap 2: Submission Zap

Triggered after the HubSpot form is submitted. Find Zap 2 here. This Zap:

  • sends the used access code back to WordPress

    • WordPress then marks that code as used

  • sends the form contents to Notion

Common troubleshooting

Customer says their code does not work

Check the Access Codes viewer in WordPress. Confirm:

  • the code exists

  • the code is still marked Active

  • the customer has entered it correctly

If needed, issue a new code manually.

Customer says their code says it has already been used

Check whether:

  • the original code has been marked as used in Access Codes.

  • the customer submitted a form that included the access code already.

  • if a replacement code needs to be issued.

Purchase completed but no code appears in WordPress

Check:

  • whether Zap 1 ran successfully

  • whether the WordPress POST step succeeded

  • whether the endpoint secret in Zapier matches the one in WordPress

Customer submitted the form but the code is still Active

Check:

  • whether Zap 2 ran successfully

  • whether the POST step to mark the code used succeeded

  • whether the correct access code value was passed through the Zap

HubSpot deal or ticket is missing

Check Zap 1 and confirm the HubSpot actions completed successfully.

What site admins should check regularly

Site admins should periodically check:

  • whether new purchases are creating active access code records

  • whether used codes are being marked correctly after form submission

  • whether customer emails are being sent successfully from HubSpot

  • whether HubSpot deals and tickets are being created correctly

  • whether the endpoint secret in WordPress still matches Zapier

Key admin rule

Do not manually mark a code as used unless there is a specific operational reason. Under normal operation, code usage should be updated automatically after successful form submission.


Summary

This system is designed to automate the full market listing purchase and submission journey.

In short:

  • Stripe handles payment

  • Zapier handles system-to-system communication

  • WordPress stores and validates access codes

  • HubSpot manages sales, delivery records, and customer communication

  • the customer receives an email, validates their code, submits the form, and the code is then marked used automatically.