Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 2.29 KB

File metadata and controls

40 lines (34 loc) · 2.29 KB

Komoju::CreateSessionRequestWithPaymentMode

Properties

Name Type Description Notes
mode String In `payment` mode, a payment will be created after customer has completed the session.
return_url String Specify the URL where user will be redirected to after they have completed or aborted the session. A `session_id` will be appended to this URL as a query parameter. [optional]
amount Integer Amount greater than or equal to 0, in the lowest denomination of the currency (e.g. cents for USD).
currency Currency
email String Customer's email address. [optional]
expires_in_seconds Integer Time in seconds until the session expires after being created. The default value and upper limit are 86,400 seconds (24 hours). [optional]
external_customer_id String An unique identifier of your customer. If your system has the concept of user accounts, then the ID of the current logged in user would be appropriate. [optional]
payment_types Array<PaymentType> Specify which payment types are available for this session. By default, all activated payment methods will be available for the session if this value is omitted. [optional]
default_locale Locale [optional]
line_items Array<LineItem> Specify the line items which will be displayed on the session page. [optional]
metadata Object Store any additional data you want to associate with the session. The object's keys and values must be strings. Keys have a maximum length of 30 characters. Values have a maximum length of 2000 characters. [optional]
payment_data PaymentDataRequest [optional]

Example

require 'komoju-sdk'

instance = Komoju::CreateSessionRequestWithPaymentMode.new(
  mode: null,
  return_url: https://example.com/order/complete,
  amount: 1000,
  currency: null,
  email: john@example.com,
  expires_in_seconds: 86400,
  external_customer_id: 12345,
  payment_types: null,
  default_locale: null,
  line_items: null,
  metadata: null,
  payment_data: null
)