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

# Reseller Dynamic Delivery

> Resell another shop's products on your own SellAuth shop with fully automatic delivery.

## Overview

Reseller Dynamic Delivery connects **your own SellAuth shop** to the shop you resell for (the **source shop**). You list their product on your shop at your own price. When a customer buys it:

1. Your shop sends a [dynamic delivery request](/developers/dynamic-delivery) to your personal delivery URL on the source shop.
2. The source shop verifies the request, charges **your reseller balance** at your discounted price, and pulls the deliverables from its own stock.
3. Your customer receives the deliverables (and the source product's instructions) on your checkout, instantly.

No code is involved. Your margin is the difference between the price you charge your customer and the discounted price charged to your balance.

<Note>The fastest way to set this up is [connecting your store](/resellers/connect-your-store): it imports the catalog and configures everything below automatically, including the webhook secret. The manual setup on this page is for importing products one by one, or for stores that are not connected.</Note>

## Setup

<Steps>
  <Step title="Copy your shop's webhook secret">
    On **your own shop's** dashboard, go to **Storefront > Configure > Miscellaneous** ([dash.sellauth.com/shop#miscellaneous](https://dash.sellauth.com/shop#miscellaneous)) and copy the **webhook secret**. If none is shown, click **Regenerate**.

    Your shop signs every outgoing dynamic delivery request with this secret. The source shop uses it to verify that requests really come from your shop.
  </Step>

  <Step title="Save the secret on the reseller panel">
    On the **source shop's** storefront, open `/customer/reseller` and click **Manage delivery**. Paste the webhook secret and **enable dynamic delivery**.
  </Step>

  <Step title="Copy a product's delivery URL">
    In the reseller catalog (on the panel, or via the [List Products](/reseller-api/products/list-products) endpoint's `dynamic_url` field), copy the delivery URL of the variant you want to resell:

    ```
    https://api.sellauth.com/v1/reseller/dynamic/{your_token}?product_id=123&variant_id=456
    ```

    Each variant has its own URL. The token in the path is yours personally, so do not share these URLs.
  </Step>

  <Step title="Paste it into your own product">
    On your own shop, create the product you want to sell. Set the variant's deliverables type to **Dynamic** and paste the delivery URL into the **Dynamic URL** field.

    Set your own price freely; it does not need to match the source shop's price.
  </Step>
</Steps>

That's it. Test it with a real (or balance-paid) purchase on your shop.

## How a delivery is processed

When your customer's payment completes, your shop calls the delivery URL once per invoice item. On the source shop's side:

1. **Signature check**: the request's `X-Signature` header (HMAC-SHA256 of the raw body) is verified against the webhook secret you saved on the reseller panel, or, for a [connected store](/resellers/connect-your-store), against that store's current webhook secret directly. Requests with a missing or wrong signature are rejected, as are requests older than 5 minutes.
2. **Idempotency**: your shop sends an `Idempotency-Key` per item. Retries of the same delivery (after a timeout or a temporary error) can never charge your balance twice.
3. **Order + charge**: the source shop creates a reseller order for `product_id` / `variant_id` with the quantity your customer bought, charges your balance at your tier price, and pulls stock.
4. **Response**: the deliverables and the source product's instructions are returned to your shop and shown to your customer. Your shop's own product instructions are used if you set any; otherwise the source shop's instructions are shown.

## Failures and refunds

| Outcome | What your customer sees | Your balance |
| - | - | - |
| Delivered | Deliverables + instructions on your checkout | Charged your discounted price |
| Insufficient balance | An error asking to wait / contact you | Not charged. Top up, then use **Redo Dynamic Delivery** on your own shop's invoice to retry. |
| Out of stock | An out of stock message | Not charged (or refunded if the stock ran out mid-order) |
| Source delivery failed | A failure message | Automatically refunded |
| Temporary error | Nothing yet; your shop retries automatically | One charge at most, guaranteed by the idempotency key |

Anything charged for an item that was not delivered is **refunded to your reseller balance automatically**. Failed items can be retried from your own shop's invoice page (**Redo Dynamic Delivery**) once the cause (usually balance or stock) is fixed.

<Tip>Keep your balance topped up ahead of your sales volume. An order that fails on insufficient balance shows an error to your customer instead of their product.</Tip>

## Price ceiling

The source shop can change its prices at any time, and every delivery is charged at the **current** discounted price. To make sure a price rise can never eat your whole margin, append a `max_unit_price` parameter to a variant's delivery URL:

```
https://api.sellauth.com/v1/reseller/dynamic/{your_token}?product_id=123&variant_id=456&max_unit_price=4.50
```

If your discounted unit price (in the product's currency) ever exceeds the ceiling, the delivery is refused **before anything is charged**. The failure reason on your invoice item tells you the current price, so you can raise the ceiling (and your own price) or remove the parameter to resume sales.

## Regenerating credentials

* **Delivery URLs**: the reseller panel's **Manage delivery** modal can regenerate your delivery token. Every URL you have pasted into your shop stops working immediately, so update them all afterwards.
* **Webhook secret**: if you regenerate the secret on your own shop's dashboard, save the new value on the reseller panel too, otherwise deliveries fail signature verification.

## Troubleshooting

* **Deliveries fail immediately after setup**: the webhook secret saved on the reseller panel does not match your own shop's current secret, or dynamic delivery is not enabled on the panel.
* **Deliveries stopped working**: your delivery URLs were regenerated, your reseller status changed, or the source shop disabled its reseller program. The failure reason is shown on your invoice item.
* **Customer paid but got an error**: check the item's failure reason on your own shop's invoice. Balance and stock issues are refunded automatically and can be redelivered.


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