Guide

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.

POST/partner/users/init
curl -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.

POST/partner/buy/quote
FieldTypeDescription
user_codestringrequiredThe end user to buy for.
asset_typestringrequired"gold" or "silver".
amount_inrnumberrequiredAmount to spend in INR.
POST/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"}'
Buys debit your prepaid float (or postpaid credit line) and credit the end user. You collect the money from your user on your side.

Sell

Sell mirrors buy — quote then confirm. Proceeds settle into the end user's INR wallet, not your float.

POST/partner/sell/quotesell
FieldTypeDescription
user_codestringrequiredWhose holdings to sell.
asset_typestringrequired"gold" or "silver".
quantity_gramsnumberoptionalExact grams to sell. Provide this OR amount_inr.
amount_inrnumberoptionalTarget NET rupees the user should receive — we work backwards to the grams. Provide this OR quantity_grams.
FieldTypeDescription
quote_idstringPass to /sell/confirm.
quantity_gramsnumberGrams that will be sold.
rate_inr_per_gramnumberLocked sell rate.
net_amount_inrnumberWhat the user actually receives, after fees.
breakdownobjectgross_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_secondsnumberQuote TTL — 10 minutes.
POST/partner/sell/confirmsell
FieldTypeDescription
quote_idstringrequiredFrom /sell/quote.
Idempotency-KeyheaderoptionalRecommended — makes a retry safe.
Selling does not credit your partner wallet — the money goes to the user. A buy→sell round trip therefore still reduces your float. See Wallet.

Users, portfolio & balances

GET/partner/usersusers

Lists 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.

GET/partner/users/:user_codeusers

One user's detail. Identity is deliberately masked — you address users only by user_code.

FieldTypeDescription
user_codestringYour handle for this user.
namestringAs supplied at registration.
mobile_maskedstringe.g. XXXXXX3210 — the full number is never returned.
email_maskedstringe.g. a***@example.com.
kyc_statusstringnot_started | under_review | approved | rejected.
user_existedbooleanTrue if the OroPocket account predated your registration (so they are not attributed to you).
registered_atstringWhen they were linked to you.
balancesobjectOnly with ?include=balances — your sub-wallet view of their holdings.
GET/partner/users/:user_code/portfoliobalance

Holdings 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.