Skip to main content

Agent sells credits to Shop using cash

Agent receives cash (or another offline payment method) from a Shop, then issues credits to that Shop's CDN wallet.

Basic flow:

Agent collects payment → record full details → issue credits to Shop → save reconciliation ledger

Who does what

RoleAction
AgentCreate credit sale transaction, enter payment details, confirm status
ShopPays per agreement; receives credits in wallet
SystemDebits Agent credits, credits Shop, calculates amount due, writes ledger, stores audit

Required information when selling

When Agent sells credits to a Shop, the form must include all items below before submit.

1. Counterparty & quantity

FieldRequiredDescription
ShopShop receiving credits (select from Agent's shop list)
Credits soldCredits issued to Shop CDN wallet (positive number, > 0)
Cost rate✅ (display)Shop (buyer) cost rate at time of sale — used to calculate amount due
Amount due✅ (auto-calculated)Credits sold × Cost rate — Agent confirms before saving

2. Payment & receipt method

FieldRequiredDescription
Actual amount receivedAmount Agent actually received (USD). Default = amount due
Receipt methodHow Shop paid — e.g. Cash, Bank transfer, Check, Other
Payment received atWhen Agent confirmed payment received (default = now; editable if entered late)
CurrencyDefault USD

3. Status

StatusMeaningWhen to use
Paid in full — credits issuedFull payment received, credits in Shop walletStandard flow: collect payment before issuing credits
Pending payment — credits issuedCredits issued but payment not yet received / not fully receivedOnly with temporary credit policy — requires separate approval
Partially paidPartial payment receivedRecord Amount received + Remaining
CancelledTransaction cancelled, no credits issued (or credits reversed)Wrong entry, refund, etc.

Default recommendation: Safest flow is to allow submit only when status = Paid in full — credits issued. Other statuses are optional if receivables management is needed later.

4. Reference (optional)

FieldRequiredDescription
External referenceRecommendedInternal receipt number, transfer reference, payment voucher number
NoteRecommendedShort additional description (if needed)

FieldReason
Performed by (Agent)Audit — who created the transaction (from session)
Linked credit transactionReference to Agent debit / Shop credit ledger entry after issuance

Business rules

  1. Cost rate is snapshotted for Shop (buyer) at time of sale — not updated if Shop changes rate later.
  2. Amount due = Credits sold × Cost rate of the Shop buyer.
  3. Agent must have sufficient credits in CDN wallet before issuing to Shop.
  4. Issuing credits does not change Shop's online USD wallet — this records cash / offline payment collected by Agent.
  5. Any status or amount change after creation must have an audit log (who, when, from value → to value).

Example

Shop Shop-Gamma under Agent Agent-Beta, Shop cost rate 80% (0.80).

ItemValue
Credits sold2,000 credits
Amount due2,000 × 0.80 = $1,600
Receipt methodCash
Actual amount received$1,600
StatusPaid in full — credits issued
External referencePT-AG-2026-0156
NoteJune 2026 transaction

After submit: Shop CDN wallet +2,000 credits; Agent CDN wallet −2,000 credits; cash settlement ledger records Agent received $1,600 from Shop-Gamma.