SentX XRPL

Partner integration guide

How an app, wallet, bot or platform joins the SentX partner program on the XRP Ledger: the rules, the five setup steps, how SentX credits the trades your app brings, and every partner route and error code.

Who can join

The program is for real products used by many different people: apps, wallets, bots, games, launchpads, analytics tools and widgets. You set everything up yourself in the Partner Hub.

  • No self dealing. Trades, offers, listings and mints between wallets you own or control earn nothing. That includes wallets of your staff, your family and anyone acting for you. A person cannot register an app to discount their own trades.
  • Same price for buyers. A buyer who comes through your app pays exactly what they would pay on xrp.sentx.io. No hidden markup.
  • No rebates. You may not pass any part of your commission back to users as cashback or a reward for trading.
  • No fake activity. Wash trades, fake users and bots posing as people are not allowed.
  • Users keep their keys. Every transaction is signed by the user in their own wallet. Your app never asks for, stores or handles a seed, secret key or wallet PIN.

The wallet that owns the app must have signed in to xrp.sentx.io once. Admin wallets cannot own partner apps, and one wallet can own up to 3 apps. The full text and its SHA-256 are served by GET /partner/terms/current.

Set up in five steps

Each step below is one panel of the Partner Hub. Every owner route needs the wallet session in x-auth-token.

1. Accept the Partner Terms with your wallet

POST /partner/terms/challenge answers a signing request that lasts 10 minutes. Your wallet signs it as an AccountSet with Sequence: 0 and Fee: "0", carrying the challenge in a memo of type sentx-partner-terms-v1. A transaction with Sequence 0 can never be submitted to the ledger, so it costs nothing and moves nothing. Send the signed JSON to POST /partner/terms/accept with proofMethod: "walletconnect", or a key signature with proofMethod: "keypair". Each challenge works once.

2. Register your app and edit its settings

POST /partner/apps/create takes name, kind (browser, server or both), category and optionally websiteUrl, origins, declaredAccounts and payoutAddress. A new app starts in review at the Starter tier. Change it later with POST /partner/apps/update (Edit app settings in the hub).

  • origins: up to 10 exact https origins such as https://app.example.com. Publishable keys work only from these.
  • websiteUrl: your https website, shown in review.
  • declaredAccounts: up to 20 XRPL addresses you own or control. Trades from them never count.
  • payoutAddress: changing it needs a fresh wallet signature and takes effect after 7 days.

3. Prove you own your domain

POST /partner/domains/challenge with appId, domain and method answers a token that works for 48 hours. Publish it one of two ways, then call POST /partner/domains/verify with appId and proofId.

MethodWhereValue
dns_txtA TXT record at _sentx-verify.<domain>sentx-verify=<token>
well_knownA file at https://<domain>/.well-known/sentx-verify.txtOne line: sentx-verify=<token>

Send the host name in lower case with no trailing dot. IP addresses, local names, sentx.io and free hosting subdomains cannot be verified. The file check never follows a redirect, waits at most 5 seconds and reads at most 4 KB. An app can have 5 open checks at once.

4. Create your keys

POST /partner/keys/create with appId and kind answers the raw key once. SentX keeps only its SHA-256, prefix and last 4 characters, so copy it then. Revoke with POST /partner/keys/revoke; a revoked key stops working within 60 seconds.

KindFormatWhere it works
Publishablepk_xrp_live_ and 43 charactersIn a browser, only from the app's registered origins. Needs at least one origin.
Secretsk_xrp_live_ and 43 charactersOn your server only, with no Origin header. Never ship it to a browser.

Each app can hold 2 active keys of each kind per network, so you can rotate without downtime. Testnet keys use _test_ and are created on the testnet site.

5. Link each user session from your server

When a user signs in through your app, your server sends their session token to POST /partner/sessions/confirm with your secret key in X-SentX-Key and the body { authToken }. That links the session to your app. The first app to link a session keeps it: a second app gets 409 SESSION_ALREADY_BOUND. Send no x-auth-token header and no browser headers on this call.

How SentX credits your app

SentX records credit when a trade is recorded, not when it is prepared: the call that records a listing, sale, offer, counter offer, collection offer or launchpad sale also records which app brought it. Each one is credited once, to the first app.

RequestCredit
A valid secret key, from your serverCounts toward commission.
A session your server linked with sessions/confirmCounts toward commission, with or without a key on the call.
A valid publishable key on a session that is not linked to your appCounted for statistics only.
A session linked to another appNothing for you. The first app keeps it.
A call from a SentX page, with no key, or with an invalid keyNothing. If it continues something your app started, that credit is voided.

What never counts

  • Trades with yourself or between your declared accounts.
  • Calls made from xrp.sentx.io itself, even with your key attached.
  • Apps that are suspended or closed: their keys stop working.
  • Wash trades, fake users and repeated activity. SentX reviews activity before every payout and can hold or take back commission earned against the Terms.

Phase 0: shadow mode

Nothing is paid yet. GET /partner/shadow-summary?appId=<id> answers totalReceipts, eligibleShadowCount and excludedShadowCount for activity older than 7 days only. It is a preview of attribution, not a payout statement, and 0 XRP is payable in this phase. Starter apps earn 0% while SentX reviews them.

Phase 1: payouts

  • Commission is counted per calendar month and paid in XRP to the app's payout address after a 30 day hold.
  • SentX keeps 15 percent of each payout as a reserve for 180 days, then releases it if nothing was reversed.
  • Before you receive more than 250 XRP in total, SentX asks for basic business details. Every payout address and app owner is screened against sanctions lists.
  • The rates for each tier are shown in the Partner Hub. SentX gives at least 30 days notice before the Terms change.

Key tiers and limits

TierLimits on trading calls
Starter (approved = 0)Every new app. Its keys keep the same per IP limits as any caller.
Approved (approved = 1)Set by SentX after review. Secret key calls get their own ceilings for transaction prepares per minute, reservations per hour and sign ins per 10 seconds.

The partner routes have their own windows. A refusal is 429 RATE_LIMITED with retryAfterSeconds.

RouteLimitCounted per
terms/challenge10 per 10 minutesWallet
terms/accept20 per 10 minutesWallet
apps/create10 per hourWallet
apps/mine60 per minuteWallet
apps/update30 per 10 minutesWallet
domains/challenge20 per hourWallet
domains/verify10 per 10 minutesWallet
keys/create10 per hourWallet
keys/revoke30 per 10 minutesWallet
shadow-summary60 per minuteWallet
sessions/confirm120 per minuteIP address

Unknown or failed key lookups are limited to 30 a minute per IP address.

Partner routes

Every route is under https://xrp-api.sentx.io/partner. Owner routes need x-auth-token; sessions/confirm needs a secret key instead.

RouteAuthUse
GET /partner/terms/currentNoneThe current Terms: version, SHA-256, text and summary.
POST /partner/terms/challengeSessionStart a Terms signing request. Optional appId.
POST /partner/terms/acceptSessionchallengeId, proofMethod and signedTxJson, or publicKey and signature.
POST /partner/apps/createSessionRegister an app at the Starter tier.
GET /partner/apps/mineSessionYour apps, their keys (never the raw key) and your Terms acceptance.
POST /partner/apps/updateSessionEdit app settings. A payout change also needs payoutProof.
POST /partner/domains/challengeSessionStart a domain check by DNS TXT or a well-known file.
POST /partner/domains/verifySessionRun the domain check.
POST /partner/keys/createSessionCreate a publishable or secret key. The raw key is shown once.
POST /partner/keys/revokeSessionRevoke a key.
POST /partner/sessions/confirmSecret key in X-SentX-KeyLink a signed in user session to your app, server to server.
GET /partner/shadow-summarySessionDelayed counts of the activity credited to your app.

An app another wallet owns answers exactly like a missing one. Every answer is sent with Cache-Control: no-store except terms/current.

Error codes

Refusals are { success: false, errorCode, retryable, apimessage }. Retry only when retryable is true.

CodeStatusMeaning
FEATURE_DISABLED503The partner program is not open yet.
AUTH_REQUIRED401Sign in with your wallet first.
AUTH_INVALID401The sign in has ended. Sign in again.
AUTH_AMBIGUOUS400sessions/confirm got an x-auth-token header. Send the token in the body.
ACCOUNT_NOT_ELIGIBLE403Sign in to xrp.sentx.io with this wallet once, then come back.
ADMIN_FORBIDDEN403Admin wallets cannot own apps or keys.
ACCOUNT_BANNED403This account cannot use the partner program.
INPUT_INVALID400A field is missing, malformed or not allowed. field names it.
TERMS_REQUIRED409Accept the current Terms first.
CHALLENGE_NOT_FOUND404The signing request was used already or has ended.
CHALLENGE_EXPIRED409The signing request has ended. Start a new one.
TERMS_CHANGED409The Terms changed after the request was made. Read them and sign again.
PROOF_REFUSED401The wallet signature does not match the request.
APP_LIMIT_REACHED409A wallet can own at most 3 apps.
APP_NOT_FOUND404No such app for this wallet.
APP_NOT_ACTIVE409The app is suspended, so it cannot get new keys.
PAYOUT_PROOF_REQUIRED409A payout address change needs a fresh wallet signature.
DOMAIN_INVALID400Not a public domain you can verify. reason says why.
DOMAIN_PROOF_LIMIT409The app already has 5 open domain checks.
DOMAIN_PROOF_NOT_FOUND404No such domain check.
DOMAIN_PROOF_EXPIRED409The 48 hours passed. Start a new check.
DOMAIN_VERIFY_FAILED409The record or file was not found yet. reason says what failed.
KEY_LIMIT_REACHED409The app already has 2 active keys of this kind. Revoke one first.
KEY_ORIGIN_REQUIRED409Add an https origin before you create a publishable key.
KEY_NETWORK_MISMATCH400Keys for that network are created on its own site.
KEY_NOT_FOUND404No such key on this app.
KEY_INVALID401The key is unknown, revoked, not a secret key, or for another network.
KEY_ORIGIN_REFUSED403sessions/confirm came with browser headers. Call it from your server.
SESSION_INVALID401The user session is not valid or has ended.
SESSION_ALREADY_BOUND409The session is already linked to another app.
RATE_LIMITED429Too many calls. Wait retryAfterSeconds.
AUTH_UNAVAILABLE503The wallet could not be checked right now. Retry shortly.
TX_PENDING503A change is not final yet. Retry shortly.
PARTNER_UNAVAILABLE503The program could not be reached. Retry shortly.

Link a session from your server

Node.js 20 or later. Keep the secret key in your server's environment, never in a browser bundle or a log line.

const SENTX_KEY = process.env.SENTX_SECRET_KEY; // sk_xrp_live_...

export async function linkSession(authToken) {
  const res = await fetch('https://xrp-api.sentx.io/partner/sessions/confirm', {
    method: 'POST',
    headers: {
      'content-type': 'application/json',
      'user-agent': 'MyNftApp/1.0',
      'x-sentx-key': SENTX_KEY,
    },
    body: JSON.stringify({ authToken }),
  });
  const answer = await res.json();
  if (answer.success) return answer.appId; // { success: true, bound: true, appId }
  if (answer.errorCode === 'SESSION_ALREADY_BOUND') return null; // another app linked it first
  if (answer.retryable) throw Object.assign(new Error(answer.errorCode), { retry: true });
  throw new Error(answer.errorCode);
}

Call it once per user sign in, right after the user's wallet session is created. Calling it again for the same session and app answers the same result.