Class: Dodopayments::Models::PaymentCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/dodopayments/models/payment_create_params.rb

Overview

Defined Under Namespace

Classes: ProductCart

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from Dodopayments::Internal::Type::BaseModel

Instance Attribute Details

#allowed_payment_method_typesArray<Symbol, Dodopayments::Models::PaymentMethodTypes>?

List of payment methods allowed during checkout.

Customers will never see payment methods that are not in this list. However, adding a method here **does not guarantee** customers will see it. Availability still depends on other factors (e.g., customer location, merchant settings).

Returns:



38
39
40
# File 'lib/dodopayments/models/payment_create_params.rb', line 38

optional :allowed_payment_method_types,
-> { Dodopayments::Internal::Type::ArrayOf[enum: Dodopayments::PaymentMethodTypes] },
nil?: true

#billingDodopayments::Models::BillingAddress

Billing address details for the payment



14
# File 'lib/dodopayments/models/payment_create_params.rb', line 14

required :billing, -> { Dodopayments::BillingAddress }

#billing_currencySymbol, ...

Fix the currency in which the end customer is billed. If Dodo Payments cannot support that currency for this transaction, it will not proceed

Returns:



47
# File 'lib/dodopayments/models/payment_create_params.rb', line 47

optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true

#customerDodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer

Customer information for the payment



20
# File 'lib/dodopayments/models/payment_create_params.rb', line 20

required :customer, union: -> { Dodopayments::CustomerRequest }

#discount_codeString?

Discount Code to apply to the transaction

Returns:

  • (String, nil)


53
# File 'lib/dodopayments/models/payment_create_params.rb', line 53

optional :discount_code, String, nil?: true

#force_3dsBoolean?

Override merchant default 3DS behaviour for this payment

Returns:

  • (Boolean, nil)


59
# File 'lib/dodopayments/models/payment_create_params.rb', line 59

optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true

#metadataHash{Symbol=>String}?

Additional metadata associated with the payment. Defaults to empty if not provided.

Returns:

  • (Hash{Symbol=>String}, nil)


66
# File 'lib/dodopayments/models/payment_create_params.rb', line 66

optional :metadata, Dodopayments::Internal::Type::HashOf[String]

Whether to generate a payment link. Defaults to false if not specified.

Returns:

  • (Boolean, nil)


72
# File 'lib/dodopayments/models/payment_create_params.rb', line 72

optional :payment_link, Dodopayments::Internal::Type::Boolean, nil?: true

#payment_method_idString?

Optional payment method ID to use for this payment. If provided, customer_id must also be provided. The payment method will be validated for eligibility with the payment’s currency.

Returns:

  • (String, nil)


80
# File 'lib/dodopayments/models/payment_create_params.rb', line 80

optional :payment_method_id, String, nil?: true

#product_cartArray<Dodopayments::Models::PaymentCreateParams::ProductCart>

List of products in the cart. Must contain at least 1 and at most 100 items.



26
27
# File 'lib/dodopayments/models/payment_create_params.rb', line 26

required :product_cart,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::PaymentCreateParams::ProductCart] }

#redirect_immediatelyBoolean?

If true, redirects the customer immediately after payment completion False by default

Returns:

  • (Boolean, nil)


87
# File 'lib/dodopayments/models/payment_create_params.rb', line 87

optional :redirect_immediately, Dodopayments::Internal::Type::Boolean

#return_urlString?

Optional URL to redirect the customer after payment. Must be a valid URL if provided.

Returns:

  • (String, nil)


94
# File 'lib/dodopayments/models/payment_create_params.rb', line 94

optional :return_url, String, nil?: true

If true, returns a shortened payment link. Defaults to false if not specified.

Returns:

  • (Boolean, nil)


100
# File 'lib/dodopayments/models/payment_create_params.rb', line 100

optional :short_link, Dodopayments::Internal::Type::Boolean, nil?: true

#show_saved_payment_methodsBoolean?

Display saved payment methods of a returning customer False by default

Returns:

  • (Boolean, nil)


106
# File 'lib/dodopayments/models/payment_create_params.rb', line 106

optional :show_saved_payment_methods, Dodopayments::Internal::Type::Boolean

#tax_idString?

Tax ID in case the payment is B2B. If tax id validation fails the payment creation will fail

Returns:

  • (String, nil)


113
# File 'lib/dodopayments/models/payment_create_params.rb', line 113

optional :tax_id, String, nil?: true