totalQuantity greater than 1, you’re not
creating one escrow that many people share — you’re creating a reusable link
with stock. Each buyer who pays gets their own private copy of the escrow,
while the original link stays open for the next buyer. This page explains exactly
what happens and why.
Think of the original escrow as a product listing with N units in stock, not
as a single transaction. The listing never gets “used up” by one buyer — instead
it spawns a fresh escrow per sale and counts its stock down.
Why duplication exists
A standard escrow moves through one lifecycle:AWAITING_PAYMENT → OPENED → CLOSED. Once a buyer funds it, it’s OPENED and locked to that buyer. If you
want to sell the same item to 10 different buyers from one link, a single
escrow can’t represent 10 independent lifecycles.
So Payluk clones the escrow at payment time: the buyer’s money attaches to a
brand-new copy (its own id, its own paymentToken, its own lifecycle), and the
original link is left untouched and AWAITING_PAYMENT so the next buyer can pay
too. The original’s totalQuantity is the remaining stock counter.
When duplication happens
Duplication is not universal. A clone is minted only when all of these are true at payment time:The escrow’s
totalQuantity > 1.The escrow was created through the API (
channel: "API").The seller is eligible — a business account or a merchant customer (
merchant_user).The link is not sold out yet (it has been duplicated fewer than
totalQuantity times).What happens on each purchase
Step by step, when the buyer callsPOST /v1/payment/escrow against a
multi-quantity link:
Eligibility & stock check
Payluk confirms the four conditions above and checks how many times this link
has already been duplicated. If it has been duplicated
totalQuantity times,
it’s sold out and no clone is made.A clone is minted
A new escrow is created copying the original’s
amount, purpose,
description, whoPays, maxDelivery, deliveryTimeline, image and channel —
with a fresh id and paymentToken, a freshly calculated fee, and
state: AWAITING_PAYMENT.The payment re-points to the clone
The buyer’s payment is attached to the clone’s
escrowId, not the
original. So this buyer’s funds, delivery window, confirmation and any dispute
all run on their own copy — completely isolated from other buyers.On successful verification, stock decrements
Once the payment verifies, the original link’s
totalQuantity is reduced
by 1 and its internal sold-counter is incremented. The original stays
AWAITING_PAYMENT, ready for the next buyer.A worked example
You create one escrow:amount: 50000, totalQuantity: 3.
| Event | Original link | Clone created | Clone state |
|---|---|---|---|
| Created | totalQuantity: 3, AWAITING_PAYMENT | — | — |
| Buyer A pays & verifies | totalQuantity: 2, AWAITING_PAYMENT | Clone #1 | OPENED (A’s) |
| Buyer B pays & verifies | totalQuantity: 1, AWAITING_PAYMENT | Clone #2 | OPENED (B’s) |
| Buyer C pays & verifies | totalQuantity: 0, AWAITING_PAYMENT | Clone #3 | OPENED (C’s) |
| Buyer D tries to pay | sold out — no clone | — | payment funds nothing extra |
What this means for your integration
Track the clone's id, not the link's
Track the clone's id, not the link's
After
POST /v1/payment/escrow, the
funded escrow is the clone. Read the returned escrow id (or watch your
escrow transactions) and use
that id for confirm-payment, claims and disputes — not the original
paymentToken.The original paymentToken is your shareable link
The original paymentToken is your shareable link
Single-quantity = no surprises
Single-quantity = no surprises
With
totalQuantity: 1 (or unset), there is no duplication. The buyer funds
the escrow you created and its id is the one you keep using.Milestone escrows
Milestone escrows
Milestone escrows are funded in full by one buyer and released in stages — the
multi-quantity/stock model does not apply to them.
In short:
totalQuantity is stock on a reusable link. Each sale clones the
escrow so every buyer gets an isolated lifecycle, and the original counts down
until it’s sold out.