Disclosure: Published by AffinityRx, a compounding pharmacy ordering platform. AffinityRx is not a pharmacy.
The short answer
On AffinityRx, a telehealth platform keeps all of its practices under its own account: it creates each practice, turns on Live orders for each one, and pays for every Live order its practices send. The platform pays with a card or bank account on file, with account credit that covers the full order, or by invoice when Affinity sets that up.
The platform sends every order with one API request, POST /v1/orders, naming the practice with practiceId. Every order event goes to the platform's webhook endpoints, so one integration sees every practice's orders.
How does Live access work for each practice?
Live orders need Live access on both the platform and the practice.
- The platform. A platform you create starts with Live access. If it is off, an admin adds a payment method in Settings → Billing and clicks Turn on Live.
- Each practice. A new practice starts in Test, and Test orders work at once. To allow Live orders, send
"liveEnabled": true on create or with PATCH /v1/practices/{practiceId}, using a Live API key. A Test key that changes liveEnabled gets 403 live_key_required.
The liveEnabled field on a practice shows effective access: both the platform and the practice must have Live on. If Affinity turns off a platform's Live access, new Live orders for its practices get 403 mode_not_enabled. Orders already sent to the pharmacy keep going.
What price does a practice's order use?
A platform-managed practice pays its platform's price. Each platform has a price tier that Affinity sets, and Affinity can also set the platform's own price for one medication or shipping option.
To quote an order for one practice, read the catalog with the platform key and send practiceId in the query. Order creation uses the target practice's prescription and shipping prices. A signed order keeps its prices: later catalog changes do not change the order or its invoice. All prices are integers in cents, and the order total is the prescription prices plus shipping.
How do API keys and webhooks work across many practices?
API keys. A key acts for its own organization and mode. A key starting with sk_test_ acts in Test; sk_live_ acts in Live. The platform's keys cover every practice it manages, and each request names the practice. Create keys in Settings → API.
Webhooks. Each event goes to the platform of the order's practice. A platform-managed practice can't have endpoints, so the platform's endpoints receive every status change for every practice's orders. Events are signed, and Test and Live endpoints are separate.
Patients. AffinityRx does not email or text patients. The platform tells each patient about each status, including a failed or canceled order.
Frequently asked questions
Does each practice need its own payment method?
No. The platform pays for its practices' Live orders, with its own payment method, account credit or invoice. A platform-managed practice's billing is managed in the platform's workspace.
Can a platform pay by invoice instead of card?
Yes, when Affinity sets the platform up to pay by invoice. Then its practices' Live orders need no payment method and go on the platform's invoice.
Does a practice start with Live access?
No. A practice a platform creates starts in Test. The platform turns on Live for it with a Live API key.
Can a platform turn off Live for one practice?
Yes. Send "liveEnabled": false with PATCH /v1/practices/{practiceId} using a Live key. A platform can disable a practice's Live access even when its own Live access is off.
Do practices see their own order updates?
The platform receives every event for its practices' orders. A platform-managed practice can't have its own webhook endpoints.
Can an AI assistant manage practices?
Yes. Through MCP, an assistant connected to a platform can create a practice, change a practice, and turn Live orders on or off for a practice. Orders it creates wait for an admin to approve them. Read Connect an AI agent (MCP).
Notes
Compounded medications are not FDA-approved. Licensed compounding pharmacies fill every order on AffinityRx. AffinityRx is HIPAA compliant and signs BAAs. Enterprise clients get a dedicated account executive. The API docs are public at docs.affinityrx.com; start with Practices.
Get started
Sign up free, create a Test API key and your first practice, and send a first order the same day. A demo is optional; you can book one through the contact page.