***

title: createPaymentAction
slug: /reference/typescript/agents/function-result/create-payment-action
description: Build a single action entry for a payment prompt.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[create-payment-prompt]: /docs/server-sdks/reference/typescript/agents/function-result/create-payment-prompt

[ref-functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Static helper that builds a single action entry for a payment prompt.

## **Parameters**

<ParamField path="actionType" type="string" required={true} toc={true}>
  Action type.

  * `"say"` -- use text-to-speech
  * `"play"` -- play an audio file URL
</ParamField>

<ParamField path="phrase" type="string" required={true} toc={true}>
  Text to speak (when `actionType` is `"say"`) or URL to play (when `actionType`
  is `"play"`).
</ParamField>

## **Returns**

`PaymentAction` — An object with `type` and `phrase` fields, for use in
[`createPaymentPrompt()`][create-payment-prompt].

## **Example**

```typescript {3}
import { FunctionResult } from '@signalwire/sdk';

const action = FunctionResult.createPaymentAction(
  'say',
  'Please enter your card number.',
);
```