---
title: "Sync customer balance"
method: POST
path: "/v1/customers/{id}/sync-balance"
tags: ["Customers"]
---

# Sync customer balance

`POST /v1/customers/{id}/sync-balance`

Triggers an immediate balance sync for a customer. This fetches the current
on-chain balance and updates the database snapshot.

Use this endpoint:
- After a customer deposits funds on-chain
- To verify balance accuracy before a charge
- For debugging balance discrepancies

The response includes both previous and new balances, along with whether
a change was detected. Requires a secret key (`sk_*`).

## Path parameters

- `id` string, required

## Response `200`

Balance sync completed

- object — Balance sync completed
  - `customerId` string — Customer ID
  - `previousBalance` string — Previous balance in USDC
  - `newBalance` string — Current on-chain balance in USDC
  - `changed` boolean — Whether the balance changed
  - `blockNumber` string — Block number when balance was checked
  - `syncedAt` string, date-time — Timestamp of sync

## Other responses

- `401` — Unauthorized
- `404` — Customer not found

---

[API](https://skmtc.net/usedrip/apis/drip-api.md) · [All operations](https://skmtc.net/usedrip/apis/drip-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usedrip/drip-api/versions/2cb1567969ca/schema)
