Operator API

URnetwork API: Solana

Version 1.0.0 · 230 operations across 14 groups.OpenAPI spec ↗

URnetwork implements the UR protocol operator spec in full. UR protocol ↗

Solana

2 operations

POST/solana/payment-intent

Bearer authsolanaPaymentIntent

When paying for a subscription with Solana, we track the order through this intent. A legacy guest network (no sign-in method) is refused with error.code guest_sign_in_required (PurchaseError). Every other refusal carries its own code too: offer_unavailable, plan_unavailable or start_failed.

show schema
reference
string

A unique reference string to identify the payment intent added to the Solana transaction

plan
string

The plan. The PRICE is quoted by the server from the caller's regional tier. yearly_onboarding is the welcome offer (the tier's yearly price less 25%, crediting a year plus the 14-day trial) and is refused unless the caller's offer is redeemable.

enum: yearly, monthly, yearly_onboarding
storefront_country
string

ISO 3166-1 storefront country, when the app knows it (Solana keeps the estimate otherwise)

2 statuses · show schema
200
amount_usd
number
  • the amount the server quoted; the client must pay exactly this. It is the plan price plus a unique sub-cent suffix (0.000001 to 0.009999, in USDC's 6 decimals) that identifies a payment sent without the reference, so show and pay every decimal
tier
string
plan
string
regular_amount_usd
number

the plan's regular price (the full-year price for yearly_onboarding)

offer_applied
boolean
currency
string
recipient
string

the merchant address (base58) to pay; build the payment url from this, never a hardcoded address

spl_token_mint
string

the SPL token mint (base58) to pay in (USDC)

error
one of
one of
code
string

A stable code for the refusal, so a client can pick a localized message or flow. One of: guest_sign_in_required: the network is a legacy guest network with no sign-in method, so nothing could sign back in to a plan bought on it. Add a sign-in method (POST /auth/add-auth) first; the apps open their add-sign-in sheet. Store-verified purchases and webhooks are never refused this way. already_subscribed: the network already has an active Pro subscription; nothing was charged. plan_unavailable: the plan cannot be sold now (no price or product is configured for it). item_unavailable: the data pack cannot be sold now. offer_unavailable: the welcome offer is not, or no longer, redeemable by this network. checkout_unavailable: this deployment has no checkout configured. invalid_request: the request names an item, plan, provider, ui mode or reference the endpoint does not take (a client defect). invalid_email: the email address the code goes to does not look like one. network_name_required: a data purchase for a network by name came without the name. network_not_found: no network has the given name. rate_limited: too many attempts from this address; try again in a minute. start_failed: the payment could not be started (Stripe or the database failed); a retry may work. asset_unavailable: the coin is switched off or not configured, or cannot be quoted right now (rates missing, stale or too far apart, the node or the scanner behind, no free receive address, too many open invoices), or does not deliver balance codes. The UI says it is temporarily unavailable. quote_expired: the quote's time ran out with nothing received; /pay/crypto/requote gives a new one. underpaid: the invoice ended short, and an operator reviews it. gift_sales_closed: gift codes are not on sale now (/pay/gift/config enabled is false). invalid_quantity: the number of gifts is not between 1 and the most one order takes (/pay/gift/config max_quantity). invalid_recipients: delivery them needs exactly one recipient address per gift, each an email address. invalid_send_on: send_on is not a date from tomorrow to a year out in the buyer's timezone, or comes without a known one. message_too_long: the gift's note is over 240 characters or its signature over 40. gift_note_has_link: the gift's note or signature holds a link: a URL scheme (https://, any scheme://), mailto:, www., or a domain with a listed TLD (example.com, bit.ly, t.me/x). The exact rule is the server's model.GiftTextHasLink (GIFTOFPRIVACY.md §10.2), which the site mirrors. gift_daily_limit: with this order's recipients, the buyer's email (case-insensitive) would pass 20 friend emails in 24 hours: the recipients of its delivery them orders of the last 24 hours that are pending or paid. Delivery me has no daily limit beyond max_quantity cards per order. A pending order whose Gamma purchase was voided is not counted. payment_in_progress: an earlier gift's Gamma payment is still being processed (sent to the chain, or landed and being credited), so a new gift purchase with Gamma (/pay/gift/gamma-intent), or the cancel of that purchase (/pay/gift/gamma-cancel), must wait; try again in a few minutes. incorrect_cvc: a Stripe trial's card failed its CVC check when it was attached, so the trial did not start, no Pro was credited, and the card is never charged. Only the purchase report (/subscription/verify-stripe-checkout) answers it, with status invalid. The buyer checks the card details and tries again with a new payment sheet or checkout session. Absent from older servers; clients fall back to message for an absent or unknown code.

message
string
null
401
No body

POST/solana/payment-transaction

Bearer authsolanaPaymentTransaction

The unsigned USDC transfer that pays an open Solana Pay intent of the caller's network (from /solana/payment-intent, or from /pay/data/solana-intent for the caller's own network), for a browser wallet to sign and send through the Wallet Standard solana:signAndSendTransaction feature. A desktop browser hands the solana: payment url to an app, never to an extension wallet; with this the page needs no Solana library and no rpc endpoint of its own.

The transaction is a legacy message with two instructions: a Memo of the reference, then a TransferChecked of exactly the intent's quote (the amount_usd it was quoted, 6 decimals) of USDC from payer's associated USDC account to the merchant's, with the reference appended as a read-only account, the way a wallet builds it from the Solana Pay url. The Helius webhook credits it by reference. The merchant, the mint and the amount come from the server; payer is the fee payer and the only signer, and the transaction comes back unsigned. Its recent blockhash is good for about a minute, so build it when the buyer clicks. A client should check that the transaction pays only the recipient and the spl_token_mint the intent quoted, in the quoted amount, before handing it to the wallet.

An unknown, paid or expired intent, another network's intent, an address or reference that is not a Solana public key, or an unreachable rpc return error.message with a 200. Per-ip rate limited.

show schema
reference
string

the reference of an open Solana Pay intent of the caller's network

payer
string

the paying wallet's address (base58), as the wallet reported it

2 statuses · show schema
200
transaction
string
  • the unsigned transaction for the wallet to sign and send: base64 of its wire format, a legacy message
error
one of
one of
message
string
null
401
No body