XRPLink API Documentation

Generate cryptographically verified receipts for XRP payments on the Flare Network.

Contents Authentication Receipts Attestation Billing MCP Server Errors

Authentication

XRPLink uses API keys for the attestation API and JWT bearer tokens for account and billing endpoints. Create an account to get a free API key.

Create an account

POST/auth/signuppublic
Creates a user and returns a session token plus a free-tier API key.
curl -X POST https://xrp-link.com/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"yourpassword"}'

// Response
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "apiKey": "sk_live_..."
}

Log in

POST/auth/loginpublic
Returns a session token and your API key.
curl -X POST https://xrp-link.com/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"yourpassword"}'

Current user

GET/mebearer token
Returns your user info, plan tier, and API keys.
curl https://xrp-link.com/me \
  -H "Authorization: Bearer <your-token>"

Receipts

View a receipt

GET/receipt/:txHashpublic
Returns an HTML receipt page for any XRP transaction. No API key required. If the transaction is already attested, the full cryptographic receipt is shown; otherwise the XRP Ledger data is displayed with instructions to attest.
curl https://xrp-link.com/receipt/87AD359A0DB9E27260AAE29766DC858886C54DAC4733D43B1B72CBB90E29B95F

Attestation

Attesting a payment generates the on-chain cryptographic proof. This requires an API key with a paid or pro plan. Proofs are ready in ~90-180 seconds (FDC voting round).

Verify an XRP payment

POST/api/v1/verify/xrp-paymentAPI key
Submits a transaction hash for attestation. Returns an attestation ID and FDC round.
curl -X POST https://xrp-link.com/api/v1/verify/xrp-payment \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sk_live_..." \
  -d '{"txHash":"87AD359A0DB9E27260AAE29766DC858886C54DAC4733D43B1B72CBB90E29B95F"}'

// Response (HTTP 202)
{
  "id": "3f0c8e2a-...",
  "txHash": "87AD359A0DB9E27260AAE29766DC858886C54DAC4733D43B1B72CBB90E29B95F",
  "roundId": 1393372,
  "status": "pending"
}

Check attestation status

GET/api/v1/status/:idAPI key
Check the status of an attestation by UUID.
curl https://xrp-link.com/api/v1/status/3f0c8e2a-... \
  -H "X-API-Key: sk_live_..."

// Statuses: pending, ready, verified, failed, not_found

Look up by transaction

GET/api/v1/status-by-tx/:txHashAPI key
Find an attestation by the original XRP transaction hash.

Register a webhook

POST/api/v1/webhooksAPI key
Register a URL to receive attestation completion callbacks.
curl -X POST https://xrp-link.com/api/v1/webhooks \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sk_live_..." \
  -d '{"url":"https://your-app.com/hooks/xrp"}'

Billing

POST/billing/subscribebearer token
Create a Stripe Checkout session for a plan. Returns a redirect URL.
curl -X POST https://xrp-link.com/billing/subscribe \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-token>" \
  -d '{"tier":"paid"}'

// Response
{ "url": "https://checkout.stripe.com/c/pay/..." }
GET/billing/portalbearer token
Get a link to manage or cancel your subscription.

MCP Server

XRPLink exposes an MCP server so AI agents can verify payments directly. Connect via stdio or the HTTP endpoint.

ToolDescription
verify_xrp_paymentSubmit a txHash for attestation
get_attestation_statusCheck attestation by UUID
lookup_attestation_by_txFind attestation by txHash
get_attestation_by_roundList attestations by round ID
get_server_infoServer, network, and contract info
# stdio transport (local agents)
npm run start:mcp

# HTTP/SSE endpoint
curl https://xrp-link.com/mcp

Errors

Errors are returned as JSON with a machine-readable code and a human-readable message:

{
  "error": "INVALID_TX_HASH",
  "message": "Expected 64 hex characters for transaction hash",
  "suggestedAction": "Provide a valid XRP transaction hash..."
}
CodeMeaning
MISSING_API_KEYX-API-Key header missing
INVALID_API_KEYAPI key invalid or deactivated
RATE_LIMITEDPer-minute limit exceeded for your tier
INVALID_TX_HASHNot a valid 64-hex transaction hash
SUBMIT_FAILEDAttestation submission to FdcHub failed
NOT_FOUNDResource not found
FORBIDDENRequires a higher plan tier
AUTH_FAILEDInvalid email/password
MISSING_AUTHBearer token missing
INVALID_AUTHBearer token invalid or expired