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 ashttps://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.
| Method | Where | Value |
|---|---|---|
dns_txt | A TXT record at _sentx-verify.<domain> | sentx-verify=<token> |
well_known | A file at https://<domain>/.well-known/sentx-verify.txt | One 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.
| Kind | Format | Where it works |
|---|---|---|
| Publishable | pk_xrp_live_ and 43 characters | In a browser, only from the app's registered origins. Needs at least one origin. |
| Secret | sk_xrp_live_ and 43 characters | On 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.
| Request | Credit |
|---|---|
| A valid secret key, from your server | Counts toward commission. |
| A session your server linked with sessions/confirm | Counts toward commission, with or without a key on the call. |
| A valid publishable key on a session that is not linked to your app | Counted for statistics only. |
| A session linked to another app | Nothing for you. The first app keeps it. |
| A call from a SentX page, with no key, or with an invalid key | Nothing. 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
| Tier | Limits 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.
| Route | Limit | Counted per |
|---|---|---|
| terms/challenge | 10 per 10 minutes | Wallet |
| terms/accept | 20 per 10 minutes | Wallet |
| apps/create | 10 per hour | Wallet |
| apps/mine | 60 per minute | Wallet |
| apps/update | 30 per 10 minutes | Wallet |
| domains/challenge | 20 per hour | Wallet |
| domains/verify | 10 per 10 minutes | Wallet |
| keys/create | 10 per hour | Wallet |
| keys/revoke | 30 per 10 minutes | Wallet |
| shadow-summary | 60 per minute | Wallet |
| sessions/confirm | 120 per minute | IP 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.
| Route | Auth | Use |
|---|---|---|
GET /partner/terms/current | None | The current Terms: version, SHA-256, text and summary. |
POST /partner/terms/challenge | Session | Start a Terms signing request. Optional appId. |
POST /partner/terms/accept | Session | challengeId, proofMethod and signedTxJson, or publicKey and signature. |
POST /partner/apps/create | Session | Register an app at the Starter tier. |
GET /partner/apps/mine | Session | Your apps, their keys (never the raw key) and your Terms acceptance. |
POST /partner/apps/update | Session | Edit app settings. A payout change also needs payoutProof. |
POST /partner/domains/challenge | Session | Start a domain check by DNS TXT or a well-known file. |
POST /partner/domains/verify | Session | Run the domain check. |
POST /partner/keys/create | Session | Create a publishable or secret key. The raw key is shown once. |
POST /partner/keys/revoke | Session | Revoke a key. |
POST /partner/sessions/confirm | Secret key in X-SentX-Key | Link a signed in user session to your app, server to server. |
GET /partner/shadow-summary | Session | Delayed 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.
| Code | Status | Meaning |
|---|---|---|
FEATURE_DISABLED | 503 | The partner program is not open yet. |
AUTH_REQUIRED | 401 | Sign in with your wallet first. |
AUTH_INVALID | 401 | The sign in has ended. Sign in again. |
AUTH_AMBIGUOUS | 400 | sessions/confirm got an x-auth-token header. Send the token in the body. |
ACCOUNT_NOT_ELIGIBLE | 403 | Sign in to xrp.sentx.io with this wallet once, then come back. |
ADMIN_FORBIDDEN | 403 | Admin wallets cannot own apps or keys. |
ACCOUNT_BANNED | 403 | This account cannot use the partner program. |
INPUT_INVALID | 400 | A field is missing, malformed or not allowed. field names it. |
TERMS_REQUIRED | 409 | Accept the current Terms first. |
CHALLENGE_NOT_FOUND | 404 | The signing request was used already or has ended. |
CHALLENGE_EXPIRED | 409 | The signing request has ended. Start a new one. |
TERMS_CHANGED | 409 | The Terms changed after the request was made. Read them and sign again. |
PROOF_REFUSED | 401 | The wallet signature does not match the request. |
APP_LIMIT_REACHED | 409 | A wallet can own at most 3 apps. |
APP_NOT_FOUND | 404 | No such app for this wallet. |
APP_NOT_ACTIVE | 409 | The app is suspended, so it cannot get new keys. |
PAYOUT_PROOF_REQUIRED | 409 | A payout address change needs a fresh wallet signature. |
DOMAIN_INVALID | 400 | Not a public domain you can verify. reason says why. |
DOMAIN_PROOF_LIMIT | 409 | The app already has 5 open domain checks. |
DOMAIN_PROOF_NOT_FOUND | 404 | No such domain check. |
DOMAIN_PROOF_EXPIRED | 409 | The 48 hours passed. Start a new check. |
DOMAIN_VERIFY_FAILED | 409 | The record or file was not found yet. reason says what failed. |
KEY_LIMIT_REACHED | 409 | The app already has 2 active keys of this kind. Revoke one first. |
KEY_ORIGIN_REQUIRED | 409 | Add an https origin before you create a publishable key. |
KEY_NETWORK_MISMATCH | 400 | Keys for that network are created on its own site. |
KEY_NOT_FOUND | 404 | No such key on this app. |
KEY_INVALID | 401 | The key is unknown, revoked, not a secret key, or for another network. |
KEY_ORIGIN_REFUSED | 403 | sessions/confirm came with browser headers. Call it from your server. |
SESSION_INVALID | 401 | The user session is not valid or has ended. |
SESSION_ALREADY_BOUND | 409 | The session is already linked to another app. |
RATE_LIMITED | 429 | Too many calls. Wait retryAfterSeconds. |
AUTH_UNAVAILABLE | 503 | The wallet could not be checked right now. Retry shortly. |
TX_PENDING | 503 | A change is not final yet. Retry shortly. |
PARTNER_UNAVAILABLE | 503 | The 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.