# Create an instance of payments. This will start a new payments session **POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json** create an instance of payments. This will start a new payments session Twilio enabled secure payments solution for accepting credit and ACH payments over the phone. ## Servers - https://api.twilio.com: https://api.twilio.com () ## Authentication methods - Account sid auth token ## Parameters ### Path parameters - **AccountSid** (string) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. - **CallSid** (string) The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF. ### Body: application/x-www-form-urlencoded (object) - **IdempotencyKey** (string) A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. - **StatusCallback** (string(uri)) Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) - **BankAccountType** (string) - **ChargeAmount** (number) A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. - **Currency** (string) The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted. - **Description** (string) The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. - **Input** (string) A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. - **MinPostalCodeLength** (integer) A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. - **Parameter** () A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). - **PaymentConnector** (string) This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. - **PaymentMethod** (string) - **PostalCode** (boolean) Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. - **SecurityCode** (boolean) Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. - **Timeout** (integer) The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. - **TokenType** (string) - **ValidCardTypes** (string) Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` ## Responses ### 201 Created #### Headers - **Access-Control-Allow-Origin** (string) Specify the origin(s) allowed to access the resource - **Access-Control-Allow-Methods** (string) Specify the HTTP methods allowed when accessing the resource - **Access-Control-Allow-Headers** (string) Specify the headers allowed when accessing the resource - **Access-Control-Allow-Credentials** (boolean) Indicates whether the browser should include credentials - **Access-Control-Expose-Headers** (string) Headers exposed to the client #### Body: application/json (object) - **account_sid** (string | null) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. - **call_sid** (string | null) The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Payments resource is associated with. This will refer to the call sid that is producing the payment card (credit/ACH) information thru DTMF. - **sid** (string | null) The SID of the Payments resource. - **date_created** (string(date-time-rfc-2822) | null) The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - **date_updated** (string(date-time-rfc-2822) | null) The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - **uri** (string | null) The URI of the resource, relative to `https://api.twilio.com`. [Powered by Bump.sh](https://bump.sh)