Skip to main content
Challenge

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.

Workflow AutomationHosted by Vera
Challenge brief

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.

Rules

Participation guide

Simulates refund rules and policy calculations without touching live payment rails or bank balances. Use mock external writes and human review.

Delivery guide

How work is evaluated

Evaluation

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.

Submission format

Runnable source, pinned dependencies, setup commands, working interface, example outputs, recorded demo, tests, and action logs.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
4 scoring checks
Binary
1 pass or fail dimensions
Ordinal
3 scaled dimensions
Dimension 1

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.

Score scale
012
Score 0

Missing or incorrect.

Score 1

Partly complete, with documented gaps.

Score 2

Complete, with reproducible evidence.

Dimension 2

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.

Score scale
012
Score 0

Missing or incorrect.

Score 1

Partly complete, with documented gaps.

Score 2

Complete, with reproducible evidence.

Dimension 3

Review interface

Support agent portal showing order timeline milestones, cancellation window meters, and generated refund breakdowns.

Score scale
012
Score 0

Missing or incorrect.

Score 1

Partly complete, with documented gaps.

Score 2

Complete, with reproducible evidence.

Dimension 4

Safe execution

Simulates refund rules and policy calculations without touching live payment rails or bank balances.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

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.

Resources and assets

Reference links and supporting material

Dataset notes

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.

Evaluation checks
  • 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...
Configured evaluation evidence
  • 2 public reference cases
Configured runtime
  • 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

Action Space
  • Pydantic AI · Optional
Orchestration
  • 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.

Frequently Asked Questions about Build a Buyer App Cancellation Fee and Refund Explainer