DORIC · How-to guidePreview

Create and manage an account

Provision an account for an approved owner, retry safely and preserve the canonical account representation.

Audience
Developer, Solution architect, Operator
Owner
DORIC accounts
Last reviewed
Jul 19, 2026
Reading time
14 min
On this page

Create the account

  1. 01

    Choose a stable idempotency key

    Derive a unique key from the business operation rather than generating a new value for every network retry.

  2. 02

    Submit the account request

    Provide the approved owner and one uppercase settlement currency.

    bash
    curl --request POST \
      --url "$DTCOM_BASE_URL/accounts" \
      --header "Authorization: Bearer $DTCOM_ACCESS_TOKEN" \
      --header "Content-Type: application/json" \
      --header "Idempotency-Key: account-customer-123-usd" \
      --data '{
        "ownerId": "customer_123",
        "currency": "USD"
      }'
  3. 03

    Persist the canonical response

    Use the returned account ID for subsequent reads and payment workflows. Do not construct resource IDs in the client.

  4. 04

    Handle uncertain outcomes

    If the connection fails after submission, retry the identical request with the same idempotency key before creating another business operation.

Account integration controls

  • Validate owner identifiers before submitting the request.
  • Use a separate account per settlement currency.
  • Treat frozen and closed states as explicit workflow conditions.
  • Record the request ID and idempotency key with the originating business operation.
  • Reconcile the stored account representation with authoritative reads.

Continue learning

Related documentation