Refund

Refund all or part of one settled payment on its original rail, with approval, idempotency, and readback.

You’re reading version sha-fe8f81604a61. Go to the current version

Overview

refund is the reversal contract. It returns all or part of one settled payment to its payer, on the rail the payment was settled on, then requires a readback of the same refund, settled for that amount against that payment, before the run closes.

The payments charge settles are x402, through Coinbase CDP (coinbase/cdp), so their refunds are too. Runx Hosted resolves the original settlement, accounts for prior refunds, holds the CDP credential, broadcasts the reversal, and carries an ambiguous outcome to a terminal one. The amount the refund moves counts against the run's authority like any payment. OSS implements none of the rail; it governs the provider mutation and seals the returned evidence.

In the manual

Runner

  • refund

Declared by its execution profile. Read the profile

SKILL.md

Refund

refund is the reversal contract. It returns all or part of one settled payment to its payer, on the rail the payment was settled on, then requires a readback of the same refund, settled for that amount against that payment, before the run closes.

The payments charge settles are x402, through Coinbase CDP (coinbase/cdp), so their refunds are too. Runx Hosted resolves the original settlement, accounts for prior refunds, holds the CDP credential, broadcasts the reversal, and carries an ambiguous outcome to a terminal one. The amount the refund moves counts against the run's authority like any payment. OSS implements none of the rail; it governs the provider mutation and seals the returned evidence.

Operator guide

Use this skill only for a payment charge settled. A hosted coinbase/cdp grant is required. Pass the paid resource, the payment's reference, the amount and currency, a reason, and a stable idempotency seed. Stop on an unknown payment, an amount over what remains refundable, currency drift, reused idempotency, or unavailable readback. Never accept raw provider credentials or claim a refund from a request acknowledgement alone.

Published execution profile

The execution profile published with sha-fe8f81604a61, shown as its exact bytes.

Runner
  • refund
Profile digestsha256:3e3d8a575d2c2212a6e35cd796a1373be8e7bb93d42e09c6c6b668cecae3863c
skill: refund
version: "0.7.0"
catalog: { kind: graph, audience: operator, visibility: public, role: canonical, execution: execute, completion: provider_readback, approval: required, category: payments }
connectors:
  coinbase/cdp:
    operations: [payment.x402.merchant.refund, payment.x402.merchant.refund.read]
runners:
  refund:
    default: true
    inputs:
      resource: { type: string, required: true, description: The HTTPS resource the original payment bought., schema: { format: uri, pattern: '^https://', maxLength: 2000 } }
      payment_ref: { type: string, required: true, description: The settled payment's reference from its charge., schema: { minLength: 1, maxLength: 80 } }
      amount_minor: { type: integer, required: true, description: "Refund amount in minor units, at most what was paid.", schema: { minimum: 1, maximum: 9007199254740991 } }
      currency: { type: string, required: true, description: ISO 4217 code of the original payment., schema: { pattern: '^[A-Z]{3}$' } }
      reason: { type: string, required: true, description: Why the payment is refunded., schema: { minLength: 1, maxLength: 500 } }
      idempotency_seed: { type: string, required: true, description: Stable refund idempotency material., schema: { minLength: 16, maxLength: 200 } }
    result_from: [readback]
    steps:
      - id: refund
        operation: coinbase/cdp/payment.x402.merchant.refund
        idempotency_key: $input.idempotency_seed
        approval:
          reason: Approve this exact refund against the original payment.
          type: payment_refund
        amount: { units: $input.amount_minor, unit: $input.currency }
        result_fields: [refund_ref, payment_ref, resource, amount_minor, currency, status, refund_settlement_ref, payer, pay_to, network, settled_at]
        input: { resource: $input.resource, payment_ref: $input.payment_ref, amount_minor: $input.amount_minor, currency: $input.currency, reason: $input.reason }
      - id: readback
        operation: coinbase/cdp/payment.x402.merchant.refund.read
        result_fields: [refund_ref, payment_ref, resource, amount_minor, currency, status, refund_settlement_ref, payer, pay_to, network, settled_at]
        input: { resource: $input.resource, refund_ref: $steps.refund.provider_operation.result.refund_ref }
        expected_result:
          refund_ref: $steps.refund.provider_operation.result.refund_ref
          payment_ref: $input.payment_ref
          resource: $input.resource
          amount_minor: $input.amount_minor
          currency: $input.currency
          status: settled

harness:
  files: [fixtures/support/composed.graph]
  cases: []

Published package and test evidence.

This exact version passed its recorded harness run: 2 checks passed · 0 failed.

Test result

Harness resultPassed
Tested versionsha-fe8f81604a61
Recorded result2 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Test recordOpen the recorded run
Inspect receipt referencessha256:8093aec99eeb9b6d9fd85c936b965679484d528d9c935cc5fb04ab7a1ceb44b9sha256:c32a50fe4beb74e819ad3b1288c3e9dfe964a7ec3b1b499dc2f87ade65e8cd71

Package identity

Published revisionsha-fe8f81604a61
Content digestsha256:282f0d70c078176ed0f8093530b20d95eb404182548dfb62bb6070885ff17e4a
SKILL.md digestsha256:35facc8c0e2f960985913c9d6146bc121c61be1771ff6c7bbca3cc94e9bc4d1b
Execution profile digestsha256:3e3d8a575d2c2212a6e35cd796a1373be8e7bb93d42e09c6c6b668cecae3863c
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.7.2Content digest sha256:c462f7d07de367b3f4337d6d5e964f089db5b0aa46acf02d7cbd25930d483cb5
  2. sha-fe8f81604a61ViewingContent digest sha256:282f0d70c078176ed0f8093530b20d95eb404182548dfb62bb6070885ff17e4a