Skip to main content
POST
/
api
/
wallets
/
wallets
/
{id}
/
debit
Debit a wallet
curl --request POST \
  --url http://localhost/api/wallets/wallets/{id}/debit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": {
    "asset": "USD/2",
    "amount": 100
  },
  "metadata": {
    "key": ""
  },
  "pending": true
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "walletID": "<string>",
    "metadata": {},
    "asset": "<string>",
    "description": "<string>",
    "destination": {
      "type": "<string>",
      "identifier": "<string>"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.formance.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Idempotency-Key
string

Use an idempotency key

Path Parameters

id
string
required

Body

application/json
amount
object
required
metadata
object
required

Metadata associated with the wallet.

pending
boolean

Set to true to create a pending hold. If false, the wallet will be debited immediately.

description
string
destination
object
balances
string[]

A targeted balance (use '*' for all)

timestamp
string<date-time>

cannot be used in conjunction with pending property

Response

Wallet successfully debited as a pending hold

data
object
required