PaymentFiat Account

Create a fiat account

POST
/openapi/v1/fiat-accounts

Create a fiat account. The request format depends on the provider: LEGEND uses application/json, and GLDB uses multipart/form-data.

LEGEND

  • Idempotency-Key is required.
  • On synchronous success, the standard account is returned directly, and the status can be ACTIVE. If PENDING is returned, query the account detail.
  • If fiat.account.channel.detail_unavailable is returned, query with the account ID in the message. Do not open the account again.
  • A request body with undefined fields is rejected.

GLDB

  • Do not send Idempotency-Key. If you send it, fiat.account.idempotency_key.unsupported is returned.
  • currency accepts only one currency. Multi-currency applications are not supported.
  • Account opening requires manual review. Create returns PENDING, and accountId is the application number. Use it to poll the account detail. After approval, the status changes to ACTIVE.
  • No Webhook is sent for status changes.

If you send a field that belongs to the other provider, fiat.account.field.unsupported is returned. If a field that this provider requires is missing, fiat.account.field.required is returned.

Authorization

bearerAuth
headerAuthorizationBearer <token>

The access_token obtained from POST /oauth2/token. Header format: Authorization: Bearer {accessToken}.

Header Parameters

X-Channel-Provider*string

Provider identifier, such as GLDB

Idempotency-Key?string

Unique request identifier (UUID recommended). Required for LEGEND. For the rules, see the Payment product guide. Do not send it for GLDB. If you send it, fiat.account.idempotency_key.unsupported is returned.

Request Body

  1. body

LEGEND account opening request (application/json).

providerCustomerId?string

Customer identifier on the provider side, supplied by the caller. Required for LEGEND; it is the user_short_id.

currency*string

ISO 4217 currency code, 3 uppercase letters.

bankCountry?string

ISO 3166-1 alpha-2 country code, 2 uppercase letters.

alias?string

Account alias. Letters, digits, spaces, and hyphens only. Up to 50 characters.

openingOptionId?string

Opening option ID from the opening options query. If omitted, the provider chooses the route.

Response Body

Returns the account detail. For LEGEND, status can be ACTIVE on synchronous success. GLDB returns PENDING with only accountId (the application number), currency, status, and accountHolderName.

application/json
  1. response
code?integer

Business status code

message?string
traceId?string

Request trace ID. Provide it when you contact technical support

data?

Fiat account detail.

Example Request
curl -X POST 'https://api.test.stabofx.com/openapi/v1/fiat-accounts' \  -H 'X-Channel-Provider: GLDB' \  -H 'Content-Type: application/json' \  -d '{  "providerCustomerId": "usr_user123",  "currency": "USD",  "bankCountry": "SG",  "alias": "Main USD Account",  "openingOptionId": "brt_abcdefghijklmnopqrstuvwxyz"}'
Example Response
{  "code": 200,  "message": "OK",  "traceId": "t_xxxxxxxx",  "data": {    "accountId": "bnk_abc123",    "providerCustomerId": "usr_user123",    "currency": "USD",    "status": "PENDING",    "alias": "Main USD Account",    "bankCountry": "SG",    "bankName": "DBS Bank",    "swiftBic": "DBSSSGSG",    "accountNumber": "072001234",    "routingCodes": [      {        "type": "ROUTING_NUMBER",        "value": "123456789"      }    ]  }}