---
title: "Simulate a payment into a collection (sandbox only)"
method: POST
path: "/v1/simulations/collections/{id}/deposits"
tags: ["Partner API"]
---

# Simulate a payment into a collection (sandbox only)

`POST /v1/simulations/collections/{id}/deposits`

## Request

- Base URL: `https://sandbox.onlink.africa`
- URL: `https://sandbox.onlink.africa/v1/simulations/collections/{id}/deposits`
- Auth: API key in header `X-OnLink-Key`

Sandbox only. Behaves as if a payer paid this collection, so you can test your integration end to end without sending real money. The collection must be open. Answers 200 once the collection has been marked as received, or 202 when the payment was accepted and the collection has not caught up yet: read it with GET /v1/collections/{id} a little later. No real money moves. While sandbox crediting is enabled, a collection created in sandbox is then credited at the bank simulator: read it until its status is credited. Otherwise it stays received. Not available in production: the route answers 404 there.

## Path parameters

- `id` string, required

## Request body

- PartnerSimulateCollectionDepositDto
  - `amount` string, required: How much the simulated payer pays, in USD, as a decimal string with at most two decimal places. Greater than 0 and at most 10000.00.
  - `senderName` string: The name the simulated payer appears under on the deposit. Letters, spaces, apostrophes, full stops and hyphens; it must start with a letter. Defaults to a placeholder name.

## Response `200`

The collection was marked as received.

- PartnerSimulatedCollectionDepositResponseDto
  - `collectionId` string, required
  - `reference` string, required
  - `route` 'memo' | 'virtual_account', required: How this collection takes payment: `memo` (a shared account with a reference the payer quotes) or `virtual_account` (a dedicated account).
  - `deposit` PartnerSimulatedDepositDto, required
    - `id` string, nullable, required: The deposit id, `SIM-DEP-…` for a simulated deposit. `null` while the deposit has not been read back yet (a `pending` deposit on a dedicated account).
    - `amount` string, required: The amount as you requested it, with two decimal places.
    - `currency` 'USD', required
    - `status` 'received' | 'pending', required: `received`: the collection has been marked as paid. `pending`: the payment was accepted and the collection has not caught up yet; read the collection a little later.
  - `collectionStatus` 'open' | 'received' | 'credited' | 'refunded' | 'expired', required: The collection status read back after the payment was processed.
  - `crediting` 'pending', required: Always `pending`: it is the state when the payment was accepted, not the end state. A simulated payment marks the collection as received. While sandbox crediting is enabled, a collection created in sandbox is then credited at the bank simulator (no real money moves); otherwise it stays `received`. Read the collection to see which.
  - `message` string, required: A sentence saying what happened.

## Other responses

- `202`: The payment was accepted and the collection has not caught up yet. Read the collection a little later.
- `400`: Validation failed (`Validation failed on: <fields>`), or SIMULATION_AMOUNT_INVALID.
- `404`: COLLECTION_NOT_FOUND. Also the answer wherever simulations are not available, production included.
- `409`: COLLECTION_NOT_OPEN or COLLECTION_NOT_PROVISIONED.
- `503`: SIMULATION_NOT_CONFIGURED or SIMULATION_UPSTREAM_UNAVAILABLE.

---

[API](https://skmtc.dev/onlink/apis/onlink-partner-api.md) - [All operations](https://skmtc.dev/onlink/apis/onlink-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/onlink/apis/onlink-partner-api/revisions/1d1c6a3671f2?raw)
