Build a Buyer App Cancellation Fee and Refund Explainer
Analyze post-order cancellation requests across open commerce network messages to determine applicable merchant restock fees and logistics penalties. Compile clear refund breakdown receipts for buyer app customer advocates.
What you are building
The core problem, expected build, and operating context for this challenge.
Analyze post-order cancellation requests across open commerce network messages to determine applicable merchant restock fees and logistics penalties. Compile clear refund breakdown receipts for buyer app customer advocates.
E-commerce customer service lead
Parse cancellation timestamps, fulfillment progress states, and cancellation policy terms from mock Beckn order files.
Determine whether the cancellation occurred before or after merchant dispatch or courier pickup.
Calculate refundable order amounts, non-refundable logistics allowances, and merchant restocking withholdings.
Generate an itemized refund breakdown receipt with clear policy rationales for buyer review.
Support agent portal showing order timeline milestones, cancellation window meters, and generated refund breakdowns.
Construct synthetic mock orders with progressive fulfillment stages and standardized cancellation policies in JSON. Starter examples below are synthetic. They are not downloaded records.
Beckn protocol specifications Adopts Beckn core post-order cancellation and order update specifications to process order stage metadata.
pydantic-ai, fastapi, pytest. Validates state machine transitions and numeric refund fee calculations with strict schema enforcement. Lightweight model supporting structured JSON schema outputs and mathematical deduction reasoning.
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
Enforces zero cancellation penalty for pre-dispatch cancellations within grace periods.
Applies documented logistics deductions when cancellation happens after courier pickup.
Outputs complete itemized financial summaries without executing actual payment gateway reversals.
```json [ { "input": { "order_id": "ORD-7719", "order_state": "Packed", "item_subtotal": 1500, "delivery_fee": 100, "cancellation_time_minutes_after_order": 15, "merchant_grace_period_minutes": 30 }, "expected_output": { "refund_eligible": true, "item_refund": 1500, "delivery_fee_refund": 100, "total_refund_inr": 1600, "cancellation_penalty": 0, "reason": "Cancelled within merchant grace period prior to carrier dispatch." } }, { "input": { "order_id": "ORD-7720", "order_state": "Out_For_Delivery", "item_subtotal": 2200, "delivery_fee": 150, "cancellation_time_minutes_after_order": 120, "merchant_grace_period_minutes": 30 }, "expected_output": { "refund_eligible": true, "item_refund": 2200, "delivery_fee_refund": 0, "total_refund_inr": 2200, "cancellation_penalty": 150, "reason": "Cancelled post-dispatch; courier fulfillment fee forfeited per policy." } } ] ```
Simulates refund rules and policy calculations without touching live payment rails or bank balances. Use mock external writes. Require human review before any real deployment.
Participation guide
Simulates refund rules and policy calculations without touching live payment rails or bank balances. Use mock external writes and human review.
How work is evaluated
Enforces zero cancellation penalty for pre-dispatch cancellations within grace periods. Applies documented logistics deductions when cancellation happens after courier pickup. Outputs complete itemized financial summaries without executing actual payment gateway reversals.
Runnable source, pinned dependencies, setup commands, working interface, example outputs, recorded demo, tests, and action logs.
Challenge datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Complete workflow
Parse cancellation timestamps, fulfillment progress states, and cancellation policy terms from mock Beckn order files. Determine whether the cancellation occurred before or after merchant dispatch or courier pickup. Calculate refundable order amounts, non-refundable logistics allowances, and merchant restocking withholdings. Generate an itemized refund breakdown receipt with clear policy rationales for buyer review.
Missing or incorrect.
Partly complete, with documented gaps.
Complete, with reproducible evidence.
Correctness and evidence
Enforces zero cancellation penalty for pre-dispatch cancellations within grace periods. Applies documented logistics deductions when cancellation happens after courier pickup. Outputs complete itemized financial summaries without executing actual payment gateway reversals.
Missing or incorrect.
Partly complete, with documented gaps.
Complete, with reproducible evidence.
Review interface
Support agent portal showing order timeline milestones, cancellation window meters, and generated refund breakdowns.
Missing or incorrect.
Partly complete, with documented gaps.
Complete, with reproducible evidence.
Safe execution
Simulates refund rules and policy calculations without touching live payment rails or bank balances.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Parse cancellation timestamps, fulfillment progress states, and cancellation policy terms from mock Beckn order files.
Determine whether the cancellation occurred before or after merchant dispatch or courier pickup.
Calculate refundable order amounts, non-refundable logistics allowances, and merchant restocking withholdings.
Generate an itemized refund breakdown receipt with clear policy rationales for buyer review.
Reference links and supporting material
Construct synthetic mock orders with progressive fulfillment stages and standardized cancellation policies in JSON. Supplied starter examples are synthetic, not source extracts.
Challenge setup
Configuration summary for this challenge.
Challenge input
Input details are not configured.
Pydantic AI
Typed Python agent framework.
Evaluated output
No output checks are configured.
- Parse cancellation timestamps, fulfillment progress states, and cancellation policy terms from mock Beckn o...
- Enforces zero cancellation penalty for pre-dispatch cancellations within grace periods. Applies documented...
- Support agent portal showing order timeline milestones, cancellation window meters, and generated refund br...
- 2 public reference cases
- 2 configured tools
Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.
View technical recipe
Configured tools
- Pydantic AI · Optional
- Pydantic AI · Optional
Evaluation contract
- Complete workflow · Weight 40
- Correctness and evidence · Weight 30
- Review interface · Weight 20
- Safe execution · Weight 10
Reference cases
- 2 public reference cases
Workflow tasks
No workflow tasks are configured.
Recipe freeze marker
No recipe freeze time is recorded.