_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Stack
_Modules
  • Ledger
  • Numscript
  • Connectivity
  • WalletsEE
    • Prerequisites
    • Basic wallet operations
    • Managing holds
    • Creating Wallets
    • Adding funds
    • Spending funds
    • Holding and confirm
  • FlowsEE
  • ReconciliationEE
  1. Modules
  2. Wallets
  3. Holding and confirm
Wallets

Holding and confirm

In some cases you want to reserve funds before confirming the debit — for example, holding funds while an order is being shipped, then confirming once it's delivered.

Create a hold#

Issue a debit with pending: true to create a hold. The funds are reserved but not yet spent:

fctl wallets debit <WALLET_ID> <amount> <asset>
POST/api/wallets/wallets/<WALLET_ID>/debit

The response includes a hold field with the hold ID. Use this ID to confirm or void the hold.

Confirm the hold#

Once the event is confirmed (e.g. order shipped), confirm the hold to finalize the debit:

fctl wallets holds confirm <HOLD_ID>
POST/api/wallets/holds/<HOLD_ID>/confirm

Void the hold#

If the event doesn't happen (e.g. order cancelled), void the hold to release the funds back to the wallet:

fctl wallets holds void <HOLD_ID>
POST/api/wallets/holds/<HOLD_ID>/void

Partial confirmation#

You can confirm only part of a hold. For example, if you held 1.00butonlyneedtocharge1.00 but only need to charge 1.00butonlyneedtocharge0.75:

fctl wallets holds confirm <HOLD_ID>
POST/api/wallets/holds/<HOLD_ID>/confirm

The remaining $0.25 is automatically released back to the wallet when final: true is set.

Without final: true, partial confirmations leave the hold open — you can confirm additional amounts later until you finalize it.

Spending fundsFlows
On This Page
  • Create a hold
  • Confirm the hold
  • Void the hold
  • Partial confirmation