> ## Documentation Index
> Fetch the complete documentation index at: https://api.onlysocial.io/llms.txt
> Use this file to discover all available pages before exploring further.

# External checkout

> Sell your plans on GoHighLevel, ThriveCart or a Stripe Payment Link, and give each buyer their plan without assigning it by hand.

If you sell outside your own Stripe billing, for example on GoHighLevel, ThriveCart or a Stripe Payment Link, **Agency Dashboard > External checkout** connects those sales to your plans. Each sale gives the buyer the plan or add-on you map it to, once they confirm the purchase from the email we send them.

The owner and team members with **Create, edit and delete plans** can use this page.

## Set it up

**1. Create an offer**

Under **Offers**, click **New offer**. Enter the cart's **Product id**, and optionally a **Price id** (matched first), choose the plan or add-on it **Grants**, and keep **Take access back after a refund or chargeback** ticked unless you want buyers to keep access after a refund. Your webhook stays off until you create one.

**2. Create the signing secret**

Under **Signing secret**, click **Create secret**. It is shown once: copy it.

**3. Point your cart at your webhook**

Under **Your webhook**, copy the **Purchases** URL and the **Refunds** URL into your cart's webhook settings, and send the secret with every webhook in the `X-OS-Secret` header. Selling on more than one cart? Pick the **Cart** first: each cart gets its own URLs, so two carts' order numbers never mix.

![Your webhook URLs, the signing secret and the Stripe Payment Links endpoint](https://mintcdn.com/onlysocial/8zyzYpECG1FNS_AI/images/whitelabel/agency/external-checkout.jpg?fit=max\&auto=format\&n=8zyzYpECG1FNS_AI\&q=85\&s=6f672d2d3654446b8edfb2ef908cbf7d)

To sign requests instead of sending the secret, put an HMAC-SHA256 of the event name (`purchase` or `refund`), a newline and the raw body, keyed with your secret, in the `X-OS-Signature` header, in lowercase hex. The purchase must be in the request body, as JSON or form fields.

**Regenerate secret** replaces the secret. The old one stops working at once, so update your cart straight away.

### Stripe Payment Links

Optional. In your Stripe dashboard, add an endpoint with the URL shown under **Stripe Payment Links**, for the events `checkout.session.completed`, `checkout.session.async_payment_succeeded`, `charge.refunded`, `charge.dispute.created` and `charge.dispute.closed`. Paste that endpoint's signing secret (`whsec_…`) into the box and click **Save**. A Payment Link's id (`plink_…`) goes in an offer's **Product id**.

Only one-off payments grant access here. Subscriptions belong to your [Stripe billing](https://api.onlysocial.io/whitelabel/payments.md). Anything else on that Stripe account is ignored.

## What a sale does

1. Your cart sends the purchase. If it matches an offer, we email the purchase's email address, in your brand, asking the buyer to confirm it. The link is on your domain and works for 7 days.
2. The buyer opens the link. Signed out, they sign in, or sign up where you take sign-ups, and come back to it.
3. Signed in with the purchase's email address and owning a workspace with your agency, they click **Confirm purchase**. Only then does their workspace get the plan or add-on. If a plan would replace their current one, the page names both.

Someone signed in with another address is told so, and nothing changes. A buyer with no workspace with your agency yet is asked to create one and open the link again.

A buyer whose plan was paid this way sees **Paid** on their billing page, and your Stripe checkout is not offered to them for that plan.

## Purchases

**Purchases** lists every event received, with its status:

![Three offers, and purchases that are applied, pending, unmatched and revoked](https://mintcdn.com/onlysocial/8zyzYpECG1FNS_AI/images/whitelabel/agency/external-checkout-purchases.jpg?fit=max\&auto=format\&n=8zyzYpECG1FNS_AI\&q=85\&s=e577f553367da0ddb88239532b7cac11)

| Status | Means |
| - | - |
| **Pending** | Waiting for the buyer to confirm it from the email. |
| **Applied** | The buyer confirmed and has the plan or add-on. |
| **Revoked** | Taken back after a refund or chargeback. |
| **Unmatched** | No offer matches, the email is missing, or it could not be applied. You get an email about it. |
| **Duplicate** | The same sale or refund arrived again. Nothing was granted twice. |

**Retry** looks at an unmatched or pending purchase again, for example after you add the offer it names. It sends the buyer the confirmation email again, at most once every 7 days.

A refund or chargeback takes back only the sale it names. The customer goes back to the plan you had given them before that sale. Removing an offer takes nothing back.

Sales on your webhook only ever reach your own customers and your own plans.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.