From sign-up to checkout

A sample walkthrough — no real API calls, just a preview of connecting your first hub.

Step 1 of 3

Connect to VenHub

This is a simulated walkthrough — no real API key is generated and no real endpoints are called. It's here to show you the shape of the first step: generating a key scoped to your integration, then making one call to confirm the connection works.

1. Generate an API key

You can only generate an API key from TINA, the VenHub dashboard — grant it only the scopes this integration needs — here that's hubs:read, inventory:read, inventory:write, orders:read and controls:write.

🔑
Retail partners running hubs for their own customers don't have to generate every key themselves — add that customer as an operator in TINA, and they can generate and manage their own scoped key to run the hub directly.
✓ Key generated — keep it secret, keep it safe.
2. Confirm the connection

Attach the key to a request and call GET /hubs — if it comes back with your hub, you're connected.

GET /hubs
cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hubs" \
  --header "X-API-Key: vh_test_9f3k7d2a1e0c"
✓ Connected to Downtown Location.
Step 2 of 3

Stock the hub, then sell

Keep VenHub's record of what's on the shelf in sync with reality, then take the customer through checkout. Choose VenHub's Stripe integration and it's provided for you, or bring your own payment processor and build that integration yourself. Either way, once payment is verified, you let VenHub know and the transaction continues from there.

1. Check current inventory

Pull the shelf state for the hub so your app knows what's actually available to sell.

GET /hub_inventory?hub_id=123
cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hub_inventory/?hub_id=123" \
  --header "X-API-Key: vh_test_9f3k7d2a1e0c"
✓ 25 Organic Apples on the shelf.
2. Update stock after a delivery

A restock just came in. Push the new count so the hub's record matches the shelf.

PUT /hubs/product/456/update_quantity
cURL
curl -X PUT \
  "https://tina-api.venhub.com/api/v1/owners/hubs/product/456/update_quantity" \
  --header "X-API-Key: vh_test_9f3k7d2a1e0c" \
  --header "Content-Type: application/json" \
  --data '{"quantity": 40}'
✓ Shelf count updated to 40.
3. Take payment, then tell VenHub

A customer taps "Organic Apple — $2.99" in your app. Use VenHub's Stripe integration and it's provided for you — or bring your own payment processor and build that integration yourself. VenHub never touches card data or checks payment status itself: once the charge is verified, you let VenHub know so the transaction can continue.

💳
There's no VenHub payments endpoint. VenHub's Stripe integration is provided for you as the fastest path; bringing your own processor means building that integration yourself. Either way, once the charge is verified, you tell VenHub — which is what the next step's open_bin call does, continuing the transaction.
✓ Payment confirmed via Stripe — ready to let VenHub know and continue the transaction.
Step 3 of 3

Dispense and close the loop

You've verified payment on your own side — this call is how you let VenHub know and continue the transaction. It sends a live command to the hardware, then verify VenHub logged the sale and adjusted inventory on its own.

1. Open the bin

Only call this once you've verified payment yourself — VenHub doesn't check payment status, so this is the "yes, it's paid for" signal that continues the transaction and sends a live command to the hardware.

POST /controls/open_bin?bin=1&hub=123
cURL
curl -X POST \
  "https://tina-api.venhub.com/api/v1/owners/controls/open_bin?bin=1&hub=123" \
  --header "X-API-Key: vh_test_9f3k7d2a1e0c"
✓ Bin 1 opened — item dispensed.
2. Confirm the order was logged

VenHub records the sale and decrements inventory automatically the moment the bin opens against a completed payment. Check the order history to see it land.

GET /hubs/all_orders_paginated?hub_id=123&limit=1
cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hubs/all_orders_paginated/?hub_id=123&limit=1" \
  --header "X-API-Key: vh_test_9f3k7d2a1e0c"
✓ Order #501 logged, shelf now at 39.
🎉

That's the whole loop

Connect once, keep inventory in sync, take payment through VenHub's Stripe integration or your own build, tell VenHub once it's verified, then dispense and let VenHub log the rest. Six calls, start to finish.