Skip to content

Developer Setup

This page is for developers who configure the NOMA Sync Worker. Staff use the Dashboard to monitor syncs and set mappings — they do not need the webhook URL or secrets.

Important: The Dashboard URL (https://noma.21adsmedia.io/) is where users log in. The Worker URL (webhook base) is different — e.g. https://your-worker.workers.dev or your production Worker host. Use the Worker URL in Givebutter, Square, and Mailchimp webhook settings, not the Dashboard URL.

Givebutter ​

1. API key ​

  1. In Givebutter: Settings → Integrations or API → create/copy an API key (transactions, campaigns, contacts).
  2. Set Worker secret:
bash
echo "your-api-key" | wrangler secret put GIVEBUTTER_API_KEY

2. Webhook in Givebutter ​

  1. Givebutter → Webhooks (or Integrations → Webhooks).
  2. Add webhook:
    • URL: https://<your-worker-url>/webhooks/givebutter
    • Events: transaction.succeeded, ticket.created, and any others NOMA Sync expects (see Givebutter docs).
  3. If Givebutter provides a signature secret, set it:
bash
wrangler secret put GIVEBUTTER_WEBHOOK_SECRET

Env reference (Givebutter) ​

VariablePurpose
GIVEBUTTER_API_KEYPolling and campaign/transaction fetch
GIVEBUTTER_WEBHOOK_SECRETOptional; webhook signature verification

Square ​

1. Square application ​

  1. Square Developer Dashboard → create or select app (e.g. "NOMA Sync").
  2. Note Application ID; obtain Access Token (production or sandbox).
  3. Scopes: Orders (read), Customers (read), Payments (read).

2. Webhook subscription ​

  1. Square app → Webhooks → Add subscription.
  2. Endpoint URL: https://<your-worker-url>/webhooks/square
  3. Events: order.created, order.updated
  4. Copy the Webhook Signature Key.

3. Cloudflare secrets ​

From repo root:

bash
wrangler secret put SQUARE_APPLICATION_ID
wrangler secret put SQUARE_ACCESS_TOKEN
wrangler secret put SQUARE_WEBHOOK_SIGNATURE_KEY

Set SQUARE_SUBSCRIPTION_ID if your Square setup requires it.

Env reference (Square) ​

SecretDescription
SQUARE_APPLICATION_IDSquare application ID
SQUARE_ACCESS_TOKENOAuth access token
SQUARE_WEBHOOK_SIGNATURE_KEYWebhook signature key from Square
SQUARE_SUBSCRIPTION_IDIf required by Square

Mailchimp ​

1. Webhook URL ​

In Mailchimp (Integrations → Webhooks or Automation/Audience settings), set:

https://<your-worker-url>/webhooks/mailchimp

Send at least unsubscribe and cleaned (or equivalent) events.

2. Webhook secret (optional) ​

If the Worker verifies Mailchimp webhooks:

bash
wrangler secret put MAILCHIMP_WEBHOOK_SECRET

Use the same value in Mailchimp’s webhook config if available.

3. Mailchimp API (if used) ​

If NOMA Sync calls the Mailchimp API (lists, member data), create an API key in Mailchimp and set:

bash
wrangler secret put MAILCHIMP_API_KEY

Check env.example and the codebase for exact variable names.


WordPress event sync (Givebutter → site) ​

If event campaigns should create/update events on the NOMA WordPress site, set:

VariableDescription
WORDPRESS_URLWordPress site URL (e.g. https://notonemorealabama.org), no trailing slash
WORDPRESS_API_KEYMust match hello_noma_sync_api_key in WordPress
WORDPRESS_TIMEZONEOptional; IANA timezone (e.g. America/Chicago)

See Givebutter event sync for WordPress-side configuration.


After configuration ​

  • Staff: Use the Dashboard → Mappings (Givebutter/Square) and Mailchimp Settings (list/tag mapping). Use Syncs to verify and resolve errors.
  • Verify: Make a test donation, order, or unsubscribe; check Dashboard → Syncs for a success row and confirm in LGL.