---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/testing/functions/markDepositPaid.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/testing](../index.md) / markDepositPaid

# markDepositPaid()

> **markDepositPaid**(`mockFetch`, `depositId`): `void`

Plays the bank's part by confirming a PIX: marks the deposit created by `deposits.createPix` as paid
in the mock's state. After that, `deposits.get`/`deposits.list` return `status: 'completed'` and the
balance (`wallet.get`/`wallet.getBalance`) goes up by the deposit amount — only once, even if called
again. `mockFetch` must be the `fetch` returned by [createMockFetch](createMockFetch.md) (not a wrapper around it).

## Parameters

### mockFetch

{(`input`, `init?`): `Promise`<`Response`>; (`input`, `init?`): `Promise`<`Response`>; }

### depositId

`string`

## Returns

`void`

## Example

```ts
import { createEnginexClient } from '@getenginex/sdk'
import { createMockFetch, markDepositPaid } from '@getenginex/sdk/testing'

const mockFetch = createMockFetch()
const enginex = createEnginexClient({ baseUrl: 'https://gateway.test', tenantHost: 'casino.test', fetch: mockFetch })
await enginex.auth.login({ email: 'ana@exemplo.com', password: 'Senha@123' })
const pix = await enginex.deposits.createPix({ amount: 5_000 })
markDepositPaid(mockFetch, pix.id)
await enginex.deposits.get({ depositId: pix.id }) // { status: 'completed', ... }
```

## Throws

If `mockFetch` did not come from `createMockFetch` or if the deposit does not exist in that mock.
