Collect payment details
Collect payment details from the caller using DTMF and either charge or tokenize the payment method through a configured Pay connector. Pay pauses active call recordings while sensitive payment details are collected.
When payment_token is supplied, the DTMF collection steps are skipped and the existing token is sent to the connector.
Expected Webhooks:
- call.payment.progress
- call.payment.completed
Test mode card numbers: 4111111111111111 (Visa), 5555555555554444 (Mastercard), 378282246310005 (American Express), 6011111111111117 (Discover), 3065930009020004 (Diners Club), 3566002020360505 (JCB), 6200000000000005 (UnionPay), and 6771798021000008 (Maestro). Test-mode connectors reject other card numbers before contacting the configured processor. The UnionPay and Maestro numbers are accepted for processor testing, but Pay currently does not emit a card type for them.
Path parameters
Unique identifier and token for controlling the call
Request body
Example request
{
"amount": 10.5,
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901",
"connector_name": "Default",
"currency": "USD",
"inter_digit_timeout_millis": 5000,
"language": "en-US",
"max_attempts": 3,
"payment_method": "credit-card",
"timeout_millis": 5000,
"transaction_type": "charge",
"voice": "female"
}Response
Successful response upon making a call control command.
Example response
{
"data": {
"result": "ok"
}
}