How to simulate an inbound wire payment
In this tutorial, you'll learn how to
Simulate an inbound wire transfer
If you are new to wire transfers we recommend you read the Wires overview before starting this tutorial.
If you are new to APIs and how they work we recommend you read the API overview page before starting this tutorial.
The tutorial uses this API endpoint
API |
Description |
---|---|
|
Post an inbound wire transfer to an account. |
Before you begin
Make sure you have
-
Partner ID
-
Registered the following webhook:
Webhook |
Description |
---|---|
Wire.Payment.Received
|
Inbound wire has been received from another bank |
Request a refund by wire transfer to a deposit or subledger account
When you call POST /v1/payments/simulations
, the CR sandbox creates a simulation of an inbound wire transfer 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.
POST /v1/payments/simulations request
{
"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
}
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.
POST /v1/payments/simulations response
{
"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": "Jana Parker",
"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.
Wire.Payment.Received webhook
{
"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": []
}