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

# Update a Payment's Status

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>;
  });
};

Updates a Payment's status.

## Path Parameters

<ParamList
  items={[
{
name: 'pmt_id',
type: 'string',
required: true,
description: 'ID of the Payment.',
},
]}
/>

## Body

<ParamList
  items={[
{
name: 'status',
type: 'enum',
required: true,
description: (
  <>
    The next status to which the Payment should transition.
    See <a href="/2026-03-30/reference/payments/overview#payment-objects">Payment Statuses.</a>
  </>
),
},
{
name: 'error_code',
type: 'enum',
required: false,
description: (
  <>
    The desired Payment error code to simulate. Required when status
    is <code>failed</code>, or <code>reversal_processing</code>.
  </>
),
enums: [
  { name: '10001', description: 'Insufficient funds error.' },
  { name: '10002', description: 'Unauthorized Payment error.' },
  { name: '10003', description: 'Invalid Account error.' },
  { name: '10005', description: 'Unauthorized Source error.' },
  { name: '10006', description: 'Unauthorized Destination error.' },
  { name: '10007', description: 'Invalid Source error.' },
  { name: '10008', description: 'Invalid Destination error.' },
  { name: '10009', description: 'Rejected By Destination error.' },
  { name: '10010', description: 'Invalid Amount error.' },
]
}
]}
/>

## Returns

Returns a Payment object with the updated status.

<RequestExample>
  ```bash cURL theme={null}
  curl https://dev.methodfi.com/simulate/payments/pmt_rPrDPEwyCVUcm \
    -X POST \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
    -H "Content-Type: application/json" \
    -d '{
      "status": "processing"
    }'
  ```

  ```javascript Node.js theme={null}
  const payment = await method
    .simulate
    .payments
    .update('pmt_rPrDPEwyCVUcm', { status: 'processing' });
  ```

  ```python Python theme={null}
  payment = method
    .simulate
    .payments
    .update('pmt_rPrDPEwyCVUcm', { 'status': 'processing' })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "pmt_rPrDPEwyCVUcm",
    "reversal_id": null,
    "source_trace_id": null,
    "destination_trace_id": null,
    "source": "acc_JMJZT6r7iHi8e",
    "destination": "acc_AXthnzpBnxxWP",
    "amount": 5000,
    "description": "Loan Pmt",
    "status": "processing",
    "error": null,
    "metadata": null,
    "estimated_completion_date": "2020-12-11",
    "source_settlement_date": "2020-12-09",
    "destination_settlement_date": "2020-12-11",
    "created_at": "2020-12-09T00:42:31.209Z",
    "updated_at": "2020-12-09T00:43:30.996Z"
  }
  ```
</ResponseExample>
