Skip to main content

Step 6: make a budget transfer

Now that you have at least two budgets and have funded them, you can transfer funds from one budget to another. You’ll need to provide the source budget’s ID in the path itself, and the destination budget’s ID in the body of the request. In this example, we’re transferring 20 USD from a source budget A to a destination budget B.
curl -i -X POST 'https://api-sandbox.equalsmoney.com/v2/budgets/{budgetIdA}/transfer?accountId={accountId}' \ # The ID of your source budget and your account ID
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "destinationBudgetId": "{budgetIdB}", # Your destination budget's ID
    "currency": "USD",
    "amount": "20"
  }'
If your request is successful, you’ll receive a 200 response showing success as true and including a debitBoxTransactionId and creditBoxTransactionId.
{
  "success": true,
  "debitBoxTransactionId": 179032,
  "creditBoxTransactionId": 179033
}
You’ll also receive a BoxDebited webhook for your source budget and a BoxCredited webhook for your destination budget.
{
  "body": {
    "accountId": "F67104",
    "boxTransactionId": 8622112,
    "budgetId": "42082c6b-4ab2-4bf6-b71f-287ge74a66c3",
    "budgetName": "Marketing",
    "identification": "5***",
    "institutionAddress": null,
    "institutionBic": "231884",
    "orderId": "E7PD93VMX3MC",
    "paymentMethod": "UK.OBIE.BalanceTransfer",
    "reference": "REF 123456",
    "schemeName": "UK.OBIE.SortCodeAccountNumber",
    "settlementPriceAmount": 40000,
    "settlementPriceCurrency": "USD",
    "source": "orders",
    "ledgerBalance": "19.99",
    "sequentialId": "10",
    "valueDateTime": "2024-04-30T06:26:17.297Z",
    "messageId": "f10bf4e9-bf1a-49e0-b10a-a461bf5659f8",
    "webhookEventTypeName": "BoxDebited"
  }
}

What if it goes wrong?

If the source or destination budget doesn’t exist, you’ll receive an error like this:
404
{
  "path": "/v2/budgets/{budgetIdA}/transfer",
  "message": "source budget not found"
}
404
{
  "path": "/v2/budgets/{budgetIdA}/transfer",
  "message": "destination budget not found"
}