Guide

Collect payments

Your customer pays OroPocket directly over UPI, and we buy and credit their gold or silver. No float to pre-fund, no money passing through you.

Every other buy on the Raw API is funded from your own prepaid wallet, so you collect from your customer first on your own rails. Payment collection removes that step: you create a payment order, your customer pays us, and the buy completes itself. It needs the payments capability, which OroPocket switches on per account — it is not self-serve. Once it is on, a Payments section appears in your dashboard.

Checkout typeWhat you get back
intentA raw upi:// link plus ready-made links for Google Pay, PhonePe, Paytm and CRED. Open it from your own app or page.
hostedA checkout_url at pay.oropocket.com showing your name and logo, the amount, and the UPI apps that work on the customer's device (a QR code on desktop). Send the customer there.
Payments covers one-off buys and SIPs, paid by UPI. Cards and netbanking are not offered.

What amount_inr covers

amount_inr is the full amount your customer pays, GST included — on a payment order here, and on a direct buy with POST /partner/buy/quote. Send that whole amount. Don't take GST off it, and don't take a gateway fee off it yourself: OroPocket takes everything out of the amount in this order. With the standard 0.25% platform fee, ₹1,032.58 buys ₹1,000.00 of metal:

Step₹1,032.58 paid
amount_inr₹1,032.58 — what the customer pays, whoever bears the gateway fee.
fee.amount_inr₹1.22 — the UPI gateway fee (0.118%). It comes out of the amount only when fee.bearer is end_user.
funded_amount_inr₹1,032.58 with oropocket or partner; ₹1,031.36 with end_user. GST-inclusive: the three lines below come out of it.
Platform fee₹2.58 — 0.25%, unless a different rate is agreed for your account.
GST₹30.00 with oropocket or partner; ₹29.96 with end_user — 3% on the metal.
Metal₹1,000.00 with oropocket or partner; ₹998.82 with end_user.

A direct buy has no gateway fee: amount_inr 1032.58 on /partner/buy/quote gives platform_fee_inr 2.58, gst_amount_inr 30 and investment_amount_inr 1000 in the quote's breakdown. Your markup, if you set one, changes the grams, not the amount.

The platform fee is your account's own rate on direct buys and payment orders: 0.25% by default, and set per account anywhere from 0% to 1%, so some accounts pay 0%. A direct-buy quote shows it as breakdown.platform_fee_percentage and breakdown.platform_fee_inr; a payment order's response has no platform-fee field, but its estimate.asset_quantity is sized after the fee. With a 0% platform fee, ₹1,030 buys exactly ₹1,000.00 of metal and ₹30.00 GST.

SIP debits have a platform fee of their own, also set per account: 0.25% by default, anywhere from 0% to 1%. It applies to every debit of the SIPs that came through you, whether created through this API or in your embed. It is read at each debit, so a change applies to running SIPs from their next debit. The SIP instalment invoice shows the rate each debit was charged (see SIP instalments and invoices).

The gateway fee

UPI costs 0.118% (0.10% + GST). OroPocket decides, per account, who bears it — you can see which on Payments → Checkout. fee.bearer on every order and SIP says which applied:

fee.bearerYour customer pays ₹500.00
end_userThe fee comes out of the amount: ₹0.59 is deducted and ₹499.41 goes to the purchase. The hosted checkout shows this line before the customer pays; show it in your own UI too if you use intent.
partnerThe full ₹500.00 goes to the purchase and the ₹0.59 is billed to you. Each month we invoice you for the fees (fee + GST, totalling the fees) and deduct that invoice from the commission we transfer — your own commission invoice is unchanged. If OroPocket allows it, you can pass the fee on to your customer from Payments → Checkout; orders then show end_user.
oropocketThe full ₹500.00 goes to the purchase and OroPocket absorbs the ₹0.59.

The fee is fixed when the order is created and never changes afterwards. funded_amount_inr is what goes to the purchase, GST included, and what the tax invoice shows. Your markup and commission are calculated on it exactly as on any other buy.

Which rates include GST. On a payment order, estimate.rate_per_gram_inr and fulfilment.rate_per_gram_inr include GST, and so does rate_inr_per_gram on the buy.completed a payment order makes: grams = (funded_amount_inr − platform fee) ÷ rate. On a direct buy, rate_inr_per_gram and breakdown.buy_rate_inr_per_gram on the quote, and rate_inr_per_gram on its buy.completed, exclude GST: grams = investment_amount_inr ÷ rate. SIP data carries no per-gram rate: sip.installment, the SIP rows of the activity feeds and GET /partner/sips/:sip_id/installments give grams and rupees only, and the SIP instalment invoice shows the price per gram, GST excluded. On GET /partner/prices, buy excludes GST and final_buy_price includes it.

1. Create a payment order

POST/partner/payments/orderspayments
FieldTypeDescription
user_codestringrequiredThe customer, registered earlier with POST /partner/users/init. In sandbox, a usr_test_… code.
amount_inrnumberrequiredThe full amount the customer pays, GST included (see What amount_inr covers), up to 2 decimals and at most ₹1,00,000, UPI's standard limit for one payment. Don't deduct any gateway fee yourself. Your per-transaction limit also applies; the lower of the two is the limit.
checkout_typestringrequired"intent" or "hosted".
asset_typestringoptional"gold" (default) or "silver".
referencestringoptionalYour own id for this payment, up to 120 characters. Echoed back everywhere, and unique per mode — a second order with the same reference is refused with 409 DUPLICATE_REFERENCE.
return_urlstringoptionalHosted only: where the checkout sends the customer when it finishes, with ?payment_id=…&status=… added. Must be https on an origin you registered under Payments → Checkout.

₹1,00,000 is UPI’s standard limit for one payment, not one every customer can reach. Banks set their own per-payment and daily limits, often lower, and someone who has just set up UPI may be limited for their first day. A payment over the customer’s limit is declined in their UPI app, and the order fails or expires like any unpaid order.

Send an Idempotency-Key header so a retried request returns the same order instead of creating a second one. Keys are scoped per mode.

curl -X POST https://api.oropocket.com/partner/payments/orders \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-10482" \
  -d '{
    "user_code": "usr_0490fb2ff6f2007a55d39628c3807f85",
    "amount_inr": 500,
    "asset_type": "gold",
    "checkout_type": "hosted",
    "reference": "order-10482",
    "return_url": "https://shop.example.com/orders/10482"
  }'

Response, 201. The two samples are the same ₹500 order under the two most common fee arrangements:

{
  "success": true,
  "request_id": "req_…",
  "mode": "live",
  "idempotent_replay": false,
  "data": {
    "payment_id": "ppo_5f1c…",
    "status": "created",
    "checkout_type": "hosted",
    "asset_type": "gold",
    "user_code": "usr_0490fb2ff6f2007a55d39628c3807f85",
    "reference": "order-10482",
    "amount_inr": 500,
    "fee": { "bearer": "end_user", "amount_inr": 0.59, "deducted_from_amount": true },
    "funded_amount_inr": 499.41,
    "estimate": { "asset_quantity": 0.047417, "rate_per_gram_inr": 10506, "final": false },
    "checkout_url": "https://pay.oropocket.com/ppo_5f1c…",
    "expires_at": "2026-09-26T09:40:00.000Z",
    "created_at": "2026-09-26T09:20:00.000Z"
  }
}

estimate is indicative ("final": false): the order is priced when the money arrives, at that moment's rate. The order stays payable until expires_at (20 minutes).

The payment_id is also the key to the hosted checkout. Anyone with the link can open that page (it never shows the customer's details). Send it only to the customer who is paying.

2a. Intent: open the UPI app yourself

For "checkout_type": "intent", the response carries a upi block:

"upi": {
  "url": "upi://pay?pa=…&pn=…&am=500.00&cu=INR&tr=…",
  "apps": {
    "gpay":    { "android": "intent://pay?…#Intent;scheme=upi;package=com.google.android.apps.nbu.paisa.user;end",
                 "android_package": "com.google.android.apps.nbu.paisa.user",
                 "ios": "gpay://upi/pay?…" },
    "phonepe": "phonepe://pay?…",
    "paytm":   "paytmmp://pay?…",
    "cred":    { "android": "intent://pay?…#Intent;scheme=upi;package=com.dreamplug.androidapp;end",
                 "android_package": "com.dreamplug.androidapp",
                 "ios": "credpay://upi/pay?…" }
  }
}
AppHow to open it
Google Pay · AndroidNative app: the raw upi.url with setPackage(android_package). From a web page or WebView: navigate the SAME frame to apps.gpay.android (Chrome's intent:// URL). Do not add a browser fallback — it navigates away from your page.
Google Pay · iOSapps.gpay.ios (gpay://upi/pay?…). Not tez:// — Google Pay for iOS does not handle that scheme.
PhonePe · PaytmOpen apps.phonepe / apps.paytm as they are, on either platform.
CREDAndroid: apps.cred.android. iOS: apps.cred.ios (credpay://upi/pay). One-off payments only — CRED is not offered for SIP mandates.
Any UPI appupi.url on Android shows the system chooser. On desktop, render upi.url as a QR code.
// Android (Kotlin): open Google Pay directly, no chooser.
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(upi.url))   // the raw upi:// link
intent.setPackage("com.google.android.apps.nbu.paisa.user")     // upi.apps.gpay.android_package
startActivity(intent)
// Omit setPackage to show the system's UPI app chooser.
Never re-encode any of these links. A UPI link can be signed over the whole string, and a re-encoded link is rejected by the app as tampered. Pass them on exactly as you received them.

2b. Hosted: send the customer to the checkout

Redirect or link to checkout_url. The page shows your company name (always), your logo and accent if you set them, the amount and the fee line, and only the UPI apps that work on that device. When the order finishes it shows the outcome and, if you passed a return_url, sends the customer back to it. Never rely on that redirect alone to confirm payment — use the webhook or the status endpoint.

3. Know when it is paid

Payment orders fire webhooks to the endpoint on your Webhooks page, signed the same way as every other event.

EventWhen
payment.completedThe customer paid and the metal is credited. fulfilment carries the final grams and rate, and transaction_id — the buy this payment made. This is the one to fulfil your order on.
payment.failedThe order closed without a purchase. If refund.status is "pending", the customer's money arrived but the purchase could not be completed — OroPocket retries or refunds it.
payment.expiredNo payment arrived before expires_at.
payment.refundedA refund_due order was refunded to the customer. refund.reference is the UTR or gateway refund id.
{
  "event": "payment.completed",
  "event_id": "evt_…",
  "created_at": "2026-09-26T09:22:41.000Z",
  "data": {
    "user_code": "usr_0490fb2ff6f2007a55d39628c3807f85",
    "payment_id": "ppo_5f1c…",
    "status": "completed",
    "reference": "order-10482",
    "amount_inr": 500,
    "fee": { "bearer": "end_user", "amount_inr": 0.59, "deducted_from_amount": true },
    "funded_amount_inr": 499.41,
    "fulfilment": {
      "asset_quantity": 0.047398,
      "rate_per_gram_inr": 10510.2,
      "final": true,
      "transaction_id": "cashfree_gold_…"
    },
    "completed_at": "2026-09-26T09:22:40.000Z"
  }
}

A completed payment order is also a buy, so the ordinary buy.completed event fires for it as well, carrying the order's payment_id. Match on payment.completed for payment orders so you don't count them twice.

{
  "event": "buy.completed",
  "data": {
    "user_code": "usr_0490fb2ff6f2007a55d39628c3807f85",
    "transaction_id": "cashfree_gold_…",
    "asset_type": "gold",
    "amount_inr": 499.41,
    "quantity_grams": 0.047398,
    "rate_inr_per_gram": 10510.2,
    "status": "completed",
    "source": "s2s",
    "payment_id": "ppo_5f1c…"
  }
}

Linking a payment to its buy

Every completed payment order names the buy it made, and the buy names the payment order — the same pair in both directions, in sandbox and live. Reconcile on these ids, never on amount, grams and time.

WhereField
GET /partner/payments/orders/:payment_id, simulate, payment.completedfulfilment.transaction_id — the buy. null until the order is completed.
buy.completedpayment_id — the ppo_… order. null for a buy that did not come from a payment order.
GET /partner/transactions/all, GET /partner/users/:user_code/transactionspayment_id on each row, null when not from a payment order.
GET /partner/transactions/:transaction_idResolves the buy itself: the same row the feed shows, with payment_id.

A sandbox buy id looks like trd_test_…; a live one like cashfree_gold_… or freecharge_gold_…. Treat it as an opaque string.

GET/partner/payments/orders/:payment_idpayments

The same object as the create response, plus fulfilment once completed (grams, rate and the buy's transaction_id). Polling it also checks the gateway, so it is the reliable fallback if a webhook is missed.

GET/partner/payments/orderspayments

Newest first. Query: status (comma-separated), reference, page, limit (max 100).

Statuses

statusMeaning
createdWaiting for the customer to pay.
paidMoney arrived; the purchase is being completed (seconds).
completedPaid and credited. Final.
failedClosed without a purchase — the gateway closed it, or it could not be created.
expiredNobody paid in time. If money arrives late anyway, the order still completes.
refund_duePaid, but the purchase could not be completed. Being retried or refunded — it can still move to completed.
refundedThe customer's money went back to them. Final.

SIPs: recurring buys with UPI AutoPay

A SIP buys the same amount of gold or silver every day, week or month. Your customer approves a UPI AutoPay mandate once. The first installment is taken with that approval, and every later one is debited automatically.

POST/partner/payments/sipspayments
FieldTypeDescription
user_codestringrequiredThe customer.
installment_amount_inrnumberrequiredWhat each debit takes, GST included, as amount_inr on an order: at least ₹100, unless a different minimum is agreed for your account, and at most ₹99,000.
frequencystringrequired"daily", "weekly" or "monthly".
asset_typestringoptional"gold" (default) or "silver".
namestringoptionalWhat the customer calls it, up to 60 characters. Default "Gold SIP".
referencestringoptionalYour id, unique per mode.
return_urlstringoptionalWhere the hosted page sends the customer once AutoPay is set up. Registered origins only.
curl -X POST https://api.oropocket.com/partner/payments/sips \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: sip-10482" \
  -d '{
    "user_code": "usr_0490fb2ff6f2007a55d39628c3807f85",
    "installment_amount_inr": 500,
    "frequency": "monthly",
    "asset_type": "gold",
    "name": "Wedding gold",
    "reference": "sip-10482"
  }'
{
  "id": "ppo_8e21…",
  "sip_id": 1840,
  "status": "pending_authorisation",
  "installment_amount_inr": 500,
  "frequency": "monthly",
  "fee": { "bearer": "end_user", "per_installment_inr": 5.9, "deducted_from_installment": true },
  "funded_installment_inr": 494.1,
  "checkout_url": "https://pay.oropocket.com/ppo_8e21…",
  "mandate": { "upi": { "url": "upi://mandate?…", "apps": { "gpay": { "android": "intent://mandate?…", "ios": "gpay://upi/mandate?…" }, "phonepe": "phonepe://mandate?…", "paytm": "paytmmp://mandate?…" } } },
  "authorise_by": "2026-09-26T10:20:00.000Z"
}

Send the customer to checkout_url, or open mandate.upi yourself with the same per-app rules as a payment. The verb is mandate, so use Google Pay's gpay://upi/mandate on iOS, and never turn a mandate link into a pay link. The link must be approved before authorise_by (one hour).

When your customer bears the gateway fee, it is deducted from every installment, and it is a flat fee per debit rather than a percentage: ₹1.18 up to ₹250, ₹5.90 up to ₹1,000, ₹17.70 above (or ₹3 per debit, depending on the provider). On a ₹101 SIP that is a noticeable share. The create response states the exact figure, so show it to your customer.

sip_id is the id every sip.* webhook carries: sip.created, then sip.activated once the mandate is approved or the first payment is collected, one sip.installment per debit (with fee_inr, funded_amount_inr and the grams), and sip.cancelled when it ends — or sip.mandate_failed if it is never approved. sip.activated is sent again when a paused SIP resumes, and sip.withdrawn each time the SIP's holdings move to the customer's main wallet. Payloads are under Webhooks → SIP events.

GET/partner/payments/sips/:idpayments

Accepts the id (ppo_…), the sip_id, or sip_ + the sip_id. For a SIP still awaiting approval, or failed with its plan still open, it asks the provider (at most every 4 seconds); otherwise it reads OroPocket's records. It adds progress: installments paid, total invested, grams and the next date. In sandbox, sip_id is the sandbox SIP's own number (it used to be null).

GET/partner/payments/sipspayments

The SIPs you created through this API, newest first. Query: status (comma-separated; a value outside the list below matches nothing), page, limit (max 100). The status of every row is worked out when you read it, the same way as the single-SIP read.

POST/partner/payments/sips/:id/cancelpayments

Stops the mandate so no further amounts are debited, and sends sip.cancelled with reason partner_cancelled. Metal already bought stays with the customer. A failed SIP whose plan is still open can be cancelled too, so a late approval can't bring it back. A SIP that is already cancelled, completed or closed as failed is refused with 409 SIP_NOT_CANCELLABLE.

Cancelling runs the same stop as POST /partner/sips/:sip_id/stop: the SIP's metal and cashback sats move to the customer's main wallet, where /partner/sell can sell them, and unfinished milestone sats and a SIP offer's bonus are forfeited by their rules. Cancel has always moved the holdings this way; what is new is that sip.withdrawn now follows sip.cancelled to say what moved. The response is the SIP, as before; call POST /partner/sips/:sip_id/stop instead when you want what moved in the answer.

SIP statuses

One set of rules gives the status everywhere: GET /partner/payments/sips and /:id, GET /partner/sips, sip_status on sip.installment and your dashboard.

statusWhen it applies
pending_authorisationCreated, and the customer has not approved the AutoPay mandate yet, but there is still time: before authorise_by for a SIP made through this API, or within 24 hours of creation for one made elsewhere.
activeThe mandate is approved, or a payment has already been collected, and the SIP has not been stopped. A SIP whose first payment is collected counts as active even while the provider is still confirming the mandate.
pausedThe provider reports the mandate as paused or on hold. It can become active again; sip.activated is sent when it does.
cancelledStopped after it was approved: the customer revoked the mandate, the provider cancelled it or it expired, you cancelled it, or it was stopped in the app or by OroPocket. A SIP made through this API that is stopped on purpose before approval is cancelled too. Final.
completedThe mandate ran to its end. Final.
failedNever approved: the approval window passed, or OroPocket closed the SIP as never approved. Not final — if a late approval arrives, it becomes active.

Read SIPs from every channel

GET/partner/sipstransactions
GET/partner/sips/:sip_idtransactions

New. One row per SIP, newest first, covering the same SIPs as your activity feed (GET /partner/transactions/all), whichever channel created them: this API, your embed or the OroPocket app. It needs the transactions capability, not payments. The path takes 16176 or sip_16176.

FieldTypeDescription
user_codestringoptionalOnly this customer's SIPs. An unknown code is 404 USER_CODE_NOT_FOUND.
statusstringoptionalA comma-separated list of the statuses above, or "all" (the default). Anything else is 400 INVALID_STATUS.
pagenumberoptionalFrom 1. Default 1.
limitnumberoptional1–100. Default 20.
FieldTypeDescription
sip_idnumberThe SIP's id, as in every sip.* webhook and the payments API.
idstring"sip_" + sip_id, the form the activity feed's sip object uses.
payment_idstring | nullThe ppo_… id when the SIP was created through POST /partner/payments/sips, else null.
user_codestringThe customer.
sip_namestringThe plan's name.
asset_typestring"gold", "silver", or "both".
statusstringOne of the SIP statuses above.
statestring | nullThe mandate provider's own state, as it reported it (for example ACTIVE or ACTIVATED). For display and support; branch on status.
providerstring | nullWhich mandate provider holds the mandate.
amount_inrnumberThe amount of each debit.
frequencystring"daily", "weekly" or "monthly".
installments_paidnumberDebits collected so far. A debit that buys both metals counts once.
collected_inrnumberWhat those debits put into purchases, GST included.
gramsobject{ gold, silver }: grams those debits bought.
next_installment_datestring | nullYYYY-MM-DD of the next debit while the SIP is active; null otherwise.
last_installment_atstring | nullWhen the last debit was collected.
created_atstringISO-8601 timestamp.

The list gives sips, pagination { page, limit, total, has_more } and filters (the status filter applied, and user_code when given). total counts every SIP that matches the filters. The single read gives one row, or 404 SIP_NOT_FOUND — another partner's SIP answers the same way. A malformed id is 400 INVALID_SIP_ID.

curl "https://api.oropocket.com/partner/sips?status=active,paused&limit=20" \
  -H "Authorization: Bearer oro_live_xxx"
Response
{
  "success": true,
  "request_id": "req_…",
  "mode": "live",
  "data": {
    "sips": [
      {
        "sip_id": 16176,
        "id": "sip_16176",
        "payment_id": "ppo_8e21…",
        "user_code": "usr_xxx",
        "sip_name": "Wedding gold",
        "asset_type": "gold",
        "status": "active",
        "state": "ACTIVE",
        "provider": "cashfree",
        "amount_inr": 500,
        "frequency": "monthly",
        "installments_paid": 3,
        "collected_inr": 1482.3,
        "grams": { "gold": 0.140679, "silver": 0 },
        "next_installment_date": "2026-12-24",
        "last_installment_at": "2026-11-24T09:04:20.000Z",
        "created_at": "2026-09-24T09:00:04.000Z"
      }
    ],
    "pagination": { "page": 1, "limit": 20, "total": 1, "has_more": false },
    "filters": { "status": "active,paused" }
  }
}

In sandbox these read the SIPs you created with a test key: sip_id is the sandbox SIP's number, progress comes from simulated debits, state, provider and next_installment_date are null, and each row and the list carry simulated: true.

To list one SIP's debits, call GET /partner/transactions/all?sip_id=16176 (sip_16176 works too), or GET /partner/sips/:sip_id/installments for each debit with its invoices. That feed's user_code filter now applies in live as well as sandbox.

SIP instalments and invoices

GET/partner/sips/:sip_id/installmentstransactions

New. Every paid debit of one SIP, newest first, with each metal's grams, rupees and invoice. It covers the SIPs that came through you, created through this API or in your embed; any other SIP is 404 SIP_NOT_FOUND. The path takes 16176 or sip_16176; a malformed id is 400 INVALID_SIP_ID. Query: page (default 1) and limit (1–100, default 20).

FieldTypeDescription
sip_id · idnumber · stringThe SIP, as a number and as "sip_" + that number.
installments[].installment_numbernumberWhich debit of the plan this is, 1 being the first: the same number as sip.installment and the activity feed give.
installments[].debited_atstringWhen the debit was collected.
installments[].amount_inrnumberWhat the customer's bank debited: funded_amount_inr + fee_inr.
installments[].funded_amount_inrnumberWhat went to the purchase, GST included.
installments[].fee_inrnumberThe gateway fee taken from this debit. 0 unless the customer bears it.
installments[].legs[]arrayOne entry per metal the debit bought: asset_type, quantity_grams, value_inr (that metal's share of funded_amount_inr, GST included), transaction_id (DREAM_TXN_… in live) and invoice_url, a tokenised printable invoice page. A plan that buys both metals has two legs per debit.
paginationobject{ page, limit, total, has_more }. total counts debits, not legs.

There is no per-gram rate here; the invoice has it.

Response
{
  "success": true,
  "request_id": "req_…",
  "mode": "live",
  "data": {
    "sip_id": 16176,
    "id": "sip_16176",
    "installments": [
      {
        "installment_number": 3,
        "debited_at": "2026-11-24T09:04:20.000Z",
        "amount_inr": 500,
        "funded_amount_inr": 494.1,
        "fee_inr": 5.9,
        "legs": [
          {
            "asset_type": "gold",
            "quantity_grams": 0.046893,
            "value_inr": 494.1,
            "transaction_id": "DREAM_TXN_…",
            "invoice_url": "https://api.oropocket.com/partner/invoice-view/DREAM_TXN_…?token=…"
          }
        ]
      }
    ],
    "pagination": { "page": 1, "limit": 20, "total": 3, "has_more": false }
  }
}

GET /partner/transactions/:id/invoice now takes a leg's transaction_id (the DREAM_TXN_… id on sip.installment legs, the activity feed and the list above) and answers with { invoice, view_url }: a tax invoice for that metal, built from what the debit recorded. A debit that bought gold and silver has one invoice per metal. The invoice has source: "sip_installment", sip { sip_id, id, installment_number, frequency }, quantity_grams and rate_inr_per_gram, the price per gram charged (GST excluded, your markup included). Its lines:

LineWhat it is
Metal24K gold, 999 or Silver, 999, with the grams and the price per gram: the metal value as the taxable value, and 3% GST on it.
Platform fee (x%)The SIP platform fee this debit was charged, with its rate. Absent when the fee was 0.
Payment gateway feeOnly when the customer bore the gateway fee: this metal's share of it.
RoundingPresent when the debit's separate roundings of the metal value and the GST to the paisa leave a difference, usually ₹0.01.

totals gives taxable_value, platform_fee, platform_fee_pct, cgst_pct, cgst_amount, sgst_pct, sgst_amount, gst_total, payment_gateway_fee, round_off and grand_total, which is the leg's share of the debit, its gateway fee included. In sandbox, a simulated debit's trd_test_… id gets the sandbox buy invoice, as before.

Withdraw or stop a SIP's holdings

New. A SIP's metal and its bitcoin cashback sit in the SIP's own wallet, apart from the customer's main wallet. /partner/sell sells main-wallet metal only, so SIP grams have to move to the main wallet before they can be sold. The portfolio shows both parts: gold_main_grams and silver_main_grams can be sold now, gold_sip_grams and silver_sip_grams are in SIPs (see Portfolio).

GET/partner/sips/:sip_id/stop-previewpayments
POST/partner/sips/:sip_id/withdrawpayments
POST/partner/sips/:sip_id/stoppayments

These work on SIPs created through POST /partner/payments/sips only. Any other SIP, including one made in your embed or the OroPocket app, is 404 SIP_NOT_FOUND, the same as an unknown id. The path takes 16176 or sip_16176. Both POSTs take no body and accept an Idempotency-Key header: the same key on the same SIP gets the first successful answer again, with idempotent_replay: true. Metal that moves is credited to what you can sell in the same step, so /partner/sell can sell it as soon as the call completes.

CallWhat it does
withdrawMoves all of the SIP's gold and silver and its cashback sats to the main wallet. The SIP keeps running and the mandate is untouched, so the next debit happens as planned. Milestone sats stay in the SIP. There is no partial amount and no fee. On a SIP that has already ended, withdraw settles it instead, and its unfinished milestone sats are forfeited.
stopCancels the mandate, then moves everything to the main wallet, as POST /partner/payments/sips/:id/cancel does (it is the same stop). Milestone sats are forfeited unless the SIP reached every milestone, in which case they move with the cashback. A SIP offer's bonus is forfeited if the SIP stops before the offer's minimum number of debits, and otherwise is credited to the main wallet shortly after the stop. Sends sip.cancelled (reason partner_cancelled) and sip.withdrawn.
stop-previewWhat stop would do right now, with nothing changed: the grams and sats that would move, and what would be forfeited or kept. It refuses exactly as stop would.
curl -X POST https://api.oropocket.com/partner/sips/sip_16176/withdraw \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Idempotency-Key: sip-16176-withdraw-1"
{
  "success": true,
  "request_id": "req_…",
  "mode": "live",
  "idempotent_replay": false,
  "data": {
    "sip_id": 16176,
    "id": "sip_16176",
    "status": "active",
    "withdrawn": [
      {
        "asset_type": "gold",
        "quantity_grams": 0.140679,
        "value_inr": 1399.76,
        "transaction_id": "DREAM_WITHDRAW_GOLD_16176_…"
      }
    ],
    "cashback_sats_withdrawn": 412,
    "milestone_sats_retained": 1000,
    "milestone_sats_forfeited": 0,
    "total_value_inr": 1399.76,
    "sip_still_running": true
  }
}
FieldTypeDescription
sip_id · idnumber · stringThe SIP, as a number and as "sip_" + that number. (On sip.* webhooks, id is the ppo_… id instead.)
statusstringThe SIP's status after the call (one of the SIP statuses above). Always "cancelled" after stop.
withdrawn[]arrayOne entry per metal moved: asset_type, quantity_grams, value_inr and, on withdraw and stop, transaction_id (the move's reference; treat it as opaque). value_inr is the grams at our sell rate at the moment of the move. Nothing is sold: the metal is still metal, now in the main wallet. Empty when no metal moved.
cashback_sats_withdrawnnumberBitcoin cashback sats moved to the main wallet, as a count.
total_value_inrnumberThe sum of withdrawn[].value_inr. Sats are not included.
milestone_sats_retainednumberwithdraw only. Milestone sats still in the SIP after the move.
milestone_sats_forfeitednumberwithdraw only. 0 on a running SIP; on a SIP that had already ended, the unfinished milestone sats the settlement forfeited.
sip_still_runningbooleanwithdraw only. false once the SIP has ended (cancelled, completed or failed).
mandate_cancelledbooleanstop only. true when no mandate can debit this SIP again: the provider's cancel went through, the mandate had already ended, or there was none. false when the provider's cancel failed, or the mandate was in a state this stop does not cancel. The SIP is stopped and its holdings moved either way; when it is false, ask the customer to revoke the AutoPay mandate in their UPI app.
mandate_will_be_cancelledbooleanstop-preview only. Whether stop would leave no mandate able to debit, assuming the provider's cancel succeeds.
forfeitedobjectstop and stop-preview. { milestone_sats, offer_bonus }: offer_bonus is { asset_type, quantity_grams, value_inr } or null.
keptobjectstop-preview only. { milestone_sats, offer_bonus }: milestone sats that move with the cashback because every milestone was reached, and an earned offer bonus that is credited shortly after the stop.
ErrorWhen
400 INVALID_SIP_IDThe id isn't 16176 or sip_16176.
404 SIP_NOT_FOUNDNot a SIP you created through POST /partner/payments/sips.
409 SIP_NOT_STOPPABLEstop and stop-preview. The SIP has already ended (details.status says how), or its mandate was never approved. In that case there is nothing to stop: details.cancel_endpoint names POST /partner/payments/sips/:id/cancel, which discards it.
409 NOTHING_TO_WITHDRAWwithdraw. The SIP's wallet is empty.
503 PRICE_UNAVAILABLELive prices can't be read right now. Nothing has moved and, on stop, the mandate has not been touched. Retry in a minute.

In sandbox, these act on the SIPs you created with a test key (the sandbox SIP's own number). Sandbox SIP debits are credited straight to the test user's sellable balance, so there is never anything in a SIP wallet: withdraw and stop-preview answer with an empty withdrawn, zeros and a note saying so. Stop is the sandbox cancel: an active or paused SIP becomes cancelled and sip.cancelled is sent with reason partner_cancelled. Sandbox sends no sip.withdrawn.

Selling SIP gold

To sell metal a customer holds in a SIP created through this API:

StepCall
1. Move itPOST /partner/sips/:sip_id/withdraw, or POST /partner/sips/:sip_id/stop if the customer also wants the SIP to end. withdrawn[].quantity_grams says how much moved.
2. QuotePOST /partner/sell/quote with the user_code, the asset_type and quantity_grams (or amount_inr). The quote is checked against the main wallet, which now holds the moved grams.
3. ConfirmPOST /partner/sell/confirm with the quote_id. Proceeds go to the customer's INR wallet, as on any sell.
# 1. Move the SIP's metal to the main wallet
curl -X POST https://api.oropocket.com/partner/sips/sip_16176/withdraw \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Idempotency-Key: sip-16176-withdraw-1"

# 2. Quote the sell
curl -X POST https://api.oropocket.com/partner/sell/quote \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"user_code":"usr_xxx","asset_type":"gold","quantity_grams":0.140679}'

# 3. Confirm it
curl -X POST https://api.oropocket.com/partner/sell/confirm \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: sell-16176-1" \
  -d '{"quote_id":"tqt_xxx"}'

Withdraw always moves the whole SIP wallet. Sell only what the customer asked for; the rest stays in their main wallet and stays sellable. A SIP made in your embed or the OroPocket app can't be moved through the API; when its holdings move some other way (the customer withdraws or stops it, or an ended SIP is settled), sip.withdrawn tells you, if the SIP came through you.

Sandbox

With an oro_test_ key, orders never touch a gateway: intent returns a sandbox UPI link that pays nobody, and the hosted page shows "Simulate" buttons instead of apps. Finish an order from the API with:

POST/partner/payments/orders/:payment_id/simulatepayments

Body { "outcome": "success" } or { "outcome": "failure" }. The response is the order, with fulfilment (and its transaction_id) on success. The matching webhooks fire with "mode": "sandbox" in their data — on success, buy.completed and then payment.completed, as in live.

POST/partner/payments/sips/:id/simulatepayments

Body { "outcome": "…" } (default "activate"). The response is the SIP.

outcomeWhat it does
activatepending_authorisation → active, and sip.activated. Otherwise 409 NOT_PENDING.
installmentOne debit on an active SIP: the funded amount is priced as a live debit is (the live rate, your SIP platform fee and your markup), the grams are credited to the test user's sellable balance, a trd_test_… buy is recorded, and sip.installment is sent in the live shape with the next installment_number. The debit shows in GET /partner/sips, GET /partner/sips/:sip_id/installments and on /partner/transactions/all as a sip_installment row. Otherwise 409 NOT_ACTIVE; 503 PRICE_UNAVAILABLE if live prices can't be read.
cancelNew. The customer revoking the mandate: active or paused → cancelled, and sip.cancelled with reason customer_cancelled. Otherwise 409 NOT_ACTIVE.
failurepending_authorisation → failed, and sip.mandate_failed. Otherwise 409 NOT_PENDING.

Any other outcome is 400 INVALID_OUTCOME.

Errors

CodeMeaning
403 PAYMENT_INFRA_NOT_ENABLEDPayment collection is not on for your account.
503 PAYMENT_INFRA_DISABLEDCollection is paused platform-wide. Retry later.
503 PAYMENT_GATEWAY_UNAVAILABLENo gateway is available right now. Retry later.
503 UPI_INTENT_UNAVAILABLEIntent checkout is temporarily unavailable. Create the order with checkout_type "hosted" instead — it always works. Nothing was charged.
400 INVALID_CHECKOUT_TYPE · INVALID_AMOUNT · INVALID_ASSET_TYPEFix the field named in the message.
400 AMOUNT_BELOW_MIN · AMOUNT_ABOVE_MAXOutside your per-transaction limit, a one-off order above ₹1,00,000, or a SIP instalment above ₹99,000.
400 RETURN_URL_NOT_ALLOWEDRegister the origin under Payments → Checkout first.
404 USER_CODE_NOT_FOUNDRegister the customer with POST /partner/users/init.
409 SIP_LIMIT_REACHEDThe customer already has the most SIPs allowed. They can stop one first.
404 SIP_NOT_FOUNDNo SIP with that id is yours. Withdraw, stop and stop-preview also answer this for a SIP not created through POST /partner/payments/sips.
409 SIP_NOT_CANCELLABLEThe SIP is already cancelled, completed, or closed as failed.
409 SIP_NOT_STOPPABLEPOST /partner/sips/:sip_id/stop and its preview: the SIP has already ended, or was never approved (details.cancel_endpoint then names the cancel call).
409 NOTHING_TO_WITHDRAWPOST /partner/sips/:sip_id/withdraw: the SIP's wallet is empty.
503 PRICE_UNAVAILABLELive prices can't be read (sandbox installment simulate, SIP withdraw, stop and stop-preview). Nothing has changed; retry in a minute.
400 INVALID_SIP_ID · INVALID_STATUSGET /partner/sips and the /partner/sips/:sip_id/… calls: the id isn't a number (16176 or sip_16176), or a status filter value isn't a SIP status or all.
409 DUPLICATE_REFERENCEAn order with this reference exists; details.payment_id names it.
502 GATEWAY_ERRORThe gateway could not create the order. Nothing was charged; retry with a new Idempotency-Key.