Retrieve the account of the credential

GET
/v1/account

Who the credential is: the account it belongs to, the environment that answered (sandbox or live) and the credential itself, without its secret. Use it to check a key and to show which account and environment a client is working in. The credential is an API key: there are no user identities (people, roles, single sign-on) yet, so nothing here describes a person.

Autorización

apiKey
headerAuthorizationBearer <clave>

Your secret API key, sent as Authorization: Bearer <key>. A key names its environment: psp_test_… works only against sandbox (https://api-sandbox.caibopay.app), psp_live_… only against live (https://api.caibopay.app). Keys are issued by Caibo when your account is opened; the dashboard (Developers) shows the key in use.

Cuerpo de la respuesta

OK

application/json
  1. response
created_at*string

When the account was created.

Formatodate-time
credential*
environment*string

The environment that answered. Sandbox and live are separate deployments with separate data and keys.

Valor en"sandbox""live"
id*string

The id of the account.

Match^acct_[0-9a-z]+$
name*string

The account's name.

primary_treasury_asset*string

The asset the account's balances are held in and payouts fund from (USDT unless the deployment says otherwise). Money in other assets is the account's too; GET /v1/balances marks the balance in this asset as primary.

status*string

The account's status. Only an active account's credentials are accepted, so this is active whenever it can be read.

Valor en"active""suspended""closed"
Ejemplo de solicitud
curl -X GET 'https://api-sandbox.caibopay.app/v1/account'
Ejemplo de respuesta
{  "created_at": "2019-08-24T14:15:22Z",  "credential": {    "created_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "id": "string",    "label": "string",    "prefix": "string",    "scopes": [      "read"    ],    "type": "api_key"  },  "environment": "sandbox",  "id": "string",  "name": "string",  "primary_treasury_asset": "string",  "status": "active"}