<Pay>
Capture card payment details over the phone. Accepted and validated; capture runtime is enabled per account.
Accepted This verb is parsed and validated on every document; see the notes below for runtime availability.
Example
<Response>
<Pay chargeAmount="20.45" paymentConnector="my-connector"
action="https://app.example.com/pay-result">
<Prompt for="payment-card-number">
<Say>Please enter your card number.</Say>
</Prompt>
</Pay>
</Response>
Attributes
| Attribute | Default | Behaviour |
|---|---|---|
input |
dtmf |
Input mode for card entry. dtmf only — spoken card entry is not available. |
action |
current document URL |
URL that receives the payment result. When omitted, the current document URL is re-requested. |
method |
POST |
HTTP method for the action request: POST or GET. |
bankAccountType |
consumer-checking |
Bank account type for ACH-style capture: consumer-checking, consumer-savings, or commercial-checking. |
chargeAmount |
unset |
Amount to charge; omit to tokenize only. |
currency |
usd |
Charge currency. |
description |
unset |
Charge description passed to the payment connector. |
language |
en-us |
Language for the built-in prompts. |
maxAttempts |
1 |
How many retries the caller gets on invalid entry. |
minPostalCodeLength |
unset |
Minimum postal-code length to accept. |
paymentConnector |
Default |
Names the payment connector configured on your account that receives the captured payment method. |
paymentMethod |
credit-card |
credit-card or ach-debit. |
postalCode |
true |
Whether to prompt for a postal code. |
securityCode |
true |
Whether to prompt for the card security code. |
statusCallback |
unset |
URL receiving progress events during capture. |
statusCallbackMethod |
POST |
HTTP method for status callbacks. |
timeout |
5 |
Seconds to wait for the caller's next digit. |
tokenType |
reusable |
one-time or reusable tokenization. |
validCardTypes |
visa mastercard amex |
Space-separated allow-list of card networks. Allowed values: visa, mastercard, amex, maestro, discover, optima, jcb, diners-club, enroute. |
Nesting
<Pay> accepts these nested elements:
Callbacks
action request
| Field | Description |
|---|---|
Result |
Overall outcome of the capture. |
PayErrorCode / PaymentError |
Present when the capture failed. |
PaymentToken |
Tokenized payment method (tokenize-only flows). |
PaymentConfirmationCode |
Confirmation code for a completed charge. |
PaymentMethod |
credit-card or ach-debit. |
PaymentCardNumber / PaymentCardType / ExpirationDate |
Card details; the number is last-4 only. |
SecurityCode |
Redacted — never the entered digits. |
PaymentCardPostalCode |
The captured postal code. |
BankAccountNumber / BankAccountRouting / BankAccountType |
ACH details; the account number is last-2 only. |
ProfileID |
Connector-side profile identifier. |
statusCallback request
| Field | Description |
|---|---|
For |
The capture step the event belongs to (same vocabulary as <Prompt for>). |
ErrorType |
The error condition, when the event reports one. |
Attempt |
The attempt number for the step. |
CallSid |
Unique call identifier, included with the standard call parameters. |
Every callback also carries the standard call parameters (CallSid, AccountSid, From, To, CallStatus) and is signed with your account's API key.
Notes
- All attributes and nested <Prompt> elements are parsed and validated. Live card capture requires payments to be enabled on your account with a configured payment connector — contact support to enable it.
- Nested <Prompt> elements customise the built-in prompts per capture step (for), error type (errorType), card network (cardType), and attempt number (attempt), with <Say>, <Play>, and <Pause> children.
- maxAttempts must be between 1 and 3. chargeAmount above 1000000 is rejected; omit chargeAmount to tokenize without charging.