Pay

Pay one external payment requirement within exact parent authority, through a payment method the payer holds, and read the paid resource back.

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

Overview

pay is the buyer contract. settle pays the exact requirement once, and readback performs one observation of that durable payment and the resource it paid for. The default pay runner composes both and requires immediate terminal readback, while durable callers compose settle once and re-enter readback through Runx's external-job scheduler.

The payment method is a connector the payer holds. Today that is wallet/evm: an x402 V2 challenge on an HTTPS resource, paid from the payer's EVM wallet in USDC on Base. Other methods join as connectors when they are implemented.

Runx Hosted owns challenge validation, authority attenuation and reservation, wallet credentials, payload signing, settlement recovery, finality, and the private ledger. The connector never sleeps or polls; durable continuation cadence belongs to Runx scheduling. pay never buys a runx paid skill: a paid skill is bought by running it, and the kernel asks its buyer for that purchase itself.

In the manual

Runners

  • pay
  • readback
  • settle

Declared by its execution profile. Read the profile

SKILL.md

Pay

pay is the buyer contract. settle pays the exact requirement once, and readback performs one observation of that durable payment and the resource it paid for. The default pay runner composes both and requires immediate terminal readback, while durable callers compose settle once and re-enter readback through Runx's external-job scheduler.

The payment method is a connector the payer holds. Today that is wallet/evm: an x402 V2 challenge on an HTTPS resource, paid from the payer's EVM wallet in USDC on Base. Other methods join as connectors when they are implemented.

Runx Hosted owns challenge validation, authority attenuation and reservation, wallet credentials, payload signing, settlement recovery, finality, and the private ledger. The connector never sleeps or polls; durable continuation cadence belongs to Runx scheduling. pay never buys a runx paid skill: a paid skill is bought by running it, and the kernel asks its buyer for that purchase itself.

Operator guide

Use this skill for one exact HTTPS resource already named by a hosted wallet grant. The resource request carries bounded inline control data or artifact references; large documents and media never travel as oversized graph values. The hosted payer accepts external x402 V2 only, signs and stages the payload before the paid POST, and reuses those exact bytes after an uncertain response.

Stop on malformed or expired requirements, amount, currency, payee or resource drift, incomplete authority, missing approval, or inconsistent paid-resource readback. Never pass wallet keys, seed phrases, bearer tokens, or facilitator credentials in skill input. A 2xx response is not finality: a complete readback needs the transaction confirmed on chain and a 2xx answer from the resource. It never waits on the resource's own product state.

Use charge to take a payment as the seller, refund to reverse one, and settle-invoice when an invoice needs validating before it is paid.

Published execution profile

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

Runners
  • pay
  • readback
  • settle
Profile digestsha256:2e16b2f2f1daf5cabe151f24c2e9627442d4ce86c6391af4cb2e930f8725e192
skill: pay
version: "0.1.0"
catalog: { kind: graph, audience: operator, visibility: public, role: canonical, execution: execute, completion: provider_readback, approval: required, category: payments }
input_definitions:
  payment_signal:
    type: object
    required: true
    description: Exact x402 V2 resource request and expected settlement terms.
    schema:
      additionalProperties: false
      required: [resource, amount_minor]
      properties:
        resource:
          type: object
          additionalProperties: false
          required: [url, method, body]
          properties:
            url: { type: string, format: uri, maxLength: 2048 }
            method: { type: string, const: POST }
            body: {}
            headers:
              type: object
              additionalProperties: { type: string, maxLength: 4096 }
            timeout_ms: { type: integer, minimum: 1, maximum: 120000 }
            max_response_bytes: { type: integer, minimum: 1, maximum: 26214400 }
        amount_minor: { type: integer, minimum: 0, maximum: 9007199254740991 }
        pay_to: { type: string, pattern: '^0x[0-9a-fA-F]{40}$' }
  payment_authority:
    type: object
    required: true
    description: Exact USD maximum and counterparty authorized by the parent.
    schema:
      additionalProperties: false
      required: [term_id, currency, max_amount_minor, counterparty]
      properties:
        term_id: { type: string, minLength: 1, maxLength: 256 }
        currency: { type: string, const: USD }
        max_amount_minor: { type: integer, minimum: 0, maximum: 9007199254740991 }
        counterparty: { type: string, format: uri, maxLength: 2048 }
connectors:
  wallet/evm:
    operations: [payment.x402, payment.x402.read]
runners:
  pay:
    default: true
    inputs:
      payment_signal: { definition: payment_signal }
      parent_payment_authority: { definition: payment_authority }
      idempotency_seed: { type: string, required: true, description: Stable payment idempotency material, schema: { minLength: 16, maxLength: 500 } }
    result_from: [readback]
    steps:
      - id: settle
        skill: .
        runner: settle
        inputs:
          payment_signal: $input.payment_signal
          parent_payment_authority: $input.parent_payment_authority
          idempotency_seed: $input.idempotency_seed
      - id: readback
        skill: .
        runner: readback
        inputs:
          resource_url: $input.payment_signal.resource.url
          payment_ref: $steps.settle.provider_operation.result.payment_ref
      - id: verify
        inputs:
          readback: $steps.readback.provider_operation.result
        tool: { module: readback.mjs, export: requireCompleteReadback, timeout_seconds: 5 }
        outputs: { verified: object }

  settle:
    inputs:
      payment_signal: { definition: payment_signal }
      parent_payment_authority: { definition: payment_authority }
      idempotency_seed: { type: string, required: true, description: Stable payment idempotency material, schema: { minLength: 16, maxLength: 500 } }
    examples:
      - payment_signal:
          resource:
            url: https://vendor.example/v1/invocations
            method: POST
            body: { offer_id: document-ocr, input: { artifact_ref: "runx:artifact:document-1" } }
            max_response_bytes: 26214400
          amount_minor: 25
          pay_to: "0x0000000000000000000000000000000000000002"
        parent_payment_authority:
          term_id: document-ocr-purchase-1
          currency: USD
          max_amount_minor: 25
          counterparty: https://vendor.example/v1/invocations
        idempotency_seed: document-ocr-purchase-0001
    result_from: [pay]
    steps:
      - id: pay
        operation: wallet/evm/payment.x402
        idempotency_key: $input.idempotency_seed
        approval:
          reason: Approve paying this exact x402 challenge.
          type: x402_payment
        amount: { units: $input.payment_signal.amount_minor, unit: $input.parent_payment_authority.currency }
        result_fields: [payment_ref, challenge_id, amount_minor, currency, status, transaction, network, payer, pay_to, invocation_id, payment_required_digest, payment_response_digest]
        input: { payment_signal: $input.payment_signal, parent_payment_authority: $input.parent_payment_authority }
  readback:
    inputs:
      resource_url:
        type: string
        required: true
        description: Exact HTTPS resource URL used for settlement.
        schema: { format: uri, maxLength: 2048 }
      payment_ref:
        type: string
        required: true
        description: Durable payment reference returned by the settle runner.
        schema: { minLength: 1, maxLength: 300 }
    result_from: [readback]
    steps:
      - id: prepare
        inputs: { payment_ref: $input.payment_ref, resource_url: $input.resource_url }
        tool: { module: readback.mjs, export: prepareReadback, timeout_seconds: 5 }
        outputs: { readback_request: object, expected_result: object }
      - id: readback
        operation: wallet/evm/payment.x402.read
        result_fields: [payment_ref, challenge_id, amount_minor, currency, status, transaction, network, payer, pay_to, invocation_id, payment_required_digest, payment_response_digest, resource_status, resource_result, readback_status]
        optional_result_fields: [resource_state, finality, block_number]
        ephemeral_result_paths: [/resource_result/resource_access]
        input: $steps.prepare.readback_request
        expected_result: $steps.prepare.expected_result

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

Published package and test evidence.

The latest recorded test covers an earlier version, 0.1.4. It does not establish a result for this version.

Test result

Harness resultAn earlier version was tested
Tested version0.1.4Not this page’s version, sha-56d0719d70e1
Recorded result5 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded

Package identity

Published revisionsha-56d0719d70e1
Content digestsha256:9e22b8c12b620ad33f4eedf8b1f0817b44ef854c4bce6ec9f07c2506844eebd2
SKILL.md digestsha256:daae94e450c447cb54bfc95cdd13f883ee10ea6c237f7191381be9708319f0ec
Execution profile digestsha256:2e16b2f2f1daf5cabe151f24c2e9627442d4ce86c6391af4cb2e930f8725e192
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 16 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.4Content digest sha256:ebb0e47a50c2b730b5008ad8b0adfd9a720a0bccf4de17d5195925b16c6eaf2e
  2. sha-e0878a3da267Content digest sha256:e0878a3da2673cf12298443b85c886cf9bd3434a1543cee11d111e9cb8ea1138
  3. sha-56d0719d70e1ViewingContent digest sha256:9e22b8c12b620ad33f4eedf8b1f0817b44ef854c4bce6ec9f07c2506844eebd2