# Roblox Idempotent Rewards And Receipt Processing

Design server-side rewards and receipt handling for Roblox that ensures safe, deduplicated transaction processing under retries and concurrent delivery.

**Canonical URL:** https://skillshunter.net/skills/discovered-fe0a4cf50a435c1c137227dc3035211fa6ff5e115897c198

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-fe0a4cf50a435c1c137227dc3035211fa6ff5e115897c198

**Markdown URL:** https://skillshunter.net/skills/discovered-fe0a4cf50a435c1c137227dc3035211fa6ff5e115897c198.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-fe0a4cf50a435c1c137227dc3035211fa6ff5e115897c198/download

**Category:** Software & Development

**Source URL:** https://github.com/Aziz24666/Codex_Roblox_skills/blob/eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c/v40/skills/roblox-idempotent-rewards-and-receipt-processing/SKILL.md

**Source commit:** eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c

**Listing approved at:** 2026-11-30

**Created at:** 2026-11-29T11:08:34.000000Z

**Updated at:** 2026-11-30T06:52:12.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Generate an operation ID server-side before attempting the mutation and reuse the exact ID on retries. Validate eligibility, quantities, ownership, and cooldowns on the server. Use PurchaseId as the durable idempotency key for developer-product receipts and ensure every developer product is handled with a single intentional receipt routing strategy.

### When to use it

- Handling duplicate receipt callbacks
- Processing receipts across multiple servers
- Managing retries after ambiguous writes
- Validating eligibility and ownership for gameplay rewards
- Recovering from transactions spanning multiple keys

## Skill instructions

---
name: roblox-idempotent-rewards-and-receipt-processing
description: Design deduplicated server-side rewards and developer-product receipt handling that is safe under retries and concurrent delivery.
---

# Roblox idempotent rewards and receipt processing

## Developer-product receipts
- Use PurchaseId as the durable idempotency key.
- Expect unresolved receipts to be delivered again and a receipt callback to overlap across servers.
- Check and write the deduplication marker inside the same UpdateAsync operation that applies the profile reward whenever both belong to one profile key.
- Acknowledge only after the durable profile update is confirmed.
- If the outcome is uncertain, reload and reconcile by PurchaseId. Never blindly grant again.
- Select and document a single intentional receipt routing strategy: ProcessReceipt or BindReceiptHandler. Ensure every developer product is handled and unknown products are not acknowledged as fulfilled.

## Gameplay rewards and exchanges
- Generate an operation ID server-side before attempting the mutation.
- Reuse the exact ID on retries.
- Validate eligibility, quantities, ownership, and cooldowns on the server.
- Keep the state mutation and deduplication marker in one UpdateAsync transform when they share a key.
- Define recovery when a transaction spans multiple keys; DataStore operations do not provide assumed cross-key atomicity.

## Test matrix
Cover duplicate callbacks, callbacks on two servers, duplicate remotes, retries after ambiguous writes, invalid products, out-of-order receipts, player disconnects, and shutdown during commit.

## Guardrails
Keep the outcome fixed and disclosed. Do not create paid random outcomes, gambling, loot boxes, or wagering systems. This skill is about reliable transaction processing, not purchase pressure.

