4. Simulate an Incoming Payment Detail

Now that we have our virtual account created, we can simulate an incoming payment detail associated to the new virtual account.

curl --request POST \
  -u ORGANIZATION_ID:API_KEY \
  --url https://app.moderntreasury.com/api/simulations/incoming_payment_details/create_async \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "wire",
    "direction": "credit",
    "amount": 2000,
    "internal_account_id": "0f8e3719-3dfd-4613-9bbf-c0333781b59f",
    "virtual_account_id": "4844bda1-eb57-4129-afb4-fc663a395ca0"
  }'

A successful response will return the ID of the incoming payment detail that was created.

{
  "object": "incoming_payment_detail",
  "id": "c5f4009c-bdd6-4cc1-84b2-17974ac9e77a"
}

Did this page help you?