Twilio.Api.V2010.Call.PaymentService (twilio_elixir v0.1.1)

Copy Markdown View Source

Twilio enabled secure payments solution for accepting credit and ACH payments over the phone.

Operations: create, update

Summary

Functions

create an instance of payments. This will start a new payments session

update an instance of payments with different phases of payment flows.

Functions

create(client, call_sid, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.Call.Payment.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

create an instance of payments. This will start a new payments session

Operation: CreatePayments | Tags: Api20100401Payment

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| StatusCallback | string (uri) | Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the expected StatusCallback values |

Optional Parameters

ParameterTypeDescription
BankAccountTypestringValues: consumer-checking, consumer-savings, commercial-checking

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Currency | string | The currency of the charge_amount, formatted as ISO 4127 format. The default value is USD and all values allowed from the Pay Connector are accepted. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Parameter | string | 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 <Pay> Connector. Read more. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

PaymentConnectorstringThis is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about <Pay> Connectors. The default value is Default.
PaymentMethodstringValues: credit-card, ach-debit

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

TimeoutintegerThe number of seconds that <Pay> 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.
TokenTypestringValues: one-time, reusable, payment-method

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| ValidCardTypes | string | Credit card types separated by space that Pay should accept. The default value is visa mastercard amex |

update(client, call_sid, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.Call.Payment.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

update an instance of payments with different phases of payment flows.

Operation: UpdatePayments | Tags: Api20100401Payment

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| 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. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| StatusCallback | string (uri) | Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the Update and Complete/Cancel POST requests. |

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

CapturestringValues: payment-card-number, expiration-date, security-code, postal-code, bank-routing-number, bank-account-number
StatusstringValues: complete, cancel