Raw API
Design your own experience. Register users, buy, sell and read balances server-to-server — no OroPocket UI.
Register a user
Trusted registration returns a persistent user_code. You own the user's UX and OTP; we never message them.
/partner/users/initcurl -X POST https://api.oropocket.com/partner/users/init \
-H "Authorization: Bearer oro_live_xxx" \
-d '{"flow":"api","mobile":"9000000001","name":"Anya"}'Buy
Two steps — quote, then confirm. Quotes lock a price for a short window.
/partner/buy/quote| Field | Type | Description | |
|---|---|---|---|
| user_code | string | required | The end user to buy for. |
| asset_type | string | required | "gold" or "silver". |
| amount_inr | number | required | Amount to spend in INR. |
/partner/buy/confirm# quote → returns quote_id + grams + rate
curl -X POST https://api.oropocket.com/partner/buy/quote \
-H "Authorization: Bearer oro_live_xxx" \
-d '{"user_code":"usr_xxx","asset_type":"gold","amount_inr":1000}'
# confirm
curl -X POST https://api.oropocket.com/partner/buy/confirm \
-H "Authorization: Bearer oro_live_xxx" \
-H "Idempotency-Key: <uuid>" \
-d '{"quote_id":"tqt_xxx"}'Sell
Sell mirrors buy — quote then confirm. Proceeds settle into the end user's INR wallet, not your float.
/partner/sell/quotesell| Field | Type | Description | |
|---|---|---|---|
| user_code | string | required | Whose holdings to sell. |
| asset_type | string | required | "gold" or "silver". |
| quantity_grams | number | optional | Exact grams to sell. Provide this OR amount_inr. |
| amount_inr | number | optional | Target NET rupees the user should receive — we work backwards to the grams. Provide this OR quantity_grams. |
| Field | Type | Description |
|---|---|---|
| quote_id | string | Pass to /sell/confirm. |
| quantity_grams | number | Grams that will be sold. |
| rate_inr_per_gram | number | Locked sell rate. |
| net_amount_inr | number | What the user actually receives, after fees. |
| breakdown | object | gross_amount_inr, platform_fee_grams, platform_fee_inr, platform_fee_percentage (0.25), net_amount_inr, target_net_mode, proceeds_destination ('user_inr_wallet'), price_block_id. |
| expires_in_seconds | number | Quote TTL — 10 minutes. |
/partner/sell/confirmsell| Field | Type | Description | |
|---|---|---|---|
| quote_id | string | required | From /sell/quote. |
| Idempotency-Key | header | optional | Recommended — makes a retry safe. |
Users, portfolio & balances
/partner/usersusersLists the users you registered. Add ?include=balances for a per-user holdings snapshot, and ?scope=all to also include embed-verified and attributed users (each row then carries a sources array). Paginate with limit (1–200) and offset.
/partner/users/:user_codeusersOne user's detail. Identity is deliberately masked — you address users only by user_code.
| Field | Type | Description |
|---|---|---|
| user_code | string | Your handle for this user. |
| name | string | As supplied at registration. |
| mobile_masked | string | e.g. XXXXXX3210 — the full number is never returned. |
| email_masked | string | e.g. a***@example.com. |
| kyc_status | string | not_started | under_review | approved | rejected. |
| user_existed | boolean | True if the OroPocket account predated your registration (so they are not attributed to you). |
| registered_at | string | When they were linked to you. |
| balances | object | Only with ?include=balances — your sub-wallet view of their holdings. |
/partner/users/:user_code/portfoliobalanceHoldings for one user. Values are scoped to your sub-wallet, not the user's whole OroPocket balance — read sub-wallets before you reconcile against these numbers.
curl "https://api.oropocket.com/partner/users?include=balances" \
-H "Authorization: Bearer oro_live_xxx"
curl "https://api.oropocket.com/partner/users/usr_xxx?include=balances" \
-H "Authorization: Bearer oro_live_xxx"Users must complete KYC before they can withdraw. Configure webhooks to get settlement events.