{"data":{"slug":"discovered-8318fc1707f64b1877c076a7bb38d616f85b3a33d05af9cd","title":"Roblox Developer Product Receipt Reliability","summary":"Implement server-authoritative, idempotent Roblox developer-product receipt fulfillment with durable grants, retries, and recovery tests. Use the receipt's stable `PurchaseId` as the idempotency key and ensure durable state management.","url":"https:\/\/skillshunter.net\/skills\/discovered-8318fc1707f64b1877c076a7bb38d616f85b3a33d05af9cd","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-8318fc1707f64b1877c076a7bb38d616f85b3a33d05af9cd","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-8318fc1707f64b1877c076a7bb38d616f85b3a33d05af9cd.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-8318fc1707f64b1877c076a7bb38d616f85b3a33d05af9cd\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before granting a benefit, check whether the purchase has already been committed. Use the `MarketplaceService.ProcessReceipt` or `MarketplaceService:BindReceiptHandler()` API based on the experience's requirements. Ensure that the receipt record and durable benefit are committed together, and document recovery protocols as a saga with explicit pending, committed, and reconciliation states.","instructions":"---\nname: roblox-developer-product-receipt-reliability\ndescription: Implement server-authoritative, idempotent Roblox developer-product receipt fulfillment with durable grants, retries, and recovery tests.\n---\n\n# Developer-product receipt reliability\n\nA purchase prompt is not a receipt, and a receipt is not complete until the purchased benefit has been durably granted. Design developer-product fulfillment around server-owned receipt handling, an idempotency key, durable state, and explicit retry behavior. A receipt can be delivered again; the same purchase must never grant the benefit twice.\n\n## Select one receipt architecture\n\nRoblox documents the `MarketplaceService.ProcessReceipt` callback and the newer `MarketplaceService:BindReceiptHandler()` API. Choose the approach that matches the APIs supported by the experience and the current Creator Hub requirements. Do not register competing receipt handlers for the same product set. Give one server-owned service responsibility for dispatching every developer-product receipt. With filtered `BindReceiptHandler` handlers, ensure each product ID is claimed by exactly one handler and that a deliberate catch-all policy exists for unclaimed products.\n\nFor `BindReceiptHandler`, use the documented `Enum.ReceiptType.DeveloperProduct` transaction type and the corresponding `Enum.ReceiptDecision` result. For `ProcessReceipt`, use the documented `Enum.ProductPurchaseDecision` result. Return the API's retry result when the player is unavailable, the product is unknown, or durable fulfillment has not completed. Never acknowledge a receipt that has not been fully granted.\n\n## Use PurchaseId for idempotency\n\nUse the receipt's stable `PurchaseId` as the idempotency key. Before granting a benefit, check whether that purchase has already been committed. Commit the receipt record and the durable benefit together where the profile\/data model permits. If the architecture spans more than one durable store, document the recovery protocol as a saga with explicit pending, committed, and reconciliation states; do not claim cross-store atomicity.\n\nThe DataStore `UpdateAsync` transform must be deterministic, non-yielding, and free of external side effects. Do not call remotes, change Instances, mutate leaderstats, send analytics, or perform another DataStore write from inside the transform callback. Apply in-memory presentation only after the durable transaction succeeds. Use the existing profile\/session ownership layer and its concurrency protections.\n\n## Receipt processing algorithm\n\n1. Resolve the player from the receipt's user ID. If the player is not on this server, defer the receipt using the documented retry result.\n2. Validate that the product ID exists in the server-owned catalog and that its configured grant handler matches the product type.\n3. Load or reconcile the authoritative player profile using the existing data lifecycle.\n4. Apply the receipt idempotently using `PurchaseId`; the durable result must record the completed grant.\n5. If the receipt was already committed, return the successful decision without granting it again.\n6. If storage fails, the product mapping is missing, or the grant cannot be committed, leave the receipt unresolved so Roblox can redeliver it.\n7. After a successful durable commit, update in-memory state and emit privacy-conscious analytics outside the storage transform.\n8. Return the API-specific success decision only after the grant is durable.\n\nDo not use `PromptProductPurchaseFinished` as proof of purchase or as the fulfillment callback. Roblox explicitly says this event does not confirm that the backend transaction succeeded. The server receipt path is authoritative.\n\n## Design for recovery\n\nTest a repeated receipt on the same server, a repeated receipt on a different server, a player who has left, a DataStore outage, a server shutdown during processing, a product ID absent from the catalog, a duplicate concurrent delivery, and a successful grant followed by a client disconnect. Confirm that unresolved receipts remain retryable and completed receipts cannot grant twice.\n\nKeep the receipt ledger compatible with profile migrations. Decide how the system retains purchase IDs, how it avoids unbounded profile growth, and how old receipts are reconciled before compaction. Never delete idempotency evidence while an unresolved receipt could still be replayed. Document operational alerts and a support-safe reconciliation procedure.\n\n## Observability\n\nLog structured operational outcomes such as receipt accepted, already committed, deferred, unknown product, storage failure, and grant committed. Avoid logging raw player data or unnecessary identifiers. Correlate support cases using approved internal references and restrict access to transaction logs.\n\nThe V48 validator checks the declared architecture and test coverage. It does not execute receipt handlers, contact MarketplaceService, verify DataStore transactions, or prove exact-once behavior.\n\n## Official references\n\n- https:\/\/create.roblox.com\/docs\/reference\/engine\/classes\/MarketplaceService\n- https:\/\/create.roblox.com\/docs\/production\/monetization\/developer-products\n","use_cases":["Implementing idempotent receipt handling for Roblox developer products","Designing durable state management for receipt fulfillment","Creating recovery protocols for multi-store receipt architectures","Validating receipt processing algorithms with retry behavior"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Aziz24666\/Codex_Roblox_skills\/blob\/eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c\/.agents\/skills\/roblox-developer-product-receipt-reliability\/SKILL.md","source_commit":"eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c","license":null,"version":null,"listing_approved_at":"2026-11-30","created_at":"2026-11-29T10:58:48.000000Z","updated_at":"2026-11-30T06:51:34.000000Z","seo_title":"Roblox Developer Product Receipt Reliability Implementation","seo_description":"Ensure reliable and idempotent fulfillment of Roblox developer-product receipts using server-owned receipt handling, durable state, and recovery protocols.","seo_keywords":["Roblox receipt reliability","developer product fulfillment","idempotency key","durable state management","receipt recovery protocols"]}}