Skip to Content
OpenRoam Docs
Wallets

Update a wallet

Renames a wallet or changes its low-balance threshold.

PATCH
/v1/wallets/{id}

Renames a wallet or changes its low-balance threshold.

Only the members in the body change; a member left out keeps its value. Send at least one member: an empty body returns 400 with code 10001 and REQUIRED at $. label cannot be null or blank (INVALID_VALUE at label); lowBalanceThreshold: null clears the threshold. The wallet id comes from the route only: any other member, such as walletId, returns 400 with code 10001 at its path. A label already used by another of the partner's wallets, ignoring case, returns 400 with code 17001 (WALLET_LABEL_ALREADY_EXISTS); an unknown wallet returns 404 with code 10004.

Authorization

PartnerApiKey
headerX-Partner-Key<token>

Partner API Key (X-Partner-Key)

Path Parameters

id*string

Wallet id.

Formatuuid

Request Body

The members to change.

  1. body

The changes to a wallet. A member left out keeps its value; send at least one member. The wallet id comes from the route only.

label?|

New display name, unique among the partner's wallets ignoring case. Leave it out to keep the current label; it cannot be null or blank.

lowBalanceThreshold?|

New low-balance threshold in the wallet's currency, with at most that currency's ISO 4217 decimals (INVALID_VALUE at lowBalanceThreshold otherwise, whose message names the decimals allowed, such as An amount in JPY cannot have decimals.). When it is above zero, the partner.balance.low webhook reports the balance falling toward and below it. Leave it out to keep the current threshold; send null to clear it.

Formatdecimal

Response Body

No Content

Example Request
curl -X PATCH 'https://api.sandbox.openroam.com/v1/wallets/01a1432e-7121-7b0e-a0a0-c35454d3b883' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
Empty

Transfer between wallets POST

Moves funds from one of the partner's wallets to another, converting between their currencies. `amount` is in the source wallet's currency and has at most that currency's ISO 4217 decimals (none in `KRW` or `JPY`, three in `KWD`, two in most); more decimals return `400` with code `10001` and `INVALID_VALUE` at `amount`, whose `message` names the decimals allowed, such as `An amount in JPY cannot have decimals.` The destination receives the amount converted at the current rate, rounded to its own currency's decimals. Returns the `transferId`, the sent and received amounts and currencies, the `conversionRate` and the `transferDate`. Both wallets record an `exchange` transaction. The two wallets must differ, and the amount must be above zero; otherwise the call returns `400` with code `10001`. An unknown wallet returns `404` with code `10004`. A source wallet that cannot pay the amount now returns `409` with code `10005` (`CONFLICT`) and `details[0] = { path: "fromWalletId", reason }`: `INSUFFICIENT_BALANCE` when its balance is too low, `WALLET_BLOCKED` while its spending is blocked. The same request can succeed once that changes. Requires an `Idempotency-Key` header (a UUID). Repeating a completed transfer with the same key and body returns `200` with that transfer, the same `transferId` and amounts, and moves no money again. One still running returns `409` with code `12002` (`IDEMPOTENCY_KEY_IN_PROGRESS`) and a `Retry-After` header, and a different body with the same key `409` with code `12001`. A request that ended in an error can be sent again with the same key and body.

List currencies GET

Lists every supported currency with its current rate to USD. Returns `{ currencies }`, the whole list without paging. Use a currency's `code` wherever a request takes a `currency`, and its `id` as `currencyId` when creating a wallet. `rateToUsd` is the USD value of one unit of the currency, as of `rateDate`.