Twilio now supports PCI Compliant over the phone payment capturing with the Programmable Voice
<Pay> TwiML Verb! <Pay> is built on Twilio’s existing Programmable Voice product, and allows you to easily integrate a payment gateway provider for securely processing payments. Best of all, our PCI DSS Level 1 Compliance means that Twilio meets the highest compliance standards, so you don’t need to worry about compliance requirements.
How does <Pay> Work?
The <Pay> TwiML verb tells Twilio to securely capture a caller’s payment information over the phone. The caller inputs their credit card details via DTMF touch-tone keypresses, which we then turn into a secure token, or securely pass to a Payment gateway partner. Once processed, we then post the results to the provided action URL.
Get Started using <Pay>
Customers who want to use the <Pay> TwiML verb will want to follow this guide in order:
- Enable PCI compliance mode on your Twilio Project
- Create an account with one of our <Pay> Connector partners
- Configure <Pay> Connector
- Collect a payment with <Pay>
Enable PCI Compliance Mode on your Twilio Project
To start using <Pay>, you will first need to enable PCI Mode on your Twilio project. You can make this change through the Twilio project Console.
Alert: PCI security requirements impose restrictions on call data, which may impede some voice call troubleshooting. We recommend creating a new Twilio project specifically for collecting payments with <Pay>.
From your new project, here's how to enable PCI Mode:
- Access the Voice Settings page in Console.
- Click Enable PCI Mode.
- Review the <Pay> Terms and Conditions. To agree and continue, click Accept and Save.
Create an account with one of our <Pay> Connector partners
<Pay> Connectors are Twilio project add-ons that connect to one of our partner payment gateway providers. Once you have created an account with one of our partners, you can then install and configure their connector on your Twilio project. This allows you to include the <Pay> Connector in your TwiML response, telling us which payment gateway partner to use for securely processing payments.
For a full list of Connector Partners and their supported features, please see the <Pay> Connectors page in Console.
Configure a <Pay> Connector
<Pay> Connectors can be installed and configured on your project from the <Pay> Connectors page in Console. The process is quick and easy - just install the connector, add your account details, and then click Save.
For a more detailed walkthrough, please see <Pay> Connectors (Twilio Docs).
Collect a Payment with <Pay>
Once you have completed the above steps, you’re ready to request and process a payment over the phone. For this, you’ll need to respond to a Twilio request for TwiML with the
<Pay> verb. Here’s an example of what a <Pay> payment request TwiML script might look like:
<Response> <Say>Your amount due is $29.99. Payment processing will begin now.</Say> <Pay chargeAmount="29.99" paymentConnector=”twloStripe” action="https://mysite.com/twiliopay"/> </Response>
This example reads the
<Say> message, and then request credit card information for the amount of $29.99 specified in the
chargeAmount parameter. After the credit card details are collected, we will securely process this payment via the payment connector, listed here as
twloStripe. The results from this processing will be sent in a callback to the
action parameter url, where you can respond by advising the caller if the payment failed or was successful.
For a more detailed walkthrough, please see How to capture your first payment using <Pay> (Twilio Docs).