When a donor already pays in WooCommerce, your plugin should tell Sharity so the gift appears as a completed donation and the buyer as a supporter — tagged with source woocommerce and the WooCommerce order id.
Use the campaign URL slug from Campaign → Settings. Embed Sharity widgets only when you want checkout to run inside Sharity/Stripe instead.
Prerequisites
A paid Sharity plan
API key with write scope
Campaign URL slug
WordPress code that can POST to HTTPS after the order is paid
Steps
Create a write API key and store it in plugin settings or server env — never in the WordPress repo.
Copy the campaign URL slug from Campaign → Settings. Send it as
campaignSlug(campaign id also works).On order paid (for example
woocommerce_order_status_completed), POST tohttps://<your-dashboard-host>/api/v1/orderswith headerAuthorization: Bearer <key>and JSON includingcampaignSlug,source(woocommerce),externalOrderId,amountCents, andemail(optionalfirstName,lastName,metadata). Sharity creates a completed donation (no Stripe charge), upserts the supporter, applies campaign → list rules, and may fire outbounddonation.completed. Replays with the same campaign + source + order id return as idempotent.Confirm in Donations (WooCommerce badge) and Supporters. Optionally also register webhooks if WordPress should receive Sharity events.