---
title: Simulate an inbound wire
slug: tutorials/api/wires/simulate-an-inbound-wire
description: Walkthrough using wire simulation endpoint for incoming wires.
docTags: 
createdAt: 2024-08-12T05:00:20.567Z
---

## What you will learn

✅ How to simulate an inbound wire transfer

Simulations allow testing certain inbound payment flows in our sandbox environment. Simulating an inbound wire transfer is triggered explicitly using the API endpoint outlined below as well as the webhook employed.

:::hint{type="info"}
If you are new to wires we recommend you read the [wires overview](docId\:hFNmQa22W2BNqAJijpAVT) before starting this tutorial.

The tutorial assumes you have a knowledge of APIs and how they work. For more information on sending API calls, see the [API basics](docId\:pUTTCwQ5SKLzxYzIn5D1b).&#x20;
:::

The tutorial uses this API endpoint

| API                                   | Description                                               |
| ------------------------------------- | --------------------------------------------------------- |
| `POST /Wires/v1/payments/simulations` | Simulate a post of an inbound wire transfer to an account |

## Before you begin

Make sure you have

- [API credentials](docId\:Z-MVwOV-p00-xX082NabK)
- Partner ID
- [Register](docId\:BN5XtgkJogBe-CtwomCbS) the following webhook:

| Webhook                 | Description                                      |
| ----------------------- | ------------------------------------------------ |
| `Wire.Payment.Received` | Inbound wire has been received from another bank |

## Inbound wire simulation

When you call `POST /Wires/v1/payments/simulations`, the Cross River sandbox creates a simulation of an inbound wire transfer to a deposit or subledger account so you can see what the inbound transfer looks like and test any automations you are designing. In this example, Stream247 is refunding $19.99 to their customer, Jana Parker, by sending a wire transfer from their JP Morgan Chase account.

:::CodeblockTabs
POST /Wires/v1/payments/simulations request

```curl
{
  "accountNumber": "2846838676",
  "originator": {
    "idCode": "D",
    "identifier": "4236598541",
    "name": "Stream247",
    "address1": "257 Dalton Groves",
    "address2": "Barton City, MI 48075"
  },
  "businessFunctionCode": "CTR",
  "senderRoutingNumber": "021000021",
  "senderDiName": "JP Morgan Chase",
  "originatorFi": {
    "idCode": "F",
    "identifier": "021000021",
    "name": "JP Morgan Chase"
  },
  "beneficiaryReference": "Refund Sep2022",
  "amount": 1999
}
```
:::

## Response to request for wire

These details show in the API response:

The Stream247 account at `JP Morgan Chase` as the `originator` sent an inbound wire transfer `direction: Inbound`, to Jana Parker, the `beneficiary`, via `Cross River Bank2` in the `amount` of `$19.99` reflected in amount as **1999**. The payment ID is **e68e32c3-a475-4d0b-a6d8-ae3c01186ff4**, as seen in the `id` attribute.

:::CodeblockTabs
POST /v1/payments/simulations response

```json
{
  "id": "e68e32c3-a475-4d0b-a6d8-ae3c01186ff4",
  "accountNumber": "2846838676",
  "referenceId": "W2204571AT5",
  "direction": "Inbound",
  "paymentType": "Transfer",
  "source": "Api",
  "status": "Hold",
  "posting": "Pending",
  "amount": 1999,
  "currency": "usd",
  "purpose": "simulation",
  "imad": "1563371856856662630811",
  "omad": "942955532798176168895701363106962410",
  "businessFunctionCode": "CTR",
  "typeCode": "1000",
  "senderRoutingNumber": "021000021",
  "senderName": "JP Morgan Chase",
  "senderReference": "test",
  "receiverRoutingNumber": "021214891",
  "receiverName": "Cross River Bank2",
  "originatingFi": {
    "idCode": "F",
    "identifier": "021000021",
    "name": "JP Morgan Chase"
  },
  "originator": {
    "idCode": "D",
    "identifier": "4236598541",
    "name": "Stream247",
    "address1": "257 Dalton Groves",
    "address2": "Barton City, MI 48705"
  },
  "beneficiaryFi": {
    "idCode": "F",
    "identifier": "021000021",
    "name": "Cross River Bank",
    "address1": "400 Kelby Street",
    "address2": "Fort Lee, NJ",
    "address3": "US"
  },
  "beneficiary": {
    "idCode": "D",
    "identifier": "2846838676",
    "name": "John Smith",
    "address1": "250 Kuhn Highway",
    "address2": "",
    "address3": "Grover, NC 28073"
  },
  "beneficiaryReference": "Refund Sep2022",
  "receiptDate": "0214",
  "receiptTime": "1201",
  "wasReversed": false,
  "isInternational": false,
  "createdAt": "2022-02-14T12:01:02.460748-05:00",
  "effectiveDate": "2022-02-14T00:00:00-05:00",
  "originalPaymentId": "e68e32c3-a475-4d0b-a6d8-ae3c01186ff4",
  "partnerId": "f03ff044-8883-4939-9d22-ade301661897",
  "productId": "9b8490c9-ccac-4f7d-8b49-ae3800e6b418",
  "lastModifiedAt": "2022-02-14T12:01:02.4967164-05:00",
  "postingCode": "OK"
}
```
:::

The `Wire.Payment.Received` webhook event fires. The payment ID (**e68e32c3-a475-4d0b-a6d8-ae3c01186ff4**) appears in the `resources` object. That is the same ID that you received in the response to your simulation request.

:::CodeblockTabs
Wire.Payment.Received webhook

```json
{
  "id": "3809b97e-58dc-4082-bc64-ae3c01188e1c",
  "eventName": "Wire.Payment.Received",
  "status": "Pending",
  "partnerId": "f03ff044-8883-4939-9d22-ade301661897",
  "createdAt": "2022-02-14T12:01:28.197-05:00",
  "resources": [
    "wires/v1/payments/e68e32c3-a475-4d0b-a6d8-ae3c01186ff4"
  ],
  "details": []
}
```
:::

