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

# SellAuth

> Accept Rust-skin payments on a SellAuth shop using your own Cloudflare Worker and Skinloop checkout.

The bridge runs in **your Cloudflare account**. SellAuth delivers an invoice
only after Skinloop confirms payment.

## Before you start

You'll need a **Cloudflare account**, a **GitHub account**, and a SellAuth shop
on a plan that supports **custom payment methods**.

## 1. Deploy the bridge

Click the button below, connect GitHub to Cloudflare, and enter these settings
when prompted:

| Setting | Where to find it | Store as |
| - | - | - |
| `SKINLOOP_API_KEY` | Skinloop **API Keys & Webhooks**; allow `checkout:create` and `checkout:read`, restricted to Rust | Cloudflare secret |
| `SELLAUTH_API_KEY` | SellAuth **Account → Developers**; create a key for this shop with invoice access | Cloudflare secret |
| `SELLAUTH_SHOP_ID` | Your SellAuth shop ID | Cloudflare variable |

Keep API keys in **Cloudflare secrets**, not GitHub or normal variables.

[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/bearyx-dev/skinloop-sellauth-cloudflare)

## 2. Copy the Worker URL and approve it

In **Cloudflare → Workers & Pages → your Worker → Domains & Routes**, turn on
the **Production** `workers.dev` URL and copy it. Example:

```text theme={null}
https://sellauth-skinloop-rust.your-account.workers.dev
```

![Turn on the production Worker URL in Cloudflare Domains & Routes](https://mintcdn.com/skinloop/l5ht9lM-hPNIQLlC/public/integrations/sellauth/worker-production-domain.png?fit=max\&auto=format\&n=l5ht9lM-hPNIQLlC\&q=85\&s=c9ccfa9f4c12b69bddcdfb94552ccdfc)

In **Skinloop → Settings → Checkout Settings → Checkout Redirect Origins**, add
your Worker URL **without any path**. Use your own URL, not the example above.

![Approve the Worker URL in Skinloop Checkout Redirect Origins](https://mintcdn.com/skinloop/l5ht9lM-hPNIQLlC/public/integrations/sellauth/checkout-redirect-origins.png?fit=max\&auto=format\&n=l5ht9lM-hPNIQLlC\&q=85\&s=71b4a3f073ad983260a8e8d94d9ef179)

## 3. Connect Skinloop's webhook

1. Open your Worker URL and copy its `webhookEndpoint`.
2. In **Skinloop → API Keys & Webhooks → Webhooks**, add that endpoint.
3. Copy the signing secret Skinloop shows **once**. In **Cloudflare → Workers &
   Pages → your Worker → Settings → Variables and Secrets**, add it as a
   **Production Secret** named `SKINLOOP_WEBHOOK_SECRET_CURRENT`, then deploy.

![Add the Skinloop webhook signing secret in Cloudflare](https://mintcdn.com/skinloop/l5ht9lM-hPNIQLlC/public/integrations/sellauth/cloudflare-webhook-secret.png?fit=max\&auto=format\&n=l5ht9lM-hPNIQLlC\&q=85\&s=8c451b1f6411040e024bb3878bea3021)

## 4. Add the SellAuth payment method

In **SellAuth → Payment Methods**, create a **Custom Payment Method** with
**Redirect to URL**. Use your Worker URL followed by `/pay?invoice={id}`.
Example (replace the domain with yours):

```text theme={null}
https://sellauth-skinloop-rust.your-account.workers.dev/pay?invoice={id}
```

Keep `{id}` exactly as written; SellAuth fills in the numeric invoice ID.
Do not use `{unique_id}`. This integration accepts **USD invoices only**.

![Choose Redirect to URL and enter the SellAuth Worker payment URL](https://mintcdn.com/skinloop/l5ht9lM-hPNIQLlC/public/integrations/sellauth/sellauth-redirect-url.png?fit=max\&auto=format\&n=l5ht9lM-hPNIQLlC\&q=85\&s=50a0dbe7310468aa6aa772d8650b474d)

[Download the Skinloop payment-method icon](https://docs.skinloop.io/public/integrations/sellauth/payment-method-icon.png)

## 5. Test before enabling it for buyers

Use a SellAuth invoice with a valid buyer email to create a low-value unpaid
Rust order. The bridge sends that invoice email to Skinloop when creating
the checkout. Check that Skinloop shows the correct
amount, a cancelled checkout does not deliver the invoice, and a completed
payment marks it paid **once**. Enable the method for buyers only after this
test succeeds.

### If checkout does not open

In **Cloudflare → Workers & Pages → your Worker → Observability → Logs**, find
the failed `/pay` request by its time and open it. Send
[Skinloop support](mailto:support@skinloop.io) the time (including time zone),
HTTP status, and error message shown to the buyer. If Cloudflare shows a
**Ray ID** in the request details, include it as the support reference. You can
also send the relevant log entry or a screenshot, but hide the invoice ID,
buyer details, and any secrets first. Never send API keys or signing secrets.

If no logs appear, turn on Workers Logs in Cloudflare's **Observability**
settings. Do not retry a checkout if a payment may already be in progress;
contact support instead.

> [!WARNING]
>
> **Rust only.** A return page does not prove payment. The invoice and amount
> must match a payment confirmed by Skinloop.


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