Shuttle Pay Connector Reference
This reference covers the Shuttle-specific parameters, response fields, and API operations available through the Twilio Pay Connector. These apply to both IVR and Agent Assist integrations.
Request Parameters
Pass these parameters to customize payment processing. In IVR integrations, use <Parameter> elements within the <Pay> verb. In Agent Assist, include them as a JSON string in the parameter field.
Transaction Control
| Parameter | Description | Values |
|---|---|---|
action | Transaction type | AUTH (pre-authorization), PAYMENT (capture funds) |
save_card | Tokenize card for future use | true, false |
Customer Information
These parameters identify the customer and are stored against the Shuttle account.
| Parameter | Description |
|---|---|
account_crm_key | Your customer identifier |
account_first_name | Customer first name |
account_last_name | Customer last name |
account_email | Customer email |
account_phone | Customer phone |
account_first_name and account_last_name are combined and sent to the payment gateway as the cardholder name.
Billing Address
The cardholder's billing address. These are the only parameters passed to the payment gateway for AVS (address verification) checks.
| Parameter | Description |
|---|---|
billing_line1 | Street address |
billing_line2 | Address line 2 (apartment, unit, house name or number) |
billing_line3 | Address line 3 |
billing_line4 | City / town |
billing_line5 | ZIP / postcode |
billing_line6 | State / province, as an ISO 3166-2 subdivision code (e.g. CA for California) |
billing_country | Country, as an ISO 3166-1 alpha-2 code (e.g. US) |
<Pay
paymentConnector="shuttle-pay-connector"
action="https://yourapp.com/payment_complete"
chargeAmount="49.99">
<Parameter name="account_first_name" value="Jane"/>
<Parameter name="account_last_name" value="Doe"/>
<Parameter name="billing_line1" value="123 Main Street"/>
<Parameter name="billing_line2" value="Apt 4B"/>
<Parameter name="billing_line4" value="Springfield"/>
<Parameter name="billing_line5" value="62704"/>
<Parameter name="billing_line6" value="IL"/>
<Parameter name="billing_country" value="US"/>
</Pay>Parameter names are case sensitive. Use lowercase exactly as shown above.
Billing_Line1orBILLING_LINE1are ignored.
A billing address is not the same as an account address. Shuttle stores an address against the customer's account separately from the billing address on a payment. An account address is only used to pre-fill address fields on later checkouts and payment links for that customer - it is never sent to the payment gateway and is never used for AVS. If you need the gateway to receive an address, you must pass it as
billing_*on the payment itself. There is no account address parameter on the Pay Connector.
If your <Pay> verb collects a postal code from the caller (postalCode="true"), that value takes precedence over billing_line5.
Payment Reference
| Parameter | Description |
|---|---|
alt_key | Your payment reference ID (invoice number, order ID, etc.) |
payment_method_code | Unique payment method identifier |
metadata_{key} | Custom metadata fields (e.g., metadata_plan, metadata_source) |
Recurring Payments
| Parameter | Description | Format |
|---|---|---|
scheduled_date | Schedule payment for later | YYYY-MM-DDTHH:MI:SS |
frequency | Recurring interval | MONTHLY, FORTNIGHTLY, WEEKLY |
occurrences | Number of recurring payments | Integer |
start_date | First installment date | YYYY-MM-DDTHH:MI:SS |
ACH-Specific
| Parameter | Description |
|---|---|
AVSName | Account holder name (required for ACH) |
Response Fields
These fields are returned in the action callback (IVR) or statusCallback webhook (Agent Assist).
Twilio Fields
| Field | Description |
|---|---|
Result | Twilio status code |
PayErrorCode | Twilio error code if applicable |
PaymentError | Error message or decline reason |
PaymentConfirmationCode | Shuttle payment ID |
PaymentToken | Shuttle payment method ID (tokenization) |
Shuttle Fields
| Field | Description |
|---|---|
PayConnector_payment_status | Primary status - always check this |
PayConnector_gateway_status | Gateway response (APPROVED, DECLINED, etc.) |
PayConnector_gateway_message | Detailed gateway message |
PayConnector_reference | Your reference (alt_key) |
PayConnector_gateway_reference | Gateway transaction ID |
PayConnector_gateway_token | Gateway token for saved card |
PayConnector_account | Shuttle account ID |
PayConnector_contract | Recurring contract ID |
PayConnector_payment_method | Saved payment method ID |
PayConnector_transaction | Shuttle transaction ID |
PayConnector_gateway | Gateway identifier |
Card Fields
| Field | Description |
|---|---|
PaymentCardNumber | Masked card number |
PaymentCardType | Card brand (visa, mastercard, etc.) |
ExpirationDate | Card expiry (MMYY format) |
SecurityCode | Masked CVV |
PaymentCardPostalCode | AVS postal code |
ACH Fields
| Field | Description |
|---|---|
PaymentMethod | ach-debit for ACH payments |
BankAccountType | Account type (consumer-checking, etc.) |
BankRoutingNumber | Bank routing number |
BankAccountNumber | Masked account number |
Payment Status Values
Check PayConnector_payment_status to determine the transaction outcome:
| Status | Meaning | Action |
|---|---|---|
SUCCESS | Payment completed | Provision service |
UNATTRIBUTED | Payment completed (legacy) | Provision service |
PENDING | Processing | Await webhook |
UNRESOLVED | Requires review | Await webhook |
DECLINED | Payment failed | Retry or cancel |
REQAUTH | Authentication required | Retry |
Important: Always check
PayConnector_payment_status. Twilio may returnResult: "success"even when the payment failed or credentials are invalid.
Decline Types
The PayConnector_gateway_status field provides specific decline reasons:
| Status | Meaning | Customer Action |
|---|---|---|
DECLINED | Generic decline | Check details and retry |
DECLINED_CALL_BANK | Bank intervention needed | Contact bank (e.g., insufficient funds) |
DECLINED_BLOCKED | Card blocked | Try different card |
DECLINED_ERROR | Technical issue | Contact support |
DECLINED_RETRY | Temporary failure | Retry later |
Example Responses
Successful Card Payment (with save_card)
{
"Result": "success",
"PaymentConfirmationCode": "pay_31660_10007",
"PayConnector_account": "acc_20648_10002",
"PayConnector_contract": "co_20648_10002",
"PayConnector_gateway_reference": "pay_56242536421653621",
"PayConnector_gateway_status": "APPROVED",
"PayConnector_gateway_token": "tok_1234567890abcdef",
"PayConnector_payment_method": "pm_20648_10002",
"PayConnector_payment_status": "SUCCESS",
"PayConnector_reference": "REF-00010002",
"PayConnector_transaction": "tr_20648_10002",
"PaymentCardNumber": "xxxxxxxxxxxx4242",
"PaymentCardType": "visa",
"ExpirationDate": "1223"
}Successful Tokenization
{
"Result": "success",
"PaymentToken": "pm_20648_10003",
"PayConnector_account": "acc_20648_10003",
"PayConnector_gateway": "gw_31660_10002",
"PayConnector_gateway_token": "tok_9876543210fedcba",
"PayConnector_payment_method": "pm_20648_10003",
"PaymentCardNumber": "xxxxxxxxxxxx4242",
"PaymentCardType": "visa",
"ExpirationDate": "1225"
}Successful ACH Payment
{
"Result": "success",
"PaymentConfirmationCode": "pay_31660_10007",
"PayConnector_gateway_reference": "pay_56242536421653621",
"PayConnector_gateway_status": "APPROVED",
"PayConnector_payment_status": "SUCCESS",
"PaymentMethod": "ach-debit",
"BankAccountType": "consumer-checking",
"BankRoutingNumber": "110000000",
"BankAccountNumber": "xxxxxxxxxx89"
}Declined Payment
{
"Result": "payment-connector-error",
"PayErrorCode": "64008",
"PaymentError": "Payment Gateway rejected charge creation.",
"PayConnector_gateway_status": "DECLINED",
"PayConnector_gateway_message": "Invalid CVC",
"PayConnector_payment_status": "DECLINED",
"PayConnector_reference": "BOLT-00010004",
"PaymentCardNumber": "xxxxxxxxxxxx4242",
"PaymentCardType": "visa"
}Invalid Credentials (Silent Failure)
Warning: Twilio returns this as "success" with no Shuttle data. Always verify
PayConnector_payment_statusexists.
{
"Result": "success",
"PaymentConfirmationCode": "",
"PaymentToken": "",
"PaymentCardNumber": "xxxxxxxxxxxx4242",
"PaymentCardType": "visa"
}Webhooks
Configure webhooks in your Shuttle instance settings for reliable payment tracking. Essential for:
- Disconnected calls during payment
- Gateway timeouts
- Held transactions requiring review
- Scheduled/recurring payment updates
Webhook Events
| Event | Description |
|---|---|
PAYMENT.SUCCESS | Payment completed |
PAYMENT.DECLINE | Payment declined |
CAPTURE.SUCCESS | Authorization captured |
CAPTURE.DECLINE | Capture failed |
REFUND.SUCCESS | Refund processed |
Each webhook contains reference IDs. Use the API to retrieve full details.
Shuttle API
Use the Shuttle API for post-payment operations like refunds, captures, and charging saved cards.
Authentication
Base URL: https://api.shuttleglobal.com/c/api/instances/{instance_key}
Header: Authorization: Basic {your_api_key}
Find credentials in the merchant portal under your application > Settings.
Operations
Retrieve Payment
GET /payments/{payment_id}
Refund
POST /payments/{payment_id}/refund
{"amount": "19.99"}
Capture Authorization
POST /payments/{payment_id}/capture
{"amount": "99.99"}
Void Authorization
POST /payments/{payment_id}/void
Charge Saved Card
POST /payments
{
"payment_method_id": "pm_20648_10002",
"amount": "49.99",
"currency": "USD"
}
Update Recurring Schedule
PUT /contracts/{contract_id}
{"amount": "29.99"}
Cancel Recurring
POST /contracts/{contract_id}/cancel
Best Practices
- Always use
alt_key- Include your internal reference for reconciliation - Include customer data - Use
account_*parameters for better tracking, andbilling_*if your gateway performs AVS checks - Check
PayConnector_payment_status- Don't rely on Twilio'sResultfield - Configure webhooks - Essential for reliable payment tracking
- Use metadata - Pass business context through
metadata_*parameters - Handle all statuses - Implement flows for pending, declined, and error states
Troubleshooting
"Invalid credentials" with Result: success
- Verify
PayConnector_payment_statusexists in response - Check your instance key and secret key in connector config
Postal code errors
- Set
postalCode="false"for non-US/CA customers - Or pass known postal codes directly:
postalCode="12345"
Billing address not reaching the gateway
- Check the parameter names are
billing_*, lowercase. Account parameters (account_*) do not carry an address and unrecognised parameter names are silently ignored - On Adyen, pass
billing_line1,billing_line2,billing_line4,billing_line5andbilling_countrytogether. If any one of them is missing, no address is sent at all - Include
billing_line6for US, Canadian and Brazilian addresses - the state or province is required for AVS in those countries
ACH failures
- Always include
AVSNameparameter - Ensure customer name matches bank account holder
Slow gateway responses
- Configure
<Prompt for="payment-processing">messages (IVR) - Implement webhook handlers for async results
Updated about 1 month ago