> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundtech.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Handle asynchronous gtoken operations

> Track API submissions, onchain requests, confirmations, processing, and claims without losing state.

gtoken integrations have two independent asynchronous boundaries: Ground API
mutations that submit onchain administration transactions, and vault operations
whose underlying RWA settlement completes later.

## Keep the state layers separate

| Layer | Durable evidence | Complete when |
| - | - | - |
| API request | gVault ID, requested change and customer address when applicable | Ground accepts or rejects the request |
| Transaction submission | `transactionHash` | The transaction confirms successfully |
| Effective access | `allowed` from a read endpoint | The address has the desired effective state |
| Vault request | Onchain `requestId` plus transaction hash | The request can be claimed or is terminal |
| Asset settlement | Claim receipt and balance change | Assets or shares reach the intended address |
| Webhook delivery | `Ground-Event-Id` | Your handler processes the event idempotently |

A `202` response or transaction hash is not final confirmation. A confirmed
request transaction is not the same as completed RWA settlement.

## Contract readiness

After Ground starts provisioning, deployment and underlying vault admission run
automatically. Ground verifies the fee configuration and vault access before
returning your contracts through `GET /v3/gvaults`. Production
requires agreed commercial fees and Ground to enable your organization's access.
Track fee updates through `GET /v3/gvaults/{gVaultId}`: `fees` reports the
confirmed configuration and `feeUpdate` reports the latest operation.

## Access and fee updates

When an allowlist or fee mutation returns `submitted`, retain its transaction
hash and poll the associated read endpoint or consume the status-change webhook.
Before retrying after a timeout, read the current resource to avoid submitting a
duplicate or contradictory change.

When a fee update is `awaiting_approval`, use its `activityId` and your registered
signing key with the [approval API](https://docs.groundtech.co/v3/docs/portfolio-wallets/transaction-approvals.md#approving-an-activity).
Polling alone does not authorize the change. Automatic updates and approved
requests remain `submitting` while the signing provider prepares the broadcast;
no customer approval is needed in that state.

## Mutation statuses

| Status | Meaning |
| - | - |
| `preparing` | Ground is preparing the fee change and signing request |
| `awaiting_approval` | Your configured signer approvals are required before submission |
| `queued` | Ground has recorded the fee request; submission has not started |
| `submitting` | Ground is preparing or recovering the fee transaction |
| `submitted` | Ground broadcast an onchain transaction, but its requested state is not yet confirmed |
| `confirmed` | The requested state is effective onchain |
| `failed` | The transaction or resulting state change reached a terminal failure |

Do not infer `confirmed` from elapsed time. Read the resource, verify the
transaction receipt and resulting onchain state, or process the confirming
webhook.

## Onchain request/claim flows

Persist the contract address, chain ID, owner, transaction hash, returned
onchain request ID, requested amount, and minimum-output parameters. Use onchain
state or a successful call simulation to determine whether a claim is ready.
An estimated settlement time does not prove a claim is ready.

For a claim, reconcile all three facts:

1. The claim transaction succeeded.
2. The expected assets or shares moved to the intended address.
3. Your local operation record is marked terminal exactly once.

See [Integrate gtoken webhooks](https://docs.groundtech.co/v3/docs/gtokens/webhooks.md) for event payloads and
delivery statuses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.