Skip to main content
POST
Telephone Order - Charge

Authorizations

Authorization
string
header
required

HTTP Basic authentication with a merchant API key as the password. The username is ignored. Used by endpoints that a third party posts to, such as telephone order providers.

Path Parameters

merchant_id
string
required

The unique identifier for the merchant account the card is charged under

provider
string
required

The telephone order provider posting the request. Currently only twilio.

Body

application/json

The provider's charge request. Shown here in Twilio's Generic Pay Connector shape.

method
enum<string>
required

The operation Twilio is asking us to perform.

Available options:
charge,
tokenize
transaction_id
string
required

Twilio's id for this attempt. Stable across its retries, and used to derive the payment_id so a retry replays the original charge.

Example:

"IPe16430-39ba-4820-bedc-7aad0762a487"

cardnumber
string | null

Card number collected over DTMF. Required for a charge.

Example:

"4242424242424242"

cvv
string | null

Card security code collected over DTMF. Required for a charge.

Example:

"123"

expiry_month
string | null

Two digit card expiry month. Required for a charge.

Example:

"12"

expiry_year
string | null

Two or four digit card expiry year. Required for a charge.

Example:

"28"

postal_code
string | null

Billing postal code, collected for AVS.

Example:

"94122"

bankaccountnumber
string | null

Bank account number for ACH debits. Not supported.

routingnumber
string | null

Bank routing number for ACH debits. Not supported.

amount
string | null

Amount in major units, as a decimal string. Absent for tokenize.

Example:

"1.00"

currency_code
enum<string> | null

The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.

Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLE,
SLL,
SOS,
SRD,
SSP,
STD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW,
ZWL
description
string | null

Free-form description configured on the <Pay> verb.

Example:

"Order placed over the phone"

parameters
object | null

Values from the IVR's <Parameter> tags, stored unmasked in the payment's metadata. profile_id, payment_id and customer_id are also read.

Response

The outcome of the charge, in the provider's response shape.

Body Twilio expects back. It reads error_code to decide the outcome, so a decline is a 200 with that set.

parameters
object
required

Returned either way, and the only channel carrying a payment_id when charge_id is null. Flat and all-string; the request's own parameters are never echoed back.

charge_id
string | null

The Hyperswitch payment_id, on a successful charge.

Example:

"pay_8320b449b06630271e378214dab80ce5"

error_code
string | null

Set when the payment did not succeed: the connector's decline code, or one of INVALID_REQUEST, PROFILE_NOT_FOUND, PAYMENT_NOT_COMPLETED, PAYMENT_PENDING, DUPLICATE_TRANSACTION, PROCESSING_ERROR, TOKENIZE_UNSUPPORTED, BANK_ACCOUNT_UNSUPPORTED. On PAYMENT_PENDING the funds may be held, so do not re-prompt for a card.

Example:

"PAYMENT_NOT_COMPLETED"

error_message
string | null

Human readable counterpart to error_code.

Example:

"Your card was declined."