Refund

Refund one original Stripe, PayPal or x402 merchant payment with exact native approval and independently checked settlement.

You’re reading version 0.7.2. Go to the current version

Overview

Use this when you are the merchant reversing all or part of a confirmed payment. Choose its original connector and account: Stripe, PayPal or Coinbase CDP for x402. A buyer paying a merchant uses pay; collecting a payment belongs to charge. A refund never changes processor to work around a failed readback.

Inspect runx connector inspect <connector> and use the refund operation's input_schema to construct request. Supply original account/payment identity, exact amount and currency, and a stable caller-owned idempotency_seed. PayPal also requires an explicit API host, canonical decimal precision and the original refundable capture status. Its sandbox host requires a matching sandbox app. Never put provider keys, wallet keys, card data or tokens in these inputs.

In the manual

Runner

  • refund

Declared by its execution profile. Read the profile

SKILL.md

Refund

Use this when you are the merchant reversing all or part of a confirmed payment. Choose its original connector and account: Stripe, PayPal or Coinbase CDP for x402. A buyer paying a merchant uses pay; collecting a payment belongs to charge. A refund never changes processor to work around a failed readback.

Inspect runx connector inspect <connector> and use the refund operation's input_schema to construct request. Supply original account/payment identity, exact amount and currency, and a stable caller-owned idempotency_seed. PayPal also requires an explicit API host, canonical decimal precision and the original refundable capture status. Its sandbox host requires a matching sandbox app. Never put provider keys, wallet keys, card data or tokens in these inputs.

Confirm the original relationship

Native admission derives the outgoing amount from the exact provider request before budgeting and approval. There is no rounding or FX conversion. A USD limit refuses a currency it cannot count. The provider reads the original payment on its account and atomically enforces the remaining refundable amount, including prior or concurrent refunds. Local and hosted credential custody use the same declared connector contract.

Stripe independently confirms the refund against the original PaymentIntent and currency. PayPal independently confirms the original capture and exact refund amount, currency and complete capture relationship. Coinbase CDP retains its original settlement evidence and separate refund readback. Only confirmed succeeded, COMPLETED or x402 settled evidence completes the respective lane. The result is that provider's bounded native packet, not a fabricated universal payment record.

Unknown and pending outcomes

A provider acknowledgement or HTTP success is not a completed refund. Stop on unknown payment, wrong account/currency, excess remaining amount, denied approval, pending/refused refund or unavailable readback. Preserve the original provider reference, request key and native receipt. Resume the original effect at readback; do not submit a second refund under another key. An unknown write without an acknowledgement needs reconciliation, not a new financial action.

A composed caller supplies the same original collection evidence and key. This skill does not collect again, replace the original payment, send a customer message or update a ledger on the caller's behalf.

Published execution profile

The execution profile published with 0.7.2, shown as its exact bytes.

Runner
  • refund
Profile digestsha256:deda878c2392dee1d8b8d40a7dd36e455533a6354c24018acfd0f89955e74a3f
skill: refund
version: "0.7.2"
catalog:
  kind: graph
  audience: operator
  visibility: public
  role: canonical
  execution: execute
  completion: provider_readback
  approval: required
  category: payments
connectors:
  stripe:
    operations:
      - payment.stripe.refund
  paypal:
    operations:
      - payment.paypal.refund
  coinbase/cdp:
    operations:
      - payment.x402.merchant.refund
      - payment.x402.merchant.refund.read
runners:
  refund:
    default: true
    description: Refund one original confirmed payment through its original merchant connector and
      independently confirm the exact refund.
    inputs:
      connector:
        type: string
        required: true
        description: Original payment connector; never choose another rail when reconciliation is uncertain.
        schema:
          enum:
            - stripe
            - paypal
            - coinbase/cdp
      request:
        type: json
        required: true
        description: Exact public arguments from the original connector refund operation input_schema.
          Inspect that connector; preserve original account, payment, amount and currency. No
          credentials.
      idempotency_seed:
        type: string
        required: true
        description: Stable refund idempotency material.
        schema:
          minLength: 16
          maxLength: 200
    examples:
      - connector: stripe
        request:
          account_id: acct_northstar
          payment_id: pi_northstar
          amount_minor: 100
          currency: usd
        idempotency_seed: northstar-refund-42
      - connector: paypal
        request:
          api_host: api-m.sandbox.paypal.com
          account_id: YXZY75W2GKDQE
          payment_id: CAPTURE42
          amount_decimal: "1.00"
          currency: USD
          precision: 2
          original_status: COMPLETED
        idempotency_seed: northstar-refund-42
      - connector: coinbase/cdp
        request:
          resource: https://seller.example/v1/reports/launch
          payment_id: x402pay_test_001
          amount_minor: 125
          currency: USD
          reason: The report was not delivered.
        idempotency_seed: northstar-refund-42
    result_from:
      - stripe
      - paypal
      - readback
    steps:
      - id: stripe
        when:
          value: $input.connector
          equals: stripe
        operation: stripe/payment.stripe.refund
        input: $input.request
        idempotency_key: $input.idempotency_seed
        approval:
          type: payment_refund
          reason: Approve this exact refund against the original merchant payment.
        result_fields:
          - refund_id
          - payment_id
          - amount_minor
          - currency
          - status
        expected_result:
          status: succeeded
      - id: paypal
        when:
          value: $input.connector
          equals: paypal
        operation: paypal/payment.paypal.refund
        input: $input.request
        idempotency_key: $input.idempotency_seed
        approval:
          type: payment_refund
          reason: Approve this exact refund against the original merchant capture.
        result_fields:
          - refund_id
          - amount_decimal
          - currency
          - status
          - relationships
        expected_result:
          status: COMPLETED
      - 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.request.amount_minor
          unit: $input.request.currency
        result_fields:
          - refund_id
          - payment_id
          - resource
          - amount_minor
          - currency
          - status
          - refund_settlement_id
          - payer
          - pay_to
          - network
          - settled_at
        input: $input.request
        when:
          value: $input.connector
          equals: coinbase/cdp
      - id: readback
        operation: coinbase/cdp/payment.x402.merchant.refund.read
        result_fields:
          - refund_id
          - payment_id
          - resource
          - amount_minor
          - currency
          - status
          - refund_settlement_id
          - payer
          - pay_to
          - network
          - settled_at
        input:
          resource: $input.request.resource
          refund_id: $steps.refund.provider_operation.result.refund_id
        expected_result:
          refund_id: $steps.refund.provider_operation.result.refund_id
          payment_id: $input.request.payment_id
          resource: $input.request.resource
          amount_minor: $input.request.amount_minor
          currency: $input.request.currency
          status: settled
        when:
          value: $input.connector
          equals: coinbase/cdp
harness:
  files:
    - fixtures/support/composed.graph
  cases: []

Published package and test evidence.

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

Test result

Harness resultPassed
Tested version0.7.2
Recorded result7 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded
Test recordOpen the recorded run
Inspect receipt referencessha256:aebe738c0ccb474ad543e8f30f351ecd2d85b4af05490a404c30f3470a6f1d4fsha256:4d7b3e212d277632d0d539b2552b38e3a74ee3055ff5806ddb8911395c4ba50csha256:da05679b56cca1117bb7669daafd6671d78013c61456bff9f11ffadcf6fe6e3esha256:d4ef05f98cc52e1193d3f84effb4c02865427563384d5933e2651ffdf56f76fasha256:b99a99140c9d52b4fefd64e5bb84d50f695bc54c7a9b71c1d564f14515867a07sha256:ab959640bcfcc384024f5bab53059146009545bf513f05f2ae112a3ffc49f6f6sha256:423b6d46acee01ddd51f3f5538c5698539153135b241eb30343ee40174b7ef7c

Package identity

Published revision0.7.2
Content digestsha256:c462f7d07de367b3f4337d6d5e964f089db5b0aa46acf02d7cbd25930d483cb5
SKILL.md digestsha256:eaf626cd2b5144283a028e0ed867f2f2f1f329df1da503856983d35256ec8330
Execution profile digestsha256:deda878c2392dee1d8b8d40a7dd36e455533a6354c24018acfd0f89955e74a3f
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 25 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.7.2ViewingContent digest sha256:c462f7d07de367b3f4337d6d5e964f089db5b0aa46acf02d7cbd25930d483cb5
  2. sha-fe8f81604a61Content digest sha256:282f0d70c078176ed0f8093530b20d95eb404182548dfb62bb6070885ff17e4a