> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # createPaymentPrompt > Build a payment prompt object for use with pay(). [pay]: /docs/server-sdks/reference/typescript/agents/function-result/pay [create-payment-action]: /docs/server-sdks/reference/typescript/agents/function-result/create-payment-action [ref-functionresult]: /docs/server-sdks/reference/typescript/agents/function-result Static helper that builds a payment prompt object for use with the `prompts` parameter of [`pay()`][pay]. Payment prompts customize the TTS messages played during different stages of payment collection. ## **Parameters** **`forSituation`** `string` — required The payment stage this prompt applies to (e.g., `"payment-card-number"`, `"expiration-date"`, `"security-code"`, `"postal-code"`). --- **`actions`** `PaymentAction[]` — required List of prompt actions. Use [`createPaymentAction()`][create-payment-action] to build each entry. --- **`cardType`** `string | undefined` — default: undefined Space-separated card types this prompt applies to (e.g., `"visa mastercard"`). --- **`errorType`** `string | undefined` — default: undefined Space-separated error types this prompt handles. --- ## **Returns** `PaymentPrompt` — A prompt object to pass in the `prompts` list of [`pay()`][pay]. ## **Example** ```typescript {3} import { FunctionResult } from '@signalwire/sdk'; const prompt = FunctionResult.createPaymentPrompt( 'payment-card-number', [{ type: 'say', phrase: 'Please enter your card number.' }], ); ``` > Build a payment prompt object for use with pay().