ExamplesRaw HTTP (curl)

Raw HTTP Examples

Use XRPL Request from any language or tool — no SDK required.

Create a payload

curl -X POST https://xrplre.quest/api/v1/payloads \
  -H "Authorization: Bearer xrplr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "signAndSubmit",
    "transaction": {
      "TransactionType": "Payment",
      "Destination": "rN7n7otQDd6FczFgLdlqtyMVrn3HMfXoQT",
      "Amount": "1000000"
    },
    "options": { "expiresIn": 300 }
  }'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "signingUrl": "https://xrplre.quest/sign/550e8400-...",
  "status": "pending",
  "expiresAt": "2026-05-08T20:05:00.000Z"
}

Poll for result

curl https://xrplre.quest/api/v1/payloads/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer xrplr_live_..."

Cancel a payload

curl -X DELETE https://xrplre.quest/api/v1/payloads/550e8400-... \
  -H "Authorization: Bearer xrplr_live_..."

Register a webhook

curl -X POST https://xrplre.quest/api/v1/webhooks \
  -H "Authorization: Bearer xrplr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhook",
    "events": ["payload.signed", "payload.rejected", "payload.expired"]
  }'

Verify a webhook signature (Python)

import hmac, hashlib
 
def verify_signature(secret: str, raw_body: str, signature: str) -> bool:
    if not signature.startswith("sha256="):
        return False
    expected = "sha256=" + hmac.new(
        secret.encode(), raw_body.encode(), hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, signature)

Python requests example

import requests, time
 
API_KEY = "xrplr_live_..."
BASE = "https://xrplre.quest/api/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
 
# Create payload
r = requests.post(f"{BASE}/payloads", headers=HEADERS, json={
    "type": "signAndSubmit",
    "transaction": {
        "TransactionType": "Payment",
        "Destination": "rXXX...",
        "Amount": "1000000",
    },
})
payload = r.json()
print("Sign URL:", payload["signingUrl"])
 
# Poll
for _ in range(100):
    time.sleep(3)
    r = requests.get(f"{BASE}/payloads/{payload['uuid']}", headers=HEADERS)
    data = r.json()
    if data["status"] != "pending":
        print("Result:", data["status"], data.get("txHash"))
        break