Guide

User-to-user gifting

Let one of your users gift gold or silver to someone else, verified by an OTP sent to the sender's own mobile.

Gifting is a user → user transfer: the assets leave one of your end users' holdings and land with whoever they choose. You orchestrate it, but the value is theirs, which is why every gift is OTP-verified. To move assets out of your own wallet instead, see Sending assets.

Before you start

Gifting needs the gift capability on your profile, and the sender has to clear two checks:

RequirementIf it is not met
Approved KYCThe sending user must have completed and passed KYC, or the quote returns 403 KYC_REQUIRED.
Sufficient holdingsThe sender must hold enough of the asset to cover the gift plus the 0.25% fee, or the quote returns 400 INSUFFICIENT_BALANCE.

See KYC for how to get a user verified, and Errors for the full envelope.

1. Quote the gift

The quote prices the gift and triggers the OTP in one call — there is no separate "send OTP" step.

POST/partner/users/:user_code/gift/quotegift
FieldTypeDescription
receiver_mobilestringrequiredWho receives the gift, 10 to 15 digits. Auto-created if they are new to OroPocket.
asset_typestringrequiredEither "gold" or "silver".
amount_inrnumberoptionalRupee value to gift. Provide this OR amount_grams, not both.
amount_gramsnumberoptionalExact grams to gift. Provide this OR amount_inr.
FieldTypeDescription
gift_idstringPass this to the resend and confirm calls. Valid for 10 minutes.
sender_user_codestringThe user_code the gift is debited from, echoed back.
receiverobject{ mobile, name, exists, will_be_created } — will_be_created is true when we will open a new account at confirm.
breakdownobjectCosting for the gift — see the table below.
otpobject{ required, sent, channel, sent_to, resend_after_seconds } — sent_to is masked, resend_after_seconds is 45.

Inside breakdown:

FieldTypeDescription
rate_per_gramnumberLocked rate for this gift.
price_basisstringWhich side of the spread priced the gift.
receiver_gramsnumberGrams the receiver is credited.
sender_gramsnumberGrams debited from the sender — receiver grams plus the fee.
fee_gramsnumberPlatform fee in grams.
fee_inrnumberThe same fee in rupees.
fee_percentagenumber0.25 — the fee is 0.25% of the gift.
amount_inrnumberRupee value of the gift.
This call sends an OTP to the sender's own registered mobile — not the receiver's. The gift is the sender's money leaving, so the sender is the one who authorises it. In sandbox the OTP is always 1234 and no SMS is sent.
curl -X POST https://api.oropocket.com/partner/users/usr_xxx/gift/quote \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"receiver_mobile":"9876543210","asset_type":"gold","amount_inr":500}'

2. Resend the OTP (optional)

If the sender never got the code, resend it against the same quote. Wait out resend_after_seconds (45) before calling.

POST/partner/users/:user_code/gift/otp/resendgift
FieldTypeDescription
gift_idstringrequiredThe gift_id from the quote. The quote's own 10-minute clock is not extended.

3. Confirm the gift

POST/partner/users/:user_code/gift/confirmgift
FieldTypeDescription
gift_idstringrequiredThe gift_id from the quote, confirmed within its 10-minute window.
otpstringrequiredThe code the sender received on their registered mobile.
Idempotency-KeyheaderoptionalStrongly recommended. Any string up to 100 characters — retrying with the same key replays the original response instead of gifting twice.
FieldTypeDescription
transaction_idstringIdentifier for the resulting trade.
gift_idstringThe quote this settled, echoed back.
statusstringOutcome of the gift.
sidestring"gift" — how gifts are distinguished in the trades feed.
sender_user_codestringThe user the assets came from.
receiverobject{ mobile, is_new_user } — is_new_user is true when the account was created by this gift.
asset_typestring"gold" or "silver".
amount_inrnumberRupee value of the gift.
asset_quantity_gramsnumberGrams credited to the receiver.
fee_inrnumberFee charged, in rupees.
fee_gramsnumberThe same fee in grams.
sender_new_balance_gramsnumberThe sender's remaining balance for that asset.
created_atstringISO timestamp of the gift.
A wrong code returns 401 INVALID_OTP. After 5 failed attempts the quote locks — request a fresh one with /gift/quote, which also issues a new OTP.
curl -X POST https://api.oropocket.com/partner/users/usr_xxx/gift/confirm \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Idempotency-Key: 8f14e45f-cea1-4b2c-9d3a-1f2e3d4c5b6a" \
  -H "Content-Type: application/json" \
  -d '{"gift_id":"gft_xxx","otp":"1234"}'

Finding gifts later

Gifts show up in GET /partner/trades alongside buys and sells, tagged with side: "gift". Subscribe to webhooks if you would rather be pushed the event than poll for it.