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

# Create Payment Method

> Documentation for the Create Payment Method action for Hint Health

![images/hint\_health.svg](https://mintcdn.com/morfhealth/KAegzeO2rhNgE8aD/images/hint_health.svg?fit=max\&auto=format\&n=KAegzeO2rhNgE8aD\&q=85\&s=73ef426b5efecb68f325efcea1719198)

# Parameters

**Action** `Parameters`

**parameters**

**Patient ID** `string`

`ID`
This field maps to the destination API `patient_id` field.

**Rainforest ID** `string`

`ID`
This field maps to the destination API `rainforest_id` field.

**Stripe ID** `string`

`ID`
This field maps to the destination API `stripe_id` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "bank_account": {
      "id": null,
      "last_four": null,
      "name": null,
      "stripe_token": null,
      "type": null
    },
    "card": {
      "id": null,
      "last_four": null,
      "name": null,
      "type": null
    },
    "default": null,
    "id": null,
    "last_four": null,
    "name": null,
    "type": null
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "bank_account": {
      "id": "Unique identifier for the bank account",
      "last_four": "Last four digits of the bank account number",
      "name": "Name on the bank account",
      "stripe_token": "Stripe token for the bank account",
      "type": "Type of bank account"
    },
    "card": {
      "id": "Unique identifier for the card",
      "last_four": "Last four digits of the card number",
      "name": "Name on the card",
      "type": "Type of card"
    },
    "default": "Whether this is the default payment method",
    "id": "Unique identifier for the payment method",
    "last_four": "Last four digits of the payment method",
    "name": "Name on the payment method",
    "type": "Type of payment method"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**PaymentMethod** `Fetch Action Response Object`

**fields**

**id** `string` *required*

Unique identifier for the payment method

```json CEL theme={null}
$result_object_key.id
```

```json Example theme={null}
null
```

**default** `bool`

Whether this is the default payment method

```json CEL theme={null}
$result_object_key.default
```

```json Example theme={null}
null
```

**last\_four** `string`

Last four digits of the payment method

```json CEL theme={null}
$result_object_key.last_four
```

```json Example theme={null}
null
```

**name** `string`

Name on the payment method

```json CEL theme={null}
$result_object_key.name
```

```json Example theme={null}
null
```

**type** `string`

Type of payment method

```json CEL theme={null}
$result_object_key.type
```

```json Example theme={null}
null
```

**bank\_account** `object`

Bank account details if type is bank account

```json CEL theme={null}
$result_object_key.bank_account
```

```json Example theme={null}
{
"id": null,
"last_four": null,
"name": null,
"stripe_token": null,
"type": null
}
```

**bank\_account.id** `string`

Unique identifier for the bank account

```json CEL theme={null}
$result_object_key.bank_account.id
```

```json Example theme={null}
null
```

**bank\_account.last\_four** `string`

Last four digits of the bank account number

```json CEL theme={null}
$result_object_key.bank_account.last_four
```

```json Example theme={null}
null
```

**bank\_account.name** `string`

Name on the bank account

```json CEL theme={null}
$result_object_key.bank_account.name
```

```json Example theme={null}
null
```

**bank\_account.stripe\_token** `string`

Stripe token for the bank account

```json CEL theme={null}
$result_object_key.bank_account.stripe_token
```

```json Example theme={null}
null
```

**bank\_account.type** `string`

Type of bank account

```json CEL theme={null}
$result_object_key.bank_account.type
```

```json Example theme={null}
null
```

**card** `object`

Card details if type is card

```json CEL theme={null}
$result_object_key.card
```

```json Example theme={null}
{
"id": null,
"last_four": null,
"name": null,
"type": null
}
```

**card.id** `string`

Unique identifier for the card

```json CEL theme={null}
$result_object_key.card.id
```

```json Example theme={null}
null
```

**card.last\_four** `string`

Last four digits of the card number

```json CEL theme={null}
$result_object_key.card.last_four
```

```json Example theme={null}
null
```

**card.name** `string`

Name on the card

```json CEL theme={null}
$result_object_key.card.name
```

```json Example theme={null}
null
```

**card.type** `string`

Type of card

```json CEL theme={null}
$result_object_key.card.type
```

```json Example theme={null}
null
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.