Retrieve balance
Retrieves the current balance information for your account. Shows total balance, transferable amount, and reserve amounts in the account's primary currency.
Request Parametersโ
No parameters required for this endpoint.
Responsesโ
200
Successful requestReturns the balance object with current account balance information.
Balance object contains:
object- String value "balance"livemode- Boolean indicating live or test modelocation- API endpoint path "/balance"currency- Three-letter ISO 4217 currency codetotal- Total balance after deducted fees (in smallest currency unit)transferable- Amount available for transfer to bank accountsreserve- Amount reserved (not yet available)on_hold- Amount currently on holdcreated_at- ISO 8601 timestamp
- All amounts in smallest currency unit (satangs for THB, cents for USD, yen for JPY)
- Total = Transferable + Reserve + On Hold
- Transferable amount can be used for creating transfers
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
- Incorrect HTTP Basic Auth format
5xx
Server errorServer-side error occurred. These are rare but should be handled gracefully.
How to handle:
- Retry the request with exponential backoff
- Check status.omise.co for service incidents
- See Error Handling for detailed guidance
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/balance \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
balance = Omise::Balance.retrieve
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
balance = omise.Balance.retrieve()
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const balance = await omise.balance.retrieve();
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$balance = OmiseBalance::retrieve();
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
Balance balance = client.balance().get();
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var balance = await client.Balance.Get();
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
balance, _ := client.Balance().Get()
API Credentials
Try it outโ
Your IP:
...Loading...