> ## Documentation Index
> Fetch the complete documentation index at: https://docs.methodfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Forwarding Request

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Creates a new ForwardingRequest to securely forward sensitive data to an external API.
The request is executed immediately, and the response from the upstream server is returned.

Operation Type: <Tooltip tip="Your request is processed immediately, and you'll receive a response before proceeding.">⚡ Synchronous</Tooltip>

## Body

<ParamList
  items={[
{
name: 'bindings',
type: 'object',
required: true,
description: (
  <>
    Map of binding name to resource ID.  
    Allowed resources: <code>payment_instrument</code>, <code>secret</code>, <code>entity</code>.
  </>
),
},
{
name: 'url',
type: 'string',
required: true,
description: 'URL for the forwarding request. Must be one of Method\'s whitelisted destinations.',
},
{
name: 'method',
type: 'enum',
required: true,
description: (
  <>
    HTTP method for the outbound request.
  </>
),
enums: [
  {
    name: "POST",
    description: "POST method.",
  },
],
},
{
name: 'headers',
type: 'object',
required: false,
description: (
  <>
    Key/value headers for the outbound request. Values may contain template expressions
    using the <code>{"{{binding_name.path.to.field}}"}</code> syntax.
  </>
),
},
{
name: 'body',
type: 'string',
required: false,
description: (
  <>
    Stringified body for the outbound request. May contain template expressions
    using the <code>{"{{binding_name.path.to.field}}"}</code> syntax.
  </>
),
},
]}
/>

## Returns

Returns the ForwardingRequest object with the `request` and `response` fields populated.

<RequestExample>
  ```bash cURL theme={null}
  curl https://production.methodfi.com/forwarding_requests \
    -X POST \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
    -H "Content-Type: application/json" \
    -d '{
      "bindings": {
        "payment_instrument": "pmt_inst_7TNTTRQwQxWc",
        "secret": "sec_au22b1fbFrmfp",
        "entity": "ent_au22b1FBFJbp8"
      },
      "url": "https://sample-url/v1/tokens",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer {{secret.value}}"
      },
      "body": "{\"first_name\":\"{{entity.individual.first_name}}\",\"last_name\":\"{{entity.individual.last_name}}\",\"number\":\"{{payment_instrument.card.number}}\",\"month\":\"{{payment_instrument.card.month}}\",\"year\":\"{{payment_instrument.card.year}}\",\"cvv\":\"{{payment_instrument.card.cvv}}\",\"address1\":\"123 Main St\",\"city\":\"San Francisco\",\"state\":\"CA\",\"country\":\"US\",\"postal_code\":\"94110\"}"
    }'
  ```

  ```javascript Node.js theme={null}
  const forwardingRequest = await method.forwardingRequests.create({
    bindings: {
      payment_instrument: 'pmt_inst_7TNTTRQwQxWc',
      secret: 'sec_au22b1fbFrmfp',
      entity: 'ent_au22b1FBFJbp8'
    },
    url: 'https://sample-url/v1/tokens',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer {{secret.value}}'
    },
    body: JSON.stringify({
      first_name: '{{entity.individual.first_name}}',
      last_name: '{{entity.individual.last_name}}',
      number: '{{payment_instrument.card.number}}',
      month: '{{payment_instrument.card.month}}',
      year: '{{payment_instrument.card.year}}',
      cvv: '{{payment_instrument.card.cvv}}',
      address1: '123 Main St',
      city: 'San Francisco',
      state: 'CA',
      country: 'US',
      postal_code: '94110'
    })
  });
  ```

  ```python Python theme={null}
  import json

  forwarding_request = method.forwarding_requests.create({
    'bindings': {
      'payment_instrument': 'pmt_inst_7TNTTRQwQxWc',
      'secret': 'sec_au22b1fbFrmfp',
      'entity': 'ent_au22b1FBFJbp8'
    },
    'url': 'https://sample-url/v1/tokens',
    'method': 'POST',
    'headers': {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer {{secret.value}}'
    },
    'body': json.dumps({
      'first_name': '{{entity.individual.first_name}}',
      'last_name': '{{entity.individual.last_name}}',
      'number': '{{payment_instrument.card.number}}',
      'month': '{{payment_instrument.card.month}}',
      'year': '{{payment_instrument.card.year}}',
      'cvv': '{{payment_instrument.card.cvv}}',
      'address1': '123 Main St',
      'city': 'San Francisco',
      'state': 'CA',
      'country': 'US',
      'postal_code': '94110'
    })
  })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "freq_f6xGfRQyQxDc",
    "bindings": {
      "payment_instrument": "pmt_inst_7TNTTRQwQxWc",
      "secret": "sec_au22b1fbFrmfp",
      "entity": "ent_au22b1FBFJbp8"
    },
    "request": {
      "url": "https://sample-url/v1/tokens",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer {{secret.value}}"
      },
      "body": "{\"first_name\":\"{{entity.individual.first_name}}\",\"last_name\":\"{{entity.individual.last_name}}\",\"number\":\"{{payment_instrument.card.number}}\",\"month\":\"{{payment_instrument.card.month}}\",\"year\":\"{{payment_instrument.card.year}}\",\"cvv\":\"{{payment_instrument.card.cvv}}\",\"address1\":\"123 Main St\",\"city\":\"San Francisco\",\"state\":\"CA\",\"country\":\"US\",\"postal_code\":\"94110\"}"
    },
    "response": {
      "status_code": 200,
      "headers": {
        "content-type": "application/json; charset=utf-8",
        "x-request-id": "3a92e6c6-7661-4270-bf31-2d4cc25ea911"
      },
      "body": {
        "type": "credit_card",
        "id": "vJlxp8rHhCq9FNCNF6VYeA",
        "card": {
          "brand": "visa",
          "first_six": "411111",
          "last_four": "1111",
          "exp_month": 2,
          "exp_year": 2030,
          "issuing_country": "US",
          "funding_source": "credit"
        }
      }
    },
    "duration_ms": 953,
    "created_at": "2025-12-04T18:50:54.024Z",
    "updated_at": "2025-12-04T18:50:54.024Z",
    "status": "completed"
  }
  ```
</ResponseExample>
