Refund eligibility
Decide whether a refund request is in policy from a sealed charge receipt, a refund request, and a refund policy, emitting only a bounded refund proposal.
You’re reading version sha-24b11619c2e4. Go to the current version
Overview
Decide whether a requested refund is allowed by a sealed charge receipt and a
simple policy. The skill reads a charge receipt summary, a refund request, and a
policy, then emits a bounded refund_proposal only when the request is clearly
eligible. It never performs the reversal, calls a payment rail, signs a money
movement, or mutates external state.
In the manual
Runner
decide
Declared by its execution profile. Read the profile
SKILL.md
Refund Eligibility
Decide whether a requested refund is allowed by a sealed charge receipt and a
simple policy. The skill reads a charge receipt summary, a refund request, and a
policy, then emits a bounded refund_proposal only when the request is clearly
eligible. It never performs the reversal, calls a payment rail, signs a money
movement, or mutates external state.
When to use this skill
Use it before invoking a refund execution skill when support or finance needs a checkable decision packet. The packet explains the eligibility verdict, the remaining refundable amount, the idempotency key that a refund catalog skill can consume, and the exact reason when the request is refused.
When not to use this skill
Do not use it to move money, repair a receipt, override a policy, or invent a charge. If the receipt is unsealed, ambiguous, missing currency or amount, or outside the supported policy shape, the skill escalates instead of guessing.
Procedure
- Require
charge_receipt,refund_request, andpolicy. - Accept only charge receipts that expose
schema: runx.receipt.v1andstate: sealed. - Extract a charge reference from
id,receipt_ref, orcharge_ref. - Extract the original amount, already refunded amount, currency, and charge timestamp from explicit fields.
- Require
refund_request.amountto be positive and in the same units as the charge. - Compute the policy cap as
amount * policy.max_pct / 100, then subtract any already refunded amount. - Require the request to be inside
policy.window_days, measured from the charge timestamp torefund_request.requested_at,policy.now, or the current time. - Return
decision.eligible: trueplusrefund_proposalonly when every gate passes. - Return
decision.eligible: falseplusescalationand no proposal when a gate fails or the evidence is ambiguous.
Output
The runner emits runx.refund_eligibility.v1 with:
summary: short human-readable decision summary.decision:{ eligible, reason }.refund_proposal:{ amount, currency, charge_ref, idempotency_key, effect }only when eligible.refundable: original amount, already refunded amount, policy cap, and remaining refundable amount.escalation: human review lane and evidence gaps when not eligible or ambiguous.
Example
runx skill ./skills/refund-eligibility \
--input-json charge_receipt='{"schema":"runx.receipt.v1","id":"runx:receipt:charge-demo","state":"sealed","amount":10000,"currency":"USD","charged_at":"2026-06-01T00:00:00Z","refunded_amount":1000}' \
--input-json refund_request='{"amount":2500,"reason":"duplicate charge","requested_at":"2026-06-10T00:00:00Z"}' \
--input-json policy='{"max_pct":50,"window_days":30}' \
--jsonInputs
charge_receipt(required): sealedrunx.receipt.v1charge receipt or receipt summary with amount, currency, and charge time.refund_request(required): object withamount,reason, and optionalrequested_at.policy(required): object withmax_pct,window_days, and optionalnow.
Published execution profile
The execution profile published with sha-24b11619c2e4, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:c08988175d007e464443f5ed7150aea5445e5780fca134997a233cb72173d2ba |
skill: refund-eligibility
version: 0.1.0
catalog:
kind: skill
audience: public
visibility: public
role: canonical
category: payments
runners:
decide:
default: true
inputs:
charge_receipt:
type: json
required: true
description: Sealed charge receipt or receipt summary.
refund_request:
type: json
required: true
description: Requested refund amount, reason, and optional request time.
policy:
type: json
required: true
description: Refund policy with max_pct, window_days, and optional now.
steps:
- id: decide
tool:
command: node
args:
- run.mjs
inputs:
charge_receipt: $input.charge_receipt
refund_request: $input.refund_request
policy: $input.policy
artifacts:
wrap_as: refund_eligibility_decision
harness:
cases:
- name: in-policy-partial-refund-yields-proposal
inputs:
charge_receipt:
schema: runx.receipt.v1
id: runx:receipt:charge-demo-001
state: sealed
amount: 10000
currency: USD
charged_at: 2026-06-01T00:00:00Z
refunded_amount: 1000
refund_request:
amount: 2500
reason: duplicate charge
requested_at: 2026-06-10T00:00:00Z
policy:
max_pct: 50
window_days: 30
expect:
status: sealed
receipt:
schema: runx.receipt.v1
operator_journeys:
- mode: standalone
confusors:
- refund
- dispute-respond
request: Decide whether this refund request is in policy.
expected_outcome: Return only a bounded refund proposal from the charge receipt, request and policy.
- mode: composed
request: Continue this refund-eligibility work from evidence already gathered upstream.
expected_outcome: Return only a bounded refund proposal from the charge receipt, request and policy.
prior_evidence:
- The sealed charge receipt and refund request already supplied.
must_not_repeat:
- Do not issue the refund.
- name: excessive-amount-is-refused
inputs:
charge_receipt:
schema: runx.receipt.v1
id: runx:receipt:charge-demo-002
state: sealed
amount: 10000
currency: USD
charged_at: 2026-06-01T00:00:00Z
refunded_amount: 1000
refund_request:
amount: 9000
reason: buyer changed mind
requested_at: 2026-06-10T00:00:00Z
policy:
max_pct: 50
window_days: 30
expect:
status: failure
receipt:
schema: runx.receipt.v1
- name: unsealed-charge-escalates
inputs:
charge_receipt:
schema: runx.receipt.v1
id: runx:receipt:charge-demo-003
state: open
amount: 4000
currency: USD
charged_at: 2026-06-01T00:00:00Z
refund_request:
amount: 1000
reason: goodwill
requested_at: 2026-06-03T00:00:00Z
policy:
max_pct: 50
window_days: 30
expect:
status: failure
receipt:
schema: runx.receipt.v1
Published package and test evidence.
This exact version passed its recorded harness run: 3 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | sha-24b11619c2e4 |
| Recorded result | 3 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 3 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:173ec4009e346c33e5d03d987cd52bdcca9a37232f44db8af1e6c7159cc88444sha256:061781008d553c400314070f3f98c93ebc8acfa96b75ebec3e6aa3a2f3512ceesha256:8e0bdac02fabf6e39ac28729d983fa274dacf698f9b47f23247f40204613288dPackage identity
| Published revision | sha-24b11619c2e4 |
|---|---|
| Content digest | sha256:24b11619c2e4c841acab737975ea0782fc7153651d6cd5ebce85e673599f3a2d |
| SKILL.md digest | sha256:0c883cd3e66a76aa7c01cfc30b0b589eabb5e5cae42aa79c29ae41fbf6315cdb |
| Execution profile digest | sha256:c08988175d007e464443f5ed7150aea5445e5780fca134997a233cb72173d2ba |
| Publisher identity | Unverified publisher · zdfgu113 |
| Trust tier | CommunityPublished through the registry without publisher verification. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
sha-ff9efb921994Content digest sha256:ff9efb921994ce2cb7fdb2628b5eb2baf046e3fcd1bd170a5379a96a5fcfa103sha-3ec97836dafbContent digest sha256:3ec97836dafb774d9aa2b1839005b495297522990e981953ce4318e861ce506dsha-24b11619c2e4ViewingContent digest sha256:24b11619c2e4c841acab737975ea0782fc7153651d6cd5ebce85e673599f3a2dsha-c8bbdcf97796Content digest sha256:c8bbdcf977960eb09c22d8bf30433bf73e7dcc10997f75af15bdd6d878b0ce85