Reference

Bank accounts & withdrawals

Register a payout destination for an end user, then move INR out of OroPocket into it.

Two capabilities are involved and they are granted separately: bank manages payout destinations, and withdraw moves money. A token can hold one without the other.

List bank accounts

GET/partner/users/:user_code/bank-accountsbank
curl https://api.oropocket.com/partner/users/usr_xxx/bank-accounts \
  -H "Authorization: Bearer oro_live_xxx"

Returns the user's user_code plus a bank_accounts array. Each entry:

FieldTypeDescription
idnumberPass this as bank_account_id when creating a withdrawal.
accountHolderNamestringName on the account, as submitted.
accountTypestring"savings" or "current".
accountNumberstringMASKED account number — only the last 4 digits are visible. The full number is never returned.
ifscCodestringIFSC code, upper-cased.
bankNamestringResolved from the IFSC — you don't submit it.
branchNamestringAlso resolved from the IFSC.
upiIdstring | nullUPI handle, when one was supplied.
isVerifiedbooleanWhether the account has passed verification.
isPrimarybooleanThe user's default payout account.
statusstringActive/inactive state of the account record.
createdAtstringISO-8601 timestamp.
Account numbers are always masked on the Partner API. The full number is never returned, on any endpoint, in either mode — so don't design a UI that expects to echo it back.

Add a bank account

POST/partner/users/:user_code/bank-accountsbank

Submit the holder name, account type, account number and IFSC. The bank and branch are resolved from the IFSC for you. A UPI handle can be stored alongside.

FieldTypeDescription
account_holder_namestringrequiredName on the bank account. 2–100 characters.
account_typestringrequiredEither "savings" or "current".
account_numberstringrequired8–20 digits.
ifsc_codestringrequired11-character IFSC in the form ABCD0123456 (4 letters, a zero, then 6 alphanumerics), upper or lower case. bank_name and branch are auto-resolved from it.
upi_idstringoptionalOptional UPI handle, e.g. anya@okhdfcbank, at most 50 characters, stored alongside the account.
curl -X POST https://api.oropocket.com/partner/users/usr_xxx/bank-accounts \
  -H "Authorization: Bearer oro_live_xxx" \
  -d '{
    "account_holder_name": "Anya Sharma",
    "account_type": "savings",
    "account_number": "50100123456789",
    "ifsc_code": "HDFC0000123"
  }'
Response
{
  "success": true,
  "data": {
    "user_code": "usr_xxx",
    "bank_account": {
      "id": 4821,
      "accountHolderName": "Anya Sharma",
      "accountType": "savings",
      "accountNumber": "**********6789",
      "ifscCode": "HDFC0000123",
      "bankName": "HDFC Bank",
      "branchName": "Banjara Hills",
      "upiId": null,
      "isVerified": false,
      "isPrimary": true,
      "createdAt": "2026-08-08T09:22:00.000Z"
    }
  }
}

A bank account that OroPocket has blocked can't be added, for this user or any other, and neither can the same account with leading zeros or under another branch's IFSC. The call fails with 403 BANK_ACCOUNT_BLOCKED: ask the user for a different account.

Other refusals name the field in error.details.field: 400 INVALID_ACCOUNT_HOLDER_NAME, INVALID_ACCOUNT_TYPE, INVALID_ACCOUNT, INVALID_IFSC (the message says what is wrong, such as the length) and INVALID_UPI. An account the user already has is 409 DUPLICATE_ACCOUNT, one linked to another OroPocket user is 409 DUPLICATE_ACCOUNT_OTHER_USER, and a UPI handle already added is 409 DUPLICATE_UPI. Sandbox takes the same body and answers in the same shape; any IFSC in the right format works there, and the only duplicate it refuses is an account number the user already has.

Remove an account

DELETE/partner/users/:user_code/bank-accounts/:idbank

The account is deactivated, not erased — it drops out of the list immediately and can no longer be used as a withdrawal destination, but past withdrawals keep pointing at the account they actually paid out to. Scoped to the user in the path, so you cannot deactivate an account belonging to someone else; an id that isn't theirs returns 404 BANK_ACCOUNT_NOT_FOUND.

curl -X DELETE https://api.oropocket.com/partner/users/usr_xxx/bank-accounts/4821 \
  -H "Authorization: Bearer oro_live_xxx"
Removing the primary account does not promote another one. If the user has other accounts, set the one you want as primary before removing the old one, or their next withdrawal has no default destination.

Create a withdrawal

POST/partner/users/:user_code/withdrawalswithdraw
FieldTypeDescription
amount_inrnumberrequired₹100 minimum, ₹5,00,000 maximum per transaction. A JSON number or a plain decimal string such as "2500.50".
bank_account_idnumberrequiredThe id of one of this user's active bank accounts, from GET …/bank-accounts. A JSON number or a string of digits.

Withdrawals require approved KYC. If the user hasn't finished verification the call fails with 403 KYC_REQUIRED — run them through the KYC endpoints first. Buys, sells and receiving gifts have no such requirement.

curl -X POST https://api.oropocket.com/partner/users/usr_xxx/withdrawals \
  -H "Authorization: Bearer oro_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"amount_inr": 2500, "bank_account_id": 4821}'
This endpoint does not honour Idempotency-Key. Every call that succeeds creates a new withdrawal. If a request times out or you are unsure whether it went through, read GET /partner/users/:user_code/withdrawals first and resubmit only if the withdrawal is not there.

The response carries the user's code and a withdrawal object. In sandbox, data also carries simulated: true.

FieldTypeDescription
transaction_idstringReference for this payout: INR_WD_… in live, wd_test_… in sandbox. Treat it as an opaque string: live ids made from 25 Nov 2026 are INR_WD_ + a base-36 time + _ + 16 hex characters, and older ones keep their earlier form. Quote it in support requests.
amount_inrnumberGross amount requested.
bank_account_idnumberDestination account.
statusstringAlways "pending" at creation. It moves on asynchronously — listen on the withdrawal.* webhooks rather than polling.
created_atstringISO-8601 timestamp.
withdrawal_idstringNew. The same string as transaction_id, and the id that GET …/withdrawals rows and every withdrawal.* webhook carry in withdrawal_id. Key on this.
fee_inrnumberNew. Payout fee taken from amount_inr (0 at present).
net_amount_inrnumberNew. What reaches the bank account: amount_inr − fee_inr.
success · message · datadeprecatedLive only. The keys this object carried before 24 Nov 2026: success (true), message, and data, an internal object with camelCase keys (transactionId, withdrawalId, amountInr, feeInr, netAmountInr, bankAccount, status, createdAt). They will be removed in a future version. Read the snake_case fields above instead. data.withdrawalId is null since 25 Nov 2026 (it was an internal number, never the withdrawal's id).
Response · 200
{
  "success": true,
  "request_id": "req_…",
  "mode": "live",
  "data": {
    "user_code": "usr_xxx",
    "withdrawal": {
      "transaction_id": "INR_WD_…",
      "amount_inr": 2500,
      "bank_account_id": 4821,
      "status": "pending",
      "created_at": "2026-11-24T08:15:02.000Z",
      "withdrawal_id": "INR_WD_…",
      "fee_inr": 0,
      "net_amount_inr": 2500,
      "success": true,
      "message": "INR withdrawal request submitted successfully. Admin will process your request.",
      "data": {
        "transactionId": "INR_WD_…",
        "withdrawalId": null,
        "amountInr": 2500,
        "feeInr": 0,
        "netAmountInr": 2500,
        "bankAccount": {
          "accountHolderName": "Anya Sharma",
          "accountNumber": "**********6789",
          "ifscCode": "HDFC0000123",
          "bankName": "HDFC Bank"
        },
        "status": "pending",
        "createdAt": "2026-11-24T08:15:02.000Z"
      }
    }
  }
}

The last three keys of withdrawal (success, message, data) are the deprecated ones. Sandbox never sends them.

Withdrawal refusals

A refusal is an HTTP error in the standard error envelope, and nothing is created. Sandbox answers with the same codes, statuses and bodies, except SERVICE_RESTRICTED and BANK_ACCOUNT_BLOCKED, which don't arise there.

CodeWhen
403 SERVICE_RESTRICTEDOroPocket has switched withdrawals off for this user (details.service is "withdraw"). Show error.message. Don't retry.
403 KYC_REQUIREDThe user's KYC is not approved.
400 INVALID_AMOUNTamount_inr is missing, not a number, below ₹100 or above ₹5,00,000. details.field is "amount_inr".
400 INVALID_BANK_ACCOUNT_IDbank_account_id is missing or not a positive whole number. details.field is "bank_account_id".
404 BANK_ACCOUNT_NOT_FOUNDbank_account_id is not an active account of this user: someone else's, removed, or unknown. details.field is "bank_account_id".
403 BANK_ACCOUNT_BLOCKEDThe bank account has been blocked. Ask the user to add a different one.
400 INSUFFICIENT_BALANCEMore than the user's withdrawable INR (the message gives what is available and what was asked), or more than the INR held through your integration (see the warning below).
Response · 400
{
  "success": false,
  "request_id": "req_…",
  "mode": "live",
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Insufficient balance. Available: ₹40.00, Required: ₹2500.00",
    "details": {
      "withdrawal": { "success": false, "message": "Insufficient balance. Available: ₹40.00, Required: ₹2500.00" }
    }
  },
  "data": {
    "user_code": "usr_xxx",
    "withdrawal": { "success": false, "message": "Insufficient balance. Available: ₹40.00, Required: ₹2500.00" }
  }
}
Changed on 24 Nov 2026. Live used to answer the amount, bank-account and balance refusals with HTTP 200, success: true and a data.withdrawal of { "success": false, "message": … }. Treat any non-2xx status, or a top-level success: false, as a refusal, and branch on error.code. As a transition, the four refusals that used to be 200s — INVALID_AMOUNT, INVALID_BANK_ACCOUNT_ID, BANK_ACCOUNT_NOT_FOUND and INSUFFICIENT_BALANCE for the user's balance — still carry that old object, in data.withdrawal and in error.details.withdrawal, so a parser that reads data.withdrawal.success keeps working. That object is transitional and will be removed with the deprecated success keys. The 403s, the sub-wallet INSUFFICIENT_BALANCE and a 500 have no data.
Withdrawals are validated against your sub-wallet claim, not the user's whole OroPocket balance. A user may hold plenty overall and still be rejected because only part of it came in through your integration — see Sub-wallets.

List withdrawals

GET/partner/users/:user_code/withdrawalswithdraw
FieldTypeDescription
limitnumberoptionalPage size, 1–100. Defaults to 20; a value outside the range or not a number falls back to 20 (over 100 becomes 100).
offsetnumberoptionalZero-based count of rows to skip. Defaults to 0. There is no cursor or page number.

Returns user_code, a withdrawals array and a pagination object. Rows are ordered newest first by created_at, with ties broken by an internal id, so the order is stable. Sandbox and live return the same fields. Each row:

FieldTypeDescription
withdrawal_idstringThe withdrawal's id — the same value the withdrawal.* webhooks carry in data.withdrawal_id. Key on this.
transaction_idstringThe same value as withdrawal_id.
amount_inrnumberGross amount requested.
fee_inrnumberPayout fee.
net_amount_inrnumberWhat reaches the bank account.
statusstring"pending", "processing", "completed", "failed" or "cancelled".
bank_account_idnumber | nullDestination account.
refundedbooleantrue for failed and cancelled withdrawals: the amount went back to the user's INR balance.
failure_reasonstring | nullSet on failed and cancelled withdrawals, when a reason was recorded.
utrstring | nullBank reference, set once completed.
created_atstringISO-8601 timestamp.
completed_atstring | nullSet once completed.
updated_atstringLast status change.

pagination is { total, limit, offset, has_more }. total counts every withdrawal the user has, whatever its status; nothing is dropped from the history. You have read to the end when has_more is false. An offset past the end returns an empty array with has_more: false.

curl "https://api.oropocket.com/partner/users/usr_xxx/withdrawals?limit=20&offset=0" \
  -H "Authorization: Bearer oro_live_xxx"
Offsets count from the newest withdrawal, so a withdrawal created while you page shifts later pages by one. De-duplicate on withdrawal_id, and to recover statuses read from offset 0 until you reach rows you already hold in a final state. The withdrawal.* webhooks tell you about each change as it happens.

Sandbox behaviour

In sandbox the payout rail is simulated but the state machine is real. Sandbox KYC has to be approved first, which the magic PAN and Aadhaar values make instant, and bank_account_id must be one of this sandbox user's accounts (add one with POST …/bank-accounts using a test key), or the call fails with 404 BANK_ACCOUNT_NOT_FOUND. The response has the same fields as live, without the deprecated keys, and every withdrawal starts pending.

AmountWhat happens
paise ending .01Created pending, then fails within about 2 minutes, or at your next GET …/withdrawals if that comes first. The amount goes back to the user's test INR balance and withdrawal.failed fires with failure_reason "sandbox_test_amount" and refunded: true. 2500.01 exercises your failure path on demand.
anything elseCompletes once it is about 2 minutes old: at the next sweep (they run every 2 minutes) or at a GET …/withdrawals after that. withdrawal.completed fires.

withdrawal.pending fires at creation in both cases. A sandbox balance that is too low is 400 INSUFFICIENT_BALANCE, as in live (it used to be INSUFFICIENT_USER_BALANCE).