Skip to main content

<Prompt>

The <Prompt> noun allows the user to customize the prompts that are executed in the <Pay> verb using a message and audio of their choice.

<Prompt> Attributes

<Prompt> supports the following attributes that change its behavior:

AttributeAllowed ValuesDefault Value
attempt1, 2, 3none
cardTypevisa, mastercard, amex, maestro, discover, jcb, diners-club, enroutenone
errorTypeinput-timeout, invalid-card-number, invalid-security-code, invalid-card-type, invalid-date, invalid-postal-code, invalid-bank-routing-number, invalid-bank-account-number, input-matching-failednone
forpayment-card-number, expiration-date, security-code, postal-code, bank-routing-number, bank-account-numbernone
historydisable, compact, fulldisable
requireMatchingInputstrue, falsefalse

attempt

The attempt attribute specifies the attempt(s) where the prompt should be executed. The value is a space-delimited list of attempt numbers, such as 1 2 3. If no attempt is provided, then the prompt is used for all attempts.

cardType

The cardType attribute provides the ability to customize a prompt based on the type of credit card entered. The value is a space-delimited list of credit card types, such as visa mastercard amex. If no cartType is provided, then the prompt is used for all card types.

errorType

The errorType attribute provides the ability to customize the error message that is played when an invalid field is entered. The value is a space-delimited list of error types, such as input-timeout invalid-credit-card-number.

for

The for attribute indicates the stage of execution at which the prompt should be played.

history

The history attribute determines if the <Prompt> noun should be logged in the history array of the CDR. The default is to not log.

For <Prompt>, the compact and full values log the following payload to the history array respectively.

compact

{
"payload": {
"for": "payment-card-number"
}
}

full

{
"payload": {
"for": "payment-card-number",
"errorType": "input-timeout",
"requireMatchingInputs": "true",
"cardType": "visa",
"attempt": 1
}
}

requireMatchingInputs

The requireMatchingInputs attribute provides the ability to prompt the customer to enter a field twice, where execution proceeds only if the inputs match. If the inputs do not match, then the customer will be prompted to enter and re-enter the field again as long as maxAttempts has not been reached.

The requireMatchingInputs attribute can only be used for the bank-routing-number and bank-account-number fields.

<Prompt> Verbs

You may choose to nest the following nouns within <Prompt>:

  • <Say>
  • <Play>

<Prompt> Examples

Simple Usage

Prompt the caller to enter their credit card number with a custom message.

<Response>
<Pay action="/next" chargeAmount="10.00" paymentConnector="test">
<Prompt for="credit-card-number">
</Prompt>
</Pay>
</Response>