Purchase links
A purchase link (buy link) is a URL on usethatapp.com that runs the entire hosted checkout for one price of your app: identity, payment via Stripe, tax, receipt — then returns the buyer to your app. UseThatApp is the merchant of record: it processes the payment, calculates and remits applicable tax, handles refunds and chargebacks, and appears on the buyer's card statement. You get payouts via Stripe.
URL anatomy
https://www.usethatapp.com/buy/{price_id}/?next=...&ref=...&email=...{price_id} is the opaque public price identifier (prefix prc_). Don't construct it — get it from the Pricing API, where every price also carries a ready-made buy_url you can use directly.
The SDK builds these links for you — purchase_url / purchaseUrl is a pure URL builder: no network call, no configuration needed (an empty price id raises Python ValueError / JavaScript UtaError):
Python
from usethatapp import purchase_url
purchase_url("<prc-price-id>",
next="https://yourapp.com/welcome",
ref="partner42",
email="buyer@example.com")JavaScript
import { purchaseUrl } from "usethatapp";
purchaseUrl("<prc-price-id>", {
next: "https://yourapp.com/welcome",
ref: "partner42",
email: "buyer@example.com",
});Query parameters
| Param | Meaning and validation |
|---|---|
next (optional) | Post-purchase return URL. Must be HTTPS on your app's registered domain (localhost / loopback allowed for development) — the same trust rule as OAuth redirect URIs. An invalid value shows the buyer a "misconfigured link" page at link-open time, so test your links. Omitted: the buyer returns to your app's registered Login URL, landing back in the app where OIDC signs them in with a live entitlement. |
ref (optional) | Affiliate code. Once the visitor has accepted optional cookies on usethatapp.com it sets the signed 60-day attribution cookie (last click wins); until they choose, the referral is held for that browser session only. Commissions accrue per the affiliate program. Affiliates append ?ref=CODE to your buy links, or you forward a landing-page ref onto the buy link yourself. Optional either way: a plain link bills at the default seller rate, an affiliate-referred sale bills at the platform rate (which funds the commission), and a ref naming the app's own seller is ignored — you never need your own code on your own links. |
email (optional) | Prefills the buyer's email on the first checkout page. |
What the buyer sees
- Identify. Email, country, and ZIP on one page. An email that matches an existing account is sent through normal sign-in (including MFA). A new email gets an account auto-created — no password, no verification wall in the purchase path.
- Pay. Card entry via Stripe.
- Confirm. A confirmation page, then the charge.
- Return. A success page (with a "resend receipt email" button), then the redirect to
nextor your Login URL. The license is created synchronously during checkout, so the entitlement is live the moment the buyer returns — no webhook lag, no polling.
The receipt email
The post-purchase email contains:
- the receipt,
- an email-verification link,
- a set-a-password link (for auto-created accounts), and
- a manage link for the subscription.
Already-licensed buyers
A buyer who already has an active license for your app and hits a buy link is never double-charged — they're recognized and sent straight back to your app.
Where buyers can purchase
Purchases are open to buyers in the United States, the European Union, Canada, Australia and the other countries offered at checkout. The buyer's country is enforced on both the declared tax address (country + postal code at identify) and the card's billing address at confirmation. UseThatApp is the merchant of record, so tax is calculated and remitted for you: EU buyers see VAT-inclusive prices, and an EU business can enter its VAT number at identify (or on its UseThatApp profile) to be invoiced net under the reverse charge.
Manage links
The companion to a buy link: the buyer's subscription-management page scoped to your app (upgrade, auto-renew, Stripe billing portal). client_id is your app's public OAuth client id from the dashboard's Integration page; next is validated the same way as above and becomes the "Back to your app" button.
https://www.usethatapp.com/manage/{client_id}/?next=https://yourapp.com/accountOr build it with the SDK — manage_url(next=…) / manageUrl({ next }) — also pure, needing only UTA_CLIENT_ID (Python raises UtaConfigError without it).
⚠ When a buy link returns 404
A buy link resolves only while four gates are open: your seller account is verified, the app is published, the product is active, and external sales is switched on for the app (it is on by default). Your app's manage page lists them as a readiness checklist. You can build and test everything else first: the walkthrough mode works for your developer account as soon as the link resolves.
Next steps
Get your price ids and ready-made buy URLs from the Pricing API, walk the end-to-end story in Sell from your own website, then test your purchase flow.
