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
| 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 |
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 - 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"
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 14 days ago