Retrieve Chain Account
Retrieve the account information for a chain connection. Returns details about the sub-merchant account associated with this chain, including business information and account status.
Request Parametersโ
Required - 1 fieldPath Parameters
`id`STRING(required)
Chain identifier matching pattern /acch(_test)?_[0-9a-z]+/. This is provided in the URL path.
Responsesโ
200
Successful retrievalChain account retrieved successfully. Returns the complete account object with business and verification details.
Response includes:
id- Account identifieremail- Account email addressteam- Team name associated with the accountcurrency- Default currency for the accountsupported_currencies- List of supported currenciescreated_at- Account creation timestamp
400
Bad requestRequest validation failed. Check the error message for details.
Common causes:
- Invalid chain ID format
- Malformed request
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
404
Not foundChain or account not found with the provided ID.
Common causes:
- Invalid chain ID format
- Chain does not exist
- Chain belongs to different account
- Using test key with live chain ID (or vice versa)
- Chain has been revoked
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/chains/acch_test_5xuy4w91xqz7d1w9u0t/account \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
chain = Omise::Chain.retrieve('acch_test_5xuy4w91xqz7d1w9u0t')
account = chain.account
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
chain = omise.Chain.retrieve('acch_test_5xuy4w91xqz7d1w9u0t')
account = chain.account()
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const account = await omise.chains.retrieveAccount('acch_test_5xuy4w91xqz7d1w9u0t');
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$chain = OmiseChain::retrieve('acch_test_5xuy4w91xqz7d1w9u0t');
$account = $chain->account();
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
Account account = client.chains().getAccount("acch_test_5xuy4w91xqz7d1w9u0t");
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var account = await client.Chains.GetAccount("acch_test_5xuy4w91xqz7d1w9u0t");
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
account, _ := client.Chains().GetAccount("acch_test_5xuy4w91xqz7d1w9u0t")
Error and result codesโ
Common Error Codesโ
| Code | Description | Resolution |
|---|---|---|
authentication_failure | Invalid API key | Verify your secret key is correct |
not_found | Chain or account not found | Check chain ID is correct and exists |
invalid_chain_id | Malformed chain ID | Ensure ID matches format acch(test)?[0-9a-z]+ |
chain_revoked | Chain access has been revoked | Cannot access account for revoked chains |
Account Object Fieldsโ
| Field | Type | Description |
|---|---|---|
object | string | Always returns "account" |
id | string | Unique account identifier |
email | string | Account email address |
team | string | Team name associated with the account |
currency | string | Default currency for the account (e.g., "thb") |
supported_currencies | array | List of currencies supported by this account |
livemode | boolean | Production vs test environment indicator |
created_at | string | Account creation timestamp (ISO 8601) |
API Credentials
Try it outโ
Your IP:
...Loading...