Open app

API reference

Markdown

Submit a refund address

PUT/v2/orders/{id}/refund-address

Submit a refund address for an eligible order.

Authentication: Required: the order’s owner session in X-Session-ID.

#Parameters

Name In Type Required Description
id path string (pattern ^[A-Za-z0-9:_-]{1,128}$) Yes Public order identifier. Not a credential: every read still requires the owner session or the destination proof.

#Request body

  • refundAddress · string (max 256) · required — Refund destination. Its chain-specific validity is checked by the engine.

#Response

200 returns an object with:

  • ok · true · required
  • refundAddress · string · required

Errors use the standard error envelope: branch on code, never on the message.

#Example

curl
curl -X PUT 'https://api-beta.wagyu.xyz/v2/orders/<orderId>/refund-address' \
  -H 'x-session-id: <sessionId>' \
  -H 'content-type: application/json' \
  -d '{
    "refundAddress": "<address-on-the-deposit-chain>"
  }'
JavaScript
const res = await fetch('https://api-beta.wagyu.xyz/v2/orders/<orderId>/refund-address', {
  method: 'PUT',
  headers: {"content-type":"application/json","x-session-id":"<sessionId>"},
  body: JSON.stringify({
    "refundAddress": "<address-on-the-deposit-chain>"
  }),
});
const data = await res.json();
Python
import requests

res = requests.put('https://api-beta.wagyu.xyz/v2/orders/<orderId>/refund-address', headers={"x-session-id":"<sessionId>"}, json={
        "refundAddress": "<address-on-the-deposit-chain>"
    }, timeout=30)
data = res.json()

No response is captured for this route: calling it creates or changes a real order. The response fields above come from the live contract.

Tip: every page is also plain Markdown, and /llms.txt indexes them for AI tools.