Skip to main content

prompts.actions

The actions array within a prompt object specifies the audio output or text-to-speech messages to be played at different stages of the payment process.

NameTypeDescription
actionsRequiredobject[]Array of action objects.

Action Object

NameTypeDescription
phraseRequiredstringWhen the action type is Say, this value is the text to be spoken; when the type is Play, it should be a URL to the audio file.
typeRequiredstringSpecifies the action to perform. Allowed Values:
  • Say – For text-to-speech.
  • Play – For playing an audio file.

Examples

Example: Text-to-Speech

version: 1.0.0
sections:
main:
- pay:
payment_connector_url: "https://example.com/process"
prompts:
- for: "payment-card-number"
actions:
- type: "Say"
phrase: "Please enter your credit card number"
- type: "Say"
phrase: "Enter the digits followed by the pound key"

Example: Audio File

version: 1.0.0
sections:
main:
- pay:
payment_connector_url: "https://example.com/process"
prompts:
- for: "payment-completed"
actions:
- type: "Play"
phrase: "https://example.com/audio/payment-success.wav"

Example: Mixed Actions

version: 1.0.0
sections:
main:
- pay:
payment_connector_url: "https://example.com/process"
prompts:
- for: "payment-processing"
actions:
- type: "Play"
phrase: "https://example.com/audio/processing-sound.wav"
- type: "Say"
phrase: "Please wait while we process your payment"
- type: "Play"
phrase: "https://example.com/audio/hold-music.wav"