The official ReloadPi Browse SDK gives your app read-only access to our full digital goods catalog — with built-in referral tracking and AI agent support.
import { ShoppiBrowseSDK } from "@crossabc/reloadpi-browse-sdk"; const sdk = new ShoppiBrowseSDK({ baseUrl: "https://shoppi-backend.onrender.com/api/catalog/", // trailing slash required apiKey: "YOUR_API_KEY", referralCode: "PARTNER_ABC", }); // Browse gift cards const vouchers = await sdk.vouchers.searchOffers({ country: "NG", brand: "Amazon", }); // Get referral link → you earn on every sale const url = sdk.getBuyUrl("vouchers", vouchers.items[0].id); // https://reloadpi.com/vouchers/offer/ID?ref=PARTNER_ABC
The SDK talks exclusively to ReloadPi's public API. You never touch provider APIs, handle crypto, or manage fulfillment.
Add the npm package, pass your API key and referral code. One object, three optional fields.
Query gift cards, mobile top-ups, or eSIM plans. Filter by country, brand, or operator. Clean typed responses every time.
Generate a referral link with getBuyUrl(). We handle checkout, crypto payment, and delivery. You earn commission.
Every module follows the same pattern: search, get by ID, list metadata. No surprises.
Gift cards for global brands — Amazon, Adidas, Asda and hundreds more. Filter by country and brand.
Instant recharges for phone numbers worldwide. Filter by country and operator.
Travel eSIM data plans for international roaming. Requires eSIM-capable, carrier-unlocked device.
Every link your app generates includes your referral code. When a user completes a purchase on ReloadPi, you get credit. No payment integration required on your side.
getBuyUrl() or getCatalogUrl()GENERATED LINK
A 5% conversion fee applies if the payment currency differs from the creator's settlement currency or if a Pi-supported wallet is not used. All transactions are final once confirmed.
This SDK cannot make purchases, trigger payments, or modify account state. Safe to embed in client-side apps and AI agents.
api.shoppi.com only. Never expose your key in client-side code — use the SDK server-side or behind a proxy. Keys can be rotated or revoked at any time. Rate limits and permissions are enforced server-side.
api.shoppi.com — this is intentional. ReloadPi is built on Shoppi infrastructure, and the API contract is stable. The shopUrl config option defaults to https://reloadpi.com, so all referral links point to the consumer storefront correctly.
Every API failure throws a ShoppiError with a status code, error code, and message — no raw HTTP surprises.
import { ShoppiBrowseSDK, ShoppiError } from "@crossabc/reloadpi-browse-sdk"; try { await sdk.vouchers.searchOffers({ country: "NG" }); } catch (err) { if (err instanceof ShoppiError) { console.error(err.status, err.code, err.message); // e.g. 401 "UNAUTHORIZED" "Invalid or missing API key" } }
The SDK ships with a tool layer for OpenAI function calling, LangChain, and MCP-style integrations.
import { ShoppiBrowseSDK, createBrowseTools } from "@crossabc/reloadpi-browse-sdk"; const sdk = new ShoppiBrowseSDK({ baseUrl: "https://shoppi-backend.onrender.com/api/catalog/", apiKey: "...", referralCode: "...", }); // Drop into any OpenAI / LangChain / MCP agent const tools = createBrowseTools(sdk); // Tools available to your agent: // search_voucher_offers, get_voucher_offer // search_topup_offers, get_topup_offer // search_esim_plans, get_esim_plan
Use environment variables for all credentials — never hardcode them. For Next.js partners, this is the recommended pattern.
# Server-only (never expose to browser) RELOADPI_API_BASE_URL=https://shoppi-backend.onrender.com/api/catalog/ RELOADPI_API_KEY=your_private_api_key # Safe to expose to browser NEXT_PUBLIC_RELOADPI_SHOP_URL=https://reloadpi.com NEXT_PUBLIC_RELOADPI_REFERRAL_CODE=PARTNER_ABC
RELOADPI_API_KEY — keep server-side only. Never in client bundles.NEXT_PUBLIC_RELOADPI_SHOP_URL — safe to expose, used for referral link generation.NEXT_PUBLIC_RELOADPI_REFERRAL_CODE — safe to expose if used in browser-visible referral flows.Default partner limits and the error codes you'll encounter.
The package is publicly installable. API access is controlled via keys issued to approved partners.