How to respond to a drawdown request

In this tutorial, you'll learn how to

Respond to a drawdown request

Note

If you are new to wires we recommend you read the wires documentation 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 overview page.

For this tutorial you'll need to understand these terms. These definitions are specific to this tutorial. The terms might be used slightly differently for a drawdown request.

Term

Description

Originator

The entity sending the payment

Beneficiary

The entity receiving the payment

Originating financial institution

The financial institution where the payment comes from

Intermediary financial institution

A financial institution that a payment is routed through (required for international wires, otherwise not always needed)

Beneficiary financial institution

The financial institution that receives the payment

Sending financial institution

The financial institution that sends the payment

Receiving financial institution

The financial institution that receives the payment

Drawdown request

A request for someone to send a payment by wire

The tutorial uses these API endpoints

API

Description

POST /v1/payments/{id}/drawdown-responses

Respond to a drawdown request by sending payment

The tutorial uses these webhooks:

Webhook

Description

Wire.Payment.Sent

Outbound wire has been transmitted to the Federal Reserve and has been successfully acknowledged. IMAD number is now available.

Wire.Payment.Received

Inbound wire payment received successfully.

Wire.Payment.Rejected

Outbound wire could not be processed due to compliance reasons or was rejected by the Federal Reserve.

Before you begin

Make sure you have:

1. Register the relevant webhook events

To receive the webhook events for this tutorial both partner accounts need to register each specific webhook event type. Once you are registered, the event objects are sent to the registered URLs.

The event object contains a list of resource identifiers used to download details on each event.

2. Respond to a drawdown request

In this tutorial you will respond to a drawdown request from Mastercard for 12,480,981.47 USD. An incoming drawdown request looks like the code sample below.

Copy

Sample inbound drawdown request

{
  "id": "5beea7ed-e9a1-4914-9bdc-af7100eb4dbd",
  "accountNumber": "2805121064",
  "referenceId": "W22354K5ET6",
  "fedBatchId": "9da4f836-7dae-4c54-8dee-af7100eb4dc2",
  "direction": "Inbound",
  "paymentType": "Drawdown",
  "source": "File",
  "status": "Completed",
  "posting": "Posted",
  "partnerAuthorization": "NotRequired",
  "partnerAuthorization2": "NotRequired",
  "amount": 1248098147,
  "currency": "usd",
  "purpose": "",
  "imad": "20221220B1QGC05C001017",
  "omad": "20221220QMGFNP7200015412200510FT01",
  "businessFunctionCode": "DRC",
  "typeCode": "1031",
  "senderRoutingNumber": "021000021",
  "senderName": "JPMORGAN CHASE",
  "senderReference": "1097200354JO",
  "receiverRoutingNumber": "021214891",
  "receiverName": "CROSS RIVER BK",
  "originator": {
    "idCode": "D",
    "identifier": "014053007",
    "name": "MASTERCARD INTERNATIONAL",
    "address1": "INCORPORATE/SERVICES",
    "address2": "2200 MASTERCARD BOULEVARD",
    "address3": "O'FALLON MO 63366- US"
  },
  "beneficiary": {
    "idCode": "D",
    "identifier": "014053007",
    "name": "MASTERCARD INTERNATIONAL",
    "address1": "INCORPORATE/SERVICES",
    "address2": "2200 MASTERCARD BOULEVARD",
    "address3": "O'FALLON MO 63366- US"
  },
  "originatorToBeneficiary1": "ICA 17128 CC SETTLEMENT",
  "beneficiaryReference": "2022122058465489",
  "receiptDate": "1220",
  "receiptTime": "0510",
  "wasReversed": false,
  "isInternational": false,
  "createdAt": "2022-12-20T09:17:27.307-05:00",
  "processedAt": "2022-12-20T09:27:07.98-05:00",
  "effectiveDate": "2022-12-20T00:00:00-05:00",
  "completedAt": "2022-12-20T09:27:07.98-05:00",
  "postedAt": "2022-12-20T09:27:07.98-05:00",
  "originalPaymentId": "5beea7ed-e9a1-4914-9bdc-af7100eb4dbd",
  "partnerId": "6ee82269-9e89-450e-9065-a9e5012c2645",
  "productId": "701d116d-ceec-4868-94f0-ab3c00e82bde",
  "lastModifiedAt": "2022-12-20T09:27:07.9803522-05:00",
  "postingCode": "OK"
}

a. To respond to the the incoming drawdown request

  1. Call POST /v1/payments/{id}/drawdown-responses. For this call, some/all attributes are required. A full list of attributes is found here.

    The id attribute must be set to the payment ID of the request that came in. In this case, 5beea7ed-e9a1-4914-9bdc-af7100eb4dbd.

    Copy
    Sample "response to drawdown" request
    {
    "originator":
        {
        "idCode":"D",
        "identifier":"2805121064",
        "name":"CRB FBO RPPS Settlement",
        "address1":"885 Teaneck Rd",
        "address2":"Teaneck, NJ 07666 US"
        },
    "beneficiaryReference":"1097200354JO"
    }
    https://sandbox.crbcos.com/Wires/v1/payments/5beea7ed-e9a1-4914-9bdc-af7100eb4dbd/drawdown-responses
  2. A successful API call returns a JSON response with the details of the payment sent. From this point, the payment behaves like any outbound wire payment.

Copy
{
  "id": "cb9bd5f3-e720-47dc-ab9b-af7100fe54d4",
  "accountNumber": "2805121064",
  "coreTransactionId": "e3e7a91e-fe43-40c4-a264-af710135d35d",
  "referenceId": "W2235435X38",
  "fedBatchId": "0259951e-e377-4940-b312-af71013af155",
  "fedBatchSequence": 1,
  "direction": "Outbound",
  "paymentType": "DrawdownResponse",
  "source": "OpsPortal",
  "status": "Completed",
  "posting": "Posted",
  "partnerAuthorization": "NotRequired",
  "partnerAuthorization2": "NotRequired",
  "amount": 1248098147,
  "currency": "usd",
  "purpose": "ENTERED BY #61AA4FE6014AFB01143EBB35#",
  "imad": "20221220QMGFT009000933",
  "omad": "20221220B1QGC01R06123612201412",
  "businessFunctionCode": "DRW",
  "typeCode": "1032",
  "senderRoutingNumber": "021214891",
  "senderName": "CROSS RIVER BK",
  "senderReference": "W2235435X38",
  "receiverRoutingNumber": "021000021",
  "receiverName": "JPMORGAN CHASE",
  "originator": {
    "idCode": "D",
    "identifier": "2805121064",
    "name": "CRB FBO RPPS Settlement",
    "address1": "885 Teaneck Rd",
    "address2": "Teaneck, NJ 07666 US"
  },
  "beneficiary": {
    "idCode": "D",
    "identifier": "014053007",
    "name": "MASTERCARD INTERNATIONAL",
    "address1": "INCORPORATE/SERVICES",
    "address2": "2200 MASTERCARD BOULEVARD",
    "address3": "O'FALLON MO 63366- US"
  },
  "beneficiaryReference": "1097200354JO",
  "receiptDate": "1220",
  "receiptTime": "1412",
  "wasReversed": false,
  "isInternational": false,
  "createdAt": "2022-12-20T10:25:59.53-05:00",
  "processedAt": "2022-12-20T14:07:01.817-05:00",
  "effectiveDate": "2022-12-20T00:00:00-05:00",
  "completedAt": "2022-12-20T14:46:58.82-05:00",
  "postedAt": "2022-12-20T13:48:02.473-05:00",
  "originalPaymentId": "5beea7ed-e9a1-4914-9bdc-af7100eb4dbd",
  "partnerId": "6ee82269-9e89-450e-9065-a9e5012c2645",
  "productId": "701d116d-ceec-4868-94f0-ab3c00e82bde",
  "lastModifiedAt": "2022-12-20T14:46:58.8208426-05:00",
  "postingCode": "OK"
}