How to Add Secure Payments to Your Twilio IVR (2026 Guide)

By Nick Dunse, July 6, 2026

Step-by-step 2026 tutorial: enable PCI Mode, install a Pay Connector, add the Pay verb to your TwiML, and take your first PCI-compliant IVR payment on…

How to Add Secure Payments to Your Twilio IVR (2026 Guide)

Building an IVR on Twilio is the easy part: menus, routing, and personalisation are all a few lines of TwiML. Taking a payment inside that IVR is where most teams stall, because card data brings PCI DSS into the picture and nobody wants their infrastructure anywhere near a card number.

The good news: Twilio solved the capture side with the `<Pay>` verb, and a Pay Connector solves the processing side. Wired together properly, your IVR takes card and ACH payments while your systems never see a single digit, keeping you at SAQ-A, the lightest PCI self-assessment. Here is the full setup, current as of July 2026.

What You Need Before You Start

  • A Twilio account with Programmable Voice

  • A payment gateway account (Stripe, Adyen, Worldpay, Cybersource, or any of 30+ supported gateways)

  • A Shuttle account, free to create at merchant.shuttleglobal.com/twilio (you pay per transaction, $0.20 per successful payment, no setup fees)

Step 1: Enable PCI Mode on Your Twilio Account

Twilio requires PCI Mode before <Pay> will run. In the Twilio Console:

  1. Navigate to Voice Settings

  2. Click "Enable PCI Mode"

  3. Accept the terms and save

PCI Mode redacts sensitive payment details from your logs and recordings account-wide. Note that it applies per Account SID and enabling it is a deliberate, one-way choice, so do it on the right account.

Step 2: Install the Shuttle Pay Connector

In the Console, type <Pay> Connectors in the "Jump to" search box and select the Shuttle Pay Connector from the catalogue. Configure it with:

  • Unique Name: shuttle-pay-connector (note this down, your TwiML references it)

  • Username: your Shuttle instance key

  • Password: your Shuttle secret key

Both keys come from your Shuttle dashboard.

Step 3: Connect Your Payment Gateway

Log into the Shuttle dashboard and create a payment profile with your gateway credentials (for example your Stripe secret key, or your Adyen API key and merchant account). This is the piece that makes the integration gateway-agnostic: your IVR code never changes if you later add a second gateway, switch acquirers, or route different calls to different merchant accounts.

Step 4: Add the Pay Verb to Your IVR

Wherever your call flow reaches the payment step, return TwiML like this:

``xml <Response> <Say>Please enter your card number followed by the hash key.</Say> <Pay paymentConnector="shuttle-pay-connector" chargeAmount="49.99" currency="GBP" description="Invoice payment" action="/payment-complete"> <Parameter name="metadata_invoiceId" value="INV-1234"/> </Pay> </Response> ``

The caller keys in their card number, expiry, and CVV. Twilio captures the digits inside its PCI-certified environment, suppresses the tones from any agent audio and recordings, and passes the card data to Shuttle, which processes it through your gateway.

A few options worth knowing:

  • Tokenise instead of charge: omit chargeAmount to save the card without charging it

  • Take a deposit hold: add <Parameter name="action" value="AUTH"/> to authorise now and capture later

  • Set up a recurring payment from the call: add <Parameter name="frequency" value="MONTHLY"/>

  • Attach your own references: metadata_ parameters flow through to your webhook for reconciliation, and account_ parameters (first name, last name, email) attach customer details

  • Take ACH instead of card: set `paymentMethod="ach-debit"` and the caller enters routing and account numbers instead (see our guide to ACH payments over the phone)

Step 5: Handle the Result

Twilio POSTs the outcome to your action URL: the result status, masked card number, card type, and a confirmation code you can use to find the transaction in your gateway. Update the order, confirm to the caller with a <Say>, and carry on with the call. Refunds, captures, and voids afterwards run through the Shuttle API rather than the phone flow.

Step 6: Test Before You Go Live

Shuttle provides a demo application so you can test the full flow without writing your webhook first: map a Twilio number to the demo URL shown in the Shuttle dashboard, call it, and make a test payment against your gateway's sandbox credentials. Then swap in your own TwiML and go live.

If you hit an error during testing, it is usually one of Twilio's `<Pay>` error codes: 64001 means the connector configuration is wrong, 64004 means the `paymentConnector` name in your TwiML does not match the Unique Name you set, and the 64006/64007 family means the connector you are using does not support what you asked for. We keep a full reference of all 15 Twilio Pay error codes and what each one means.

Beyond Basic IVR

The same setup extends without new integration work:

  • Agent-assisted payments: contact centre agents trigger secure capture mid-conversation using Twilio's Payments API, staying on the line while the customer keys in details they never hear. See contact centre payments.

  • AI voice agents: autonomous agents hand the payment step to the same secure flow, so card data never enters the AI pipeline. See how AI voice agents take PCI-compliant payments.

  • Payment links as a fallback: if a caller cannot complete keypad entry, send an SMS payment link mid-call and watch it complete in real time.

The Compliance Position

With this architecture, Twilio handles DTMF capture and suppression, Shuttle (a PCI DSS Level 1 Service Provider) handles the card data and gateway processing, and your application only ever receives redacted results. That keeps your PCI scope at SAQ-A: around 22 self-assessment requirements instead of the 300+ that apply when card data touches your systems.

*Ready to take payments on your Twilio IVR? Install the Shuttle Pay Connector from the Twilio Marketplace and go live today, or book a discovery call.*

Payment Services

Find the Right Payment Provider

Compare payment gateways, merchant accounts, and more. We help you find the best deal, whether you're processing your first transaction or your millionth.

Talk to us

Make enabling payments for your platform and merchant users easy.

Book a Call