Skip to content
Konstera
Capability catalogue
refundswrite

refunds.create

Create a refund

Issue a refund against an existing order. Not all connectors implement writes; check available() before calling.

Effect
write
Fanout
no
Cache TTL
none
Traits
none

Request arguments

Passed as the args parameter to ctx.capability.call("refunds.create", …).

FieldTypeRequiredDescription
amountnumberyes
reasonstringyes
orderIdstringyes
currencystringyes

Response

Returned by ctx.capability.call("refunds.create", …).

FieldTypeRequiredDescription
amountnumberno
statusstringyes
enum: ["pending","succeeded","failed"]
currencystringno
refundIdstringyes

Example call

From inside your agent's handle(). The kernel resolves refunds.create to the tenant's connector binding at invocation time.

response = await ctx.capability.call(
    "refunds.create",
    args={
        "amount": 0,
        "reason": "...",
        "orderId": "...",
        "currency": "...",
    },
)

See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.