> ## 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 Payment

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 Payment object.

Payments are transmitted electronically by pulling funds from a source Account,
and sending those funds to a destination Account. Payments are posted to the
destination Account (settled) in 1-3 business days but may vary per
FI (Financial Institution).

## Body

<ParamList
  items={[
{
name: 'amount',
type: 'number',
required: true,
description: 'The amount of the payment to be created in cents. (e.g. $1.00 = 100)',
},
{
name: 'source',
type: 'string',
required: true,
description: (
  <>
    <p>
      The ID of an Account from which the Payment funds will be
      retrieved.
    </p>
    <p>
      Ensure that the following checks have been done on an
      Account before it is used as a Payment source:
    </p>
    <ul>
      <li>Both the status of the Account and its holder (Entity) is <code>active</code></li>
      <li>
        Both the Account and its holder have the <code>payments</code> value in
        their <code>products</code> property.
      </li>
    </ul>
  </>
),
},
{
name: 'destination',
type: 'string',
required: true,
description: (
  <>
    <p>
      The ID of an Account where the Payment funds will be sent to.
      In the Method ecosystem, these can be either <code>ach</code> or <code>liability</code> typed
      accounts.
    </p>
    <p>
      Ensure that the following checks have been done on an
      Account before it is used as a Payment destination:
    </p>
    <ul>
      <li>Both the status of the Account and its holder (Entity) is <code>active</code></li>
      <li>
        Both the Account and its holder have the <code>payments</code> value in
        their <code>products</code> property.
      </li>
    </ul>
  </>
),
},
{
name: 'description',
type: 'string',
required: true,
description: 'The Payment\'s description (maximum of 10 characters).',
},
{
name: 'dry_run',
type: 'boolean',
required: false,
description: (
  <>
    A boolean flag. If provided and set to true, it simulates the creation of a payment 
    without initiating a live payment flow.
  </>
),
},
{
name: 'reversal_account',
type: 'string',
required: false,
description: (
  <>
    ID of the account that should be targeted in the event of a payment reversal. Defaults to the source account.
  </>
)
}
]}
/>

## Returns

Returns a Payment object. The Payment will be sent based on the cutoff
times. The `status` of the Payment will be updated when the Payment is
sent to our banking networks.
For a dry run payment, no actual payment will be sent.

<RequestExample>
  ```bash cURL theme={null}
  curl https://production.methodfi.com/payments \
    -X POST \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
    -H "Content-Type: application/json" \
    -d '{
      "amount": 5000,
      "source": "acc_hmap9mbgfLcf9",
      "destination": "acc_YXDrjADGjC76U",
      "description": "Loan Pmt",
      "reversal_account": "acc_3YPBwaEmTAf4K"
    }'
  ```

  ```javascript Node.js theme={null}
  const payment = await method.payments.create({
    amount: 5000,
    source: 'acc_hmap9mbgfLcf9',
    destination: 'acc_YXDrjADGjC76U',
    description: 'Loan Pmt',
    reversal_account: "acc_3YPBwaEmTAf4K"
  });
  ```

  ```python Python theme={null}
  payment = method.payments.create({
    'amount': 5000,
    'source': 'acc_hmap9mbgfLcf9',
    'destination': 'acc_YXDrjADGjC76U',
    'description': 'Loan Pmt',
    'reversal_account': 'acc_3YPBwaEmTAf4K'
  })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "pmt_VeCfmkwGKb",
    "source": "acc_hmap9mbgfLcf9",
    "destination": "acc_YXDrjADGjC76U",
    "amount": 5000,
    "description": "Loan Pmt",
    "status": "pending",
    "estimated_completion_date": "2024-03-21",
    "source_trace_id": null,
    "source_settlement_date": "2024-03-15",
    "source_status": "pending",
    "destination_trace_id": null,
    "destination_settlement_date": "2024-03-21",
    "destination_status": "pending",
    "reversal_id": null,
    "reversal_account": "acc_3YPBwaEmTAf4K",
    "payment_instrument": null,
    "fee": null,
    "type": "standard",
    "error": null,
    "metadata": null,
    "created_at": "2024-03-14T16:15:26.074Z",
    "updated_at": "2024-03-14T16:15:26.074Z"
  }
  ```
</ResponseExample>
