checkout_sdk 2.6.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 643ab11801801b6384afcf53088f20e10fd700aea656dd166f1355fd1f5d445e
4
- data.tar.gz: ebf1ad17a6f86067c740e66896ea79b49ff2a4433e690e4134f39b89d475bc5a
3
+ metadata.gz: 0ffa084c12fc5f4e0c765b41a3e4dd3e970ca006584c25623106e93dae1c6001
4
+ data.tar.gz: 8b69b0fff53b0eb662383c47f36af073aad85adca12d6d7edb46db9323859eb9
5
5
  SHA512:
6
- metadata.gz: a2aec6348780a7fe62a67ff99cfe125a60b17285b4f4704ecdb32f950a218e7b2464124a54e1a485dcd4271ed3f253f7721ba663d638c8c6eb4eec2232201e48
7
- data.tar.gz: 6107aa6f953cfad64ad7a4c99a05530ee989b27843ebfcf27c4c0c5ce108b96aad2c4b105251a3d74ca68871c87655f373912be6a173da4199c1c03f0ddf9de5
6
+ metadata.gz: c4d4935f79a0e91ce703cae0dbdf02e6445065525e501cba3401adf956de27d7ea399e75d52b230e7c3de5279e5e2d5936fff9fcc77f556b19aae6b80c7de801
7
+ data.tar.gz: a209f2204ed7275f7e9b880dc4fe0c55758eefbd3687d8c83eed8596c3c69f701f4aadd0193c5d79e4da241756eeb19eaf21f88feefc1f49de076df41d8c3b2d
@@ -3,7 +3,6 @@
3
3
  module CheckoutSdk
4
4
  module Payments
5
5
  # Client for Payment Flow API operations
6
- # [Beta]
7
6
  class FlowClient < Client
8
7
  PAYMENT_SESSIONS_PATH = 'payment-sessions'
9
8
  SUBMIT_PATH = 'submit'
@@ -17,7 +16,6 @@ module CheckoutSdk
17
16
 
18
17
  # Creates a Payment Session.
19
18
  # Use this endpoint to set up a payment session before collecting payment details from your customer.
20
- # [Beta]
21
19
  #
22
20
  # @param [Hash] request_payment_session_request
23
21
  def request_payment_session(request_payment_session_request)
@@ -30,7 +28,6 @@ module CheckoutSdk
30
28
 
31
29
  # Submits a Payment Session.
32
30
  # Use this endpoint to submit payment details and process the payment for an existing session.
33
- # [Beta]
34
31
  #
35
32
  # The request accepts `amount_allocations`: the sub-entities the payment is being
36
33
  # processed on behalf of, min 1 max 50 items. Each entry maps to
@@ -50,7 +47,6 @@ module CheckoutSdk
50
47
 
51
48
  # Creates and submits a Payment Session in a single request.
52
49
  # Use this endpoint to create a payment session and immediately process the payment.
53
- # [Beta]
54
50
  #
55
51
  # @param [Hash] request_payment_session_with_payment_request
56
52
  def request_payment_session_with_payment(request_payment_session_with_payment_request)
@@ -219,6 +219,7 @@ require 'checkout_sdk/payments/setups/payment_setup_account_funding_transaction'
219
219
  require 'checkout_sdk/payments/setups/payment_setup_billing_descriptor'
220
220
  require 'checkout_sdk/payments/setups/payment_setup_presentment_details'
221
221
  require 'checkout_sdk/payments/setups/payment_setup_terminal'
222
+ require 'checkout_sdk/payments/setups/payment_setup_risk'
222
223
  require 'checkout_sdk/payments/setups/payment_setup_accommodation_address'
223
224
  require 'checkout_sdk/payments/setups/payment_setup_accommodation_guest'
224
225
  require 'checkout_sdk/payments/setups/payment_setup_accommodation_room'
@@ -233,6 +234,12 @@ require 'checkout_sdk/payments/setups/blik_payment_method'
233
234
  require 'checkout_sdk/payments/setups/bacs_payment_method'
234
235
  require 'checkout_sdk/payments/setups/card_present_payment_method'
235
236
  require 'checkout_sdk/payments/setups/pay_by_bank_payment_method'
237
+ require 'checkout_sdk/payments/setups/cash_app_action_type'
238
+ require 'checkout_sdk/payments/setups/cash_app_payment_method'
239
+ require 'checkout_sdk/payments/setups/payment_setup_device_client'
240
+ require 'checkout_sdk/payments/setups/payment_setup_device_os'
241
+ require 'checkout_sdk/payments/setups/payment_setup_payment_method_initialization'
242
+ require 'checkout_sdk/payments/setups/payment_setup_payment_method_status'
236
243
  require 'checkout_sdk/payments/setups/stablecoin_payment_method'
237
244
  require 'checkout_sdk/payments/setups/payment_setups_client'
238
245
 
@@ -2,19 +2,55 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # The type of payment method that can be enabled or disabled for a payment session.
6
+ #
7
+ # This is a consolidated list covering every payment method the Flow API accepts for
8
+ # enabled_payment_methods / disabled_payment_methods. Constants marked deprecated are no
9
+ # longer part of the specification but are kept for backward compatibility.
5
10
  module PaymentMethodsType
11
+ ALIPAY_CN = 'alipay_cn'
12
+ ALIPAY_HK = 'alipay_hk'
13
+ ALMA = 'alma'
6
14
  APPLEPAY = 'applepay'
7
15
  BANCONTACT = 'bancontact'
16
+ BENEFIT = 'benefit'
17
+ BIZUM = 'bizum'
8
18
  CARD = 'card'
19
+ DANA = 'dana'
9
20
  EPS = 'eps'
21
+ # @deprecated No longer part of the specification.
10
22
  GIROPAY = 'giropay'
23
+ GCASH = 'gcash'
11
24
  GOOGLEPAY = 'googlepay'
12
25
  IDEAL = 'ideal'
26
+ KAKAOPAY = 'kakaopay'
27
+ KLARNA = 'klarna'
13
28
  KNET = 'knet'
29
+ MBWAY = 'mbway'
30
+ MOBILEPAY = 'mobilepay'
14
31
  MULTIBANCO = 'multibanco'
32
+ OCTOPUS = 'octopus'
15
33
  PRZELEWY24 = 'p24'
34
+ PAYNOW = 'paynow'
16
35
  PAYPAL = 'paypal'
36
+ PLAID = 'plaid'
37
+ QPAY = 'qpay'
38
+ # Fully supported by the API but deliberately unlisted in the public specification, so
39
+ # that merchants do not disable Remember Me en masse. Do not remove it as an unspecified
40
+ # value.
41
+ REMEMBER_ME = 'remember_me'
42
+ SEPA = 'sepa'
43
+ # @deprecated No longer part of the specification.
17
44
  SOFORT = 'sofort'
45
+ STCPAY = 'stcpay'
46
+ STORED_CARD = 'stored_card'
47
+ TABBY = 'tabby'
48
+ TAMARA = 'tamara'
49
+ TNG = 'tng'
50
+ TRUEMONEY = 'truemoney'
51
+ TWINT = 'twint'
52
+ VIPPS = 'vipps'
53
+ WECHATPAY = 'wechatpay'
18
54
  end
19
55
  end
20
56
  end
@@ -5,7 +5,8 @@ module CheckoutSdk
5
5
  # Bacs payment method configuration on a Payment Setup. Maps swagger `Bacs`.
6
6
  #
7
7
  # @!attribute status
8
- # @return [String] (response-only) Payment method status.
8
+ # @return [String] (response-only) Payment method status, one of
9
+ # {PaymentSetupPaymentMethodStatus} (e.g. "ready").
9
10
  # @!attribute flags
10
11
  # @return [Array(String)] (response-only) Diagnostic flags returned by the API.
11
12
  # @!attribute initialization
@@ -2,10 +2,11 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- # Blik payment method configuration on a Payment Setup.
5
+ # Blik payment method configuration on a Payment Setup. Maps swagger `Blik`.
6
6
  #
7
7
  # @!attribute status
8
- # @return [String] (response-only) Payment method status (e.g. "available").
8
+ # @return [String] (response-only) Payment method status, one of
9
+ # {PaymentSetupPaymentMethodStatus} (e.g. "ready").
9
10
  # @!attribute flags
10
11
  # @return [Array(String)] (response-only) Diagnostic flags returned by the API.
11
12
  # @!attribute partner_code
@@ -5,7 +5,8 @@ module CheckoutSdk
5
5
  # Card Present payment method configuration on a Payment Setup. Maps swagger `CardPresent`.
6
6
  #
7
7
  # @!attribute status
8
- # @return [String] (response-only) Payment method status.
8
+ # @return [String] (response-only) Payment method status, one of
9
+ # {PaymentSetupPaymentMethodStatus} (e.g. "ready").
9
10
  # @!attribute flags
10
11
  # @return [Array(String)] (response-only) Diagnostic flags returned by the API.
11
12
  # @!attribute track2
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The type of the next available action for the Cash App Pay payment method on a
6
+ # Payment Setup. Maps swagger `CashApp.action.type`.
7
+ module CashAppActionType
8
+ REDIRECT = 'redirect'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,93 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The Cash App payment method's details and configuration on a Payment Setup.
6
+ # Maps swagger `CashApp`. Sent under the `payment_methods.cashapp` key (one lowercase word,
7
+ # not `cash_app`).
8
+ #
9
+ # The Payment Setup request is a Hash, and a Hash request is sent as is, so do not nest an
10
+ # instance of this class in it directly: it would not be serialized. Pass a Hash with these keys,
11
+ # or convert an instance first:
12
+ # cash_app = CheckoutSdk::Payments::CashAppPaymentMethod.new
13
+ # cash_app.initialization = 'enabled'
14
+ # cash_app.customer_profile_sharing = true
15
+ # request[:payment_methods] = { cashapp: CheckoutSdk::JsonSerializer.to_custom_hash(cash_app) }
16
+ # Responses are read with dot access, for example response.payment_methods.cashapp.action.redirect_url.
17
+ class CashAppPaymentMethod
18
+ # The payment method status.
19
+ # [Optional]
20
+ # Read only.
21
+ # Enum: "unavailable" "action_required" "ready" "initialization_required" "invalid"
22
+ # @return [String] One of {PaymentSetupPaymentMethodStatus}.
23
+ attr_accessor :status
24
+
25
+ # The list of error codes or indicators that highlight missing or invalid information.
26
+ # [Optional]
27
+ # Read only.
28
+ # @return [Array(String)]
29
+ attr_accessor :flags
30
+
31
+ # The initialization state of the payment method.
32
+ # When you create a Payment Setup, this defaults to `disabled`.
33
+ # [Optional]
34
+ # Default: "disabled"
35
+ # Enum: "disabled" "enabled"
36
+ # @return [String] One of {PaymentSetupPaymentMethodInitialization}.
37
+ attr_accessor :initialization
38
+
39
+ # Indicates whether the customer consents to share their Cash App customer profile with Checkout.com.
40
+ # [Optional]
41
+ # @return [TrueClass, FalseClass]
42
+ attr_accessor :customer_profile_sharing
43
+
44
+ # The customer's Cash App profile that they consented to share. Included in the response when
45
+ # `customer_profile_sharing` is enabled.
46
+ # Cash App releases this profile only once. It's present in the first successful response when you
47
+ # get the Payment Setup after the customer authorizes the payment. Every subsequent response omits it.
48
+ # [Optional]
49
+ # Read only.
50
+ # Keys (all strings, all optional):
51
+ # - `customer_id`: Cash App's identifier for the customer. This is not a Checkout.com customer identifier.
52
+ # - `cashtag`: The customer's $Cashtag.
53
+ # - `reference_id`: Cash App's reference for the customer profile.
54
+ # - `full_name`: The customer's full name.
55
+ # - `given_name`: The customer's given name.
56
+ # - `middle_name`: The customer's middle name.
57
+ # - `family_name`: The customer's family name.
58
+ # - `suffix`: The suffix of the customer's name.
59
+ # - `birth_date`: The customer's date of birth. Format: date (the API example carries a time part,
60
+ # so the value is kept as a string).
61
+ # - `address` (Hash): The customer's address, with Cash App's own key names (not the Checkout.com
62
+ # common address): `address_line_1` (the first line of the address), `address_line_2` (the second
63
+ # line of the address), `address_line_3` (the third line of the address), `locality` (the address
64
+ # locality, such as the city or town), `sublocality` (the address sublocality, such as the district
65
+ # or neighborhood), `administrative_district_level_1` (the address's top-level administrative
66
+ # district, such as the state or province), `postal_code` (the postal or zip code) and `country`
67
+ # (the address country, in ISO 3166-1 alpha-2 format, max 2 characters).
68
+ # - `phone_number`: The customer's phone number.
69
+ # - `email_address`: The customer's email address.
70
+ # - `customer_since`: The date and time the customer's Cash App account was created.
71
+ # Format: date-time (kept as a string).
72
+ # @return [Hash]
73
+ attr_accessor :customer_profile
74
+
75
+ # A reference for the Cash App Pay transaction, returned by the provider.
76
+ # [Optional]
77
+ # Read only.
78
+ # max 80 characters
79
+ # @return [String]
80
+ attr_accessor :reference
81
+
82
+ # The next available action for the payment method.
83
+ # [Optional]
84
+ # Read only.
85
+ # Keys:
86
+ # - `type` (String): The type of action. One of {CashAppActionType}.
87
+ # - `redirect_url` (String): The URL to redirect the customer to so they can authorize the payment
88
+ # with Cash App. Format: uri
89
+ # @return [Hash]
90
+ attr_accessor :action
91
+ end
92
+ end
93
+ end
@@ -2,23 +2,47 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- # Pay by Bank (Open Banking) payment method configuration on a Payment Setup.
6
- # Maps swagger `PayByBank`.
5
+ # The Pay by Bank (Open Banking) payment method's details and configuration on a Payment Setup.
6
+ # Maps swagger `PayByBank`. Sent under the `payment_methods.paybybank` key (one lowercase word,
7
+ # not `pay_by_bank`; the API ignores `pay_by_bank` without an error).
7
8
  #
8
- # @!attribute status
9
- # @return [String] (response-only) Payment method status.
10
- # @!attribute flags
11
- # @return [Array(String)] (response-only) Diagnostic flags returned by the API.
12
- # @!attribute bank_id
13
- # @return [String] The identifier of the bank the customer has selected for the payment.
14
- # @!attribute action
15
- # @return [Hash] (response-only) The next available action for the payment method
16
- # (`type`, `banks`).
9
+ # The Payment Setup request is a Hash, and a Hash request is sent as is, so do not nest an
10
+ # instance of this class in it directly: it would not be serialized. Pass a Hash with these keys,
11
+ # or convert an instance first:
12
+ # pay_by_bank = CheckoutSdk::Payments::PayByBankPaymentMethod.new
13
+ # pay_by_bank.bank_id = 'ob-natwest'
14
+ # request[:payment_methods] = { paybybank: CheckoutSdk::JsonSerializer.to_custom_hash(pay_by_bank) }
15
+ # Responses are read with dot access, for example response.payment_methods.paybybank.action.banks.
17
16
  class PayByBankPaymentMethod
18
- attr_accessor :status,
19
- :flags,
20
- :bank_id,
21
- :action
17
+ # The payment method status.
18
+ # [Optional]
19
+ # Read only.
20
+ # Enum: "unavailable" "action_required" "ready" "initialization_required" "invalid"
21
+ # @return [String] One of {PaymentSetupPaymentMethodStatus}.
22
+ attr_accessor :status
23
+
24
+ # The list of error codes or indicators that highlight missing or invalid information.
25
+ # [Optional]
26
+ # Read only.
27
+ # @return [Array(String)]
28
+ attr_accessor :flags
29
+
30
+ # The identifier of the bank the customer has selected for the payment.
31
+ # [Optional]
32
+ # @return [String]
33
+ attr_accessor :bank_id
34
+
35
+ # The next available action for the payment method.
36
+ # [Optional]
37
+ # Read only.
38
+ # Keys:
39
+ # - `type` (String): The type of action. Enum: "select_bank".
40
+ # - `banks` (Array(Hash)): The list of banks available for the customer to select. Each item has
41
+ # `bank_id` (String, the unique identifier of the bank), `display_name` (String, the display
42
+ # name of the bank), `logo_url` (String, the URL of the bank's logo) and `available`
43
+ # (Boolean, whether the bank is currently available for selection).
44
+ # @return [Hash]
45
+ attr_accessor :action
22
46
  end
23
47
  end
24
48
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The type of client the customer uses to initiate the payment.
6
+ # Maps swagger `PaymentSetup.customer.device.client`.
7
+ module PaymentSetupDeviceClient
8
+ WEB = 'web'
9
+ MOBILE_WEB = 'mobile_web'
10
+ APP = 'app'
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The operating system of the customer's device.
6
+ # Maps swagger `PaymentSetup.customer.device.os`.
7
+ module PaymentSetupDeviceOs
8
+ ANDROID = 'android'
9
+ IOS = 'ios'
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The initialization state of a payment method on a Payment Setup.
6
+ # Maps swagger `PaymentMethodInitialization.initialization`.
7
+ module PaymentSetupPaymentMethodInitialization
8
+ DISABLED = 'disabled'
9
+ ENABLED = 'enabled'
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The payment method status on a Payment Setup.
6
+ # Maps swagger `PaymentMethodStatus`.
7
+ module PaymentSetupPaymentMethodStatus
8
+ UNAVAILABLE = 'unavailable'
9
+ ACTION_REQUIRED = 'action_required'
10
+ READY = 'ready'
11
+ INITIALIZATION_REQUIRED = 'initialization_required'
12
+ INVALID = 'invalid'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Risk assessment settings for the Payment Setup.
6
+ # Maps the swagger `PaymentSetup.risk` object. Sent under the `risk` key.
7
+ #
8
+ # The Payment Setup request is a Hash, so pass { enabled: false } directly, or convert an
9
+ # instance first with CheckoutSdk::JsonSerializer.to_custom_hash(risk).
10
+ class PaymentSetupRisk
11
+ # Indicates whether a risk assessment should be performed.
12
+ # [Optional]
13
+ # Default: true
14
+ # @return [TrueClass, FalseClass]
15
+ attr_accessor :enabled
16
+ end
17
+ end
18
+ end
@@ -16,9 +16,9 @@ module CheckoutSdk
16
16
  end
17
17
 
18
18
  # Creates a Payment Setup.
19
- # To maximize the amount of information the payment setup can use, we recommend that you create
20
- # a payment setup as early as possible in the customer's journey. For example, the first time
21
- # they land on the basket page.
19
+ # To maximize the information available to the payment setup, create a Payment Setup as early as
20
+ # possible in the customer's journey. For example, create it the first time they land on the
21
+ # basket page.
22
22
  # [Beta]
23
23
  #
24
24
  # @param [Hash] payment_setups_request
@@ -27,6 +27,81 @@ module CheckoutSdk
27
27
  # :terminal {PaymentSetupTerminal} and
28
28
  # :industry {PaymentSetupIndustry} (containing :accommodation
29
29
  # {Array(PaymentSetupAccommodation)} and :airline {Array(PaymentSetupAirline)}).
30
+ # A Hash request is sent as is, so every nested value must be a Hash too. To use one of the
31
+ # typed classes above (or {CashAppPaymentMethod}, {PayByBankPaymentMethod} or
32
+ # {PaymentSetupRisk}), convert it first with
33
+ # CheckoutSdk::JsonSerializer.to_custom_hash(object); a typed object nested directly in the
34
+ # Hash is not serialized and is sent as "#<CheckoutSdk::...>".
35
+ # :payment_methods may include :cashapp (the key is the single lowercase word `cashapp`), a Hash
36
+ # with the keys documented on {CashAppPaymentMethod}; you send :initialization ("disabled" or
37
+ # "enabled") and :customer_profile_sharing (Boolean).
38
+ # :payment_methods may also include :paybybank (the key is the single lowercase word
39
+ # `paybybank`; the API ignores `pay_by_bank` without an error), a Hash with the keys documented
40
+ # on {PayByBankPaymentMethod}; you send :bank_id (the identifier of the bank the customer has
41
+ # selected for the payment).
42
+ # :payment_methods may also include (every key is optional unless marked required):
43
+ # - :card - :token (a Hash with :id, String, the Checkout.com card token), :details (the card
44
+ # data: :number (String, write-only), :expiry_month (Integer), :expiry_year (Integer), :name
45
+ # (String, write-only), :cvv (String, write-only), :stored (Boolean, write-only) and
46
+ # :allow_update (Boolean)), :store_for_future_use (Boolean, write-only), :phone
47
+ # (:country_code, String, min 1 character, max 7 characters, and :number, String, min 6
48
+ # characters, max 25 characters), :account_holder (:type, one of "individual", "government"
49
+ # or "corporate", :first_name, :last_name, :middle_name, :company_name (Strings) and
50
+ # :account_name_inquiry (Boolean)) and :preferred_scheme ("visa", "mastercard" or
51
+ # "cartes_bancaires"). The card data goes under :details; the API ignores it at the top level
52
+ # of :card.
53
+ # - :applepay - :token_data (write-only: :version, :data and :signature (Strings) and :header,
54
+ # a Hash with :ephemeral_public_key, :public_key_hash and :transaction_id (Strings)), :token (a
55
+ # Hash with :id, String, required, pattern ^(tok)_(\w{26})$, and :expires_on, date-time,
56
+ # ISO 8601; a String token is not accepted), :store_for_future_use (Boolean, write-only),
57
+ # :phone and :account_holder as on :card, and :preferred_scheme ("visa", "mastercard" or
58
+ # "cartes_bancaires"). Apple Pay has no :details.
59
+ # - :googlepay - :token_data (write-only: :protocol_version, :signature, :signed_message and
60
+ # :tokenization_key (Strings)), :token, :store_for_future_use, :phone and :account_holder as
61
+ # on :applepay, and :preferred_scheme ("visa" or "mastercard" only). Google Pay has no
62
+ # :details.
63
+ # - :instrument - :id (String, the unique identifier of the instrument to use).
64
+ # - :auto_confirm - String, the payment method that automatically confirms the payment when it
65
+ # is ready, for example "card".
66
+ # :settings may include :success_url and :failure_url (String, format uri, max 255
67
+ # characters), :capture (Boolean, whether to capture the payment immediately, default true) and
68
+ # :excluded_payment_methods (Array of Strings, payment method names, for example ["klarna"]).
69
+ # :order may include :sub_merchants, an Array of Hashes with :id (String), :product_category
70
+ # (String), :number_of_sales (Integer; the API does not define number_of_trades) and
71
+ # :registration_date (String, format date, yyyy-MM-dd).
72
+ # :metadata - A Hash of key/value pairs to attach to the payment (max 20 keys); each value is a
73
+ # String (max 255 characters), a Number or a Boolean.
74
+ # :risk {PaymentSetupRisk} - Risk assessment settings for the Payment Setup: :enabled
75
+ # (Boolean, whether a risk assessment should be performed, default true).
76
+ # :customer may include:
77
+ # - :id - The unique identifier of the customer.
78
+ # - :country - The two-letter ISO country code of the customer for this payment
79
+ # (min 2 characters, max 2 characters).
80
+ # - :email - Details of the customer's email: :address (the customer's email address) and
81
+ # :verified (Boolean, whether the customer's email address is verified).
82
+ # - :name - The customer's full name (max 100 characters).
83
+ # - :tax_number - The customer's tax identification number.
84
+ # - :phone - The customer's phone number: :country_code (the international country calling
85
+ # code, min 1 character, max 7 characters) and :number (the phone number, min 6 characters,
86
+ # max 25 characters).
87
+ # - :merchant_account - Details of the account the customer holds with the merchant: :id,
88
+ # :registration_date, :last_modified, :first_transaction_date and :last_transaction_date
89
+ # (dates, yyyy-MM-dd), :returning_customer (Boolean), :total_order_count (Integer) and
90
+ # :last_payment_amount (Number).
91
+ # - :device - Details of the customer's device: :locale (the locale of the device),
92
+ # :fingerprint (a unique identifier for the customer's device), :ipv4 and :ipv6 (the
93
+ # customer's device IPv4 or IPv6 address, used by some payment methods for risk and
94
+ # eligibility checks), :client (the type of client the customer uses to initiate the
95
+ # payment, one of {PaymentSetupDeviceClient}; Cash App Pay requires it, although the API
96
+ # reference does not mark it as required) and :os (the operating system of the
97
+ # customer's device, one of {PaymentSetupDeviceOs}).
98
+ # @return [Hash] The Payment Setup (swagger `PaymentSetup`, 200). For Cash App Pay, read
99
+ # payment_methods.cashapp.action.redirect_url, payment_methods.cashapp.reference and, once only,
100
+ # payment_methods.cashapp.customer_profile. For Pay by Bank, read
101
+ # payment_methods.paybybank.action.banks. Card, Apple Pay and Google Pay return the read-only
102
+ # :schemes (supported card scheme names; Google Pay never lists cartes_bancaires) and card
103
+ # details :last4, :bin, :scheme (Strings) and :expires_on (date-time); instrument returns the
104
+ # read-only :type (String) and :action (:type, "set_instrument").
30
105
  def create_payment_setup(payment_setups_request)
31
106
  api_client.invoke_post(
32
107
  build_path(PAYMENTS_PATH, SETUPS_PATH),
@@ -36,9 +111,9 @@ module CheckoutSdk
36
111
  end
37
112
 
38
113
  # Updates a Payment Setup.
39
- # You should update the payment setup whenever there are significant changes in the data relevant
40
- # to the customer's transaction. For example, when the customer makes a change that impacts the
41
- # total payment amount.
114
+ # Update the Payment Setup whenever there are significant changes in the data relevant to the
115
+ # customer's transaction. For example, when the customer makes a change that impacts the total
116
+ # payment amount.
42
117
  # [Beta]
43
118
  #
44
119
  # @param [String] id - The unique identifier of the Payment Setup to update
@@ -48,6 +123,81 @@ module CheckoutSdk
48
123
  # :terminal {PaymentSetupTerminal} and
49
124
  # :industry {PaymentSetupIndustry} (containing :accommodation
50
125
  # {Array(PaymentSetupAccommodation)} and :airline {Array(PaymentSetupAirline)}).
126
+ # A Hash request is sent as is, so every nested value must be a Hash too. To use one of the
127
+ # typed classes above (or {CashAppPaymentMethod}, {PayByBankPaymentMethod} or
128
+ # {PaymentSetupRisk}), convert it first with
129
+ # CheckoutSdk::JsonSerializer.to_custom_hash(object); a typed object nested directly in the
130
+ # Hash is not serialized and is sent as "#<CheckoutSdk::...>".
131
+ # :payment_methods may include :cashapp (the key is the single lowercase word `cashapp`), a Hash
132
+ # with the keys documented on {CashAppPaymentMethod}; you send :initialization ("disabled" or
133
+ # "enabled") and :customer_profile_sharing (Boolean).
134
+ # :payment_methods may also include :paybybank (the key is the single lowercase word
135
+ # `paybybank`; the API ignores `pay_by_bank` without an error), a Hash with the keys documented
136
+ # on {PayByBankPaymentMethod}; you send :bank_id (the identifier of the bank the customer has
137
+ # selected for the payment).
138
+ # :payment_methods may also include (every key is optional unless marked required):
139
+ # - :card - :token (a Hash with :id, String, the Checkout.com card token), :details (the card
140
+ # data: :number (String, write-only), :expiry_month (Integer), :expiry_year (Integer), :name
141
+ # (String, write-only), :cvv (String, write-only), :stored (Boolean, write-only) and
142
+ # :allow_update (Boolean)), :store_for_future_use (Boolean, write-only), :phone
143
+ # (:country_code, String, min 1 character, max 7 characters, and :number, String, min 6
144
+ # characters, max 25 characters), :account_holder (:type, one of "individual", "government"
145
+ # or "corporate", :first_name, :last_name, :middle_name, :company_name (Strings) and
146
+ # :account_name_inquiry (Boolean)) and :preferred_scheme ("visa", "mastercard" or
147
+ # "cartes_bancaires"). The card data goes under :details; the API ignores it at the top level
148
+ # of :card.
149
+ # - :applepay - :token_data (write-only: :version, :data and :signature (Strings) and :header,
150
+ # a Hash with :ephemeral_public_key, :public_key_hash and :transaction_id (Strings)), :token (a
151
+ # Hash with :id, String, required, pattern ^(tok)_(\w{26})$, and :expires_on, date-time,
152
+ # ISO 8601; a String token is not accepted), :store_for_future_use (Boolean, write-only),
153
+ # :phone and :account_holder as on :card, and :preferred_scheme ("visa", "mastercard" or
154
+ # "cartes_bancaires"). Apple Pay has no :details.
155
+ # - :googlepay - :token_data (write-only: :protocol_version, :signature, :signed_message and
156
+ # :tokenization_key (Strings)), :token, :store_for_future_use, :phone and :account_holder as
157
+ # on :applepay, and :preferred_scheme ("visa" or "mastercard" only). Google Pay has no
158
+ # :details.
159
+ # - :instrument - :id (String, the unique identifier of the instrument to use).
160
+ # - :auto_confirm - String, the payment method that automatically confirms the payment when it
161
+ # is ready, for example "card".
162
+ # :settings may include :success_url and :failure_url (String, format uri, max 255
163
+ # characters), :capture (Boolean, whether to capture the payment immediately, default true) and
164
+ # :excluded_payment_methods (Array of Strings, payment method names, for example ["klarna"]).
165
+ # :order may include :sub_merchants, an Array of Hashes with :id (String), :product_category
166
+ # (String), :number_of_sales (Integer; the API does not define number_of_trades) and
167
+ # :registration_date (String, format date, yyyy-MM-dd).
168
+ # :metadata - A Hash of key/value pairs to attach to the payment (max 20 keys); each value is a
169
+ # String (max 255 characters), a Number or a Boolean.
170
+ # :risk {PaymentSetupRisk} - Risk assessment settings for the Payment Setup: :enabled
171
+ # (Boolean, whether a risk assessment should be performed, default true).
172
+ # :customer may include:
173
+ # - :id - The unique identifier of the customer.
174
+ # - :country - The two-letter ISO country code of the customer for this payment
175
+ # (min 2 characters, max 2 characters).
176
+ # - :email - Details of the customer's email: :address (the customer's email address) and
177
+ # :verified (Boolean, whether the customer's email address is verified).
178
+ # - :name - The customer's full name (max 100 characters).
179
+ # - :tax_number - The customer's tax identification number.
180
+ # - :phone - The customer's phone number: :country_code (the international country calling
181
+ # code, min 1 character, max 7 characters) and :number (the phone number, min 6 characters,
182
+ # max 25 characters).
183
+ # - :merchant_account - Details of the account the customer holds with the merchant: :id,
184
+ # :registration_date, :last_modified, :first_transaction_date and :last_transaction_date
185
+ # (dates, yyyy-MM-dd), :returning_customer (Boolean), :total_order_count (Integer) and
186
+ # :last_payment_amount (Number).
187
+ # - :device - Details of the customer's device: :locale (the locale of the device),
188
+ # :fingerprint (a unique identifier for the customer's device), :ipv4 and :ipv6 (the
189
+ # customer's device IPv4 or IPv6 address, used by some payment methods for risk and
190
+ # eligibility checks), :client (the type of client the customer uses to initiate the
191
+ # payment, one of {PaymentSetupDeviceClient}; Cash App Pay requires it, although the API
192
+ # reference does not mark it as required) and :os (the operating system of the
193
+ # customer's device, one of {PaymentSetupDeviceOs}).
194
+ # @return [Hash] The Payment Setup (swagger `PaymentSetup`, 200). For Cash App Pay, read
195
+ # payment_methods.cashapp.action.redirect_url, payment_methods.cashapp.reference and, once only,
196
+ # payment_methods.cashapp.customer_profile. For Pay by Bank, read
197
+ # payment_methods.paybybank.action.banks. Card, Apple Pay and Google Pay return the read-only
198
+ # :schemes (supported card scheme names; Google Pay never lists cartes_bancaires) and card
199
+ # details :last4, :bin, :scheme (Strings) and :expires_on (date-time); instrument returns the
200
+ # read-only :type (String) and :action (:type, "set_instrument").
51
201
  def update_payment_setup(id, payment_setups_request)
52
202
  api_client.invoke_put(
53
203
  build_path(PAYMENTS_PATH, SETUPS_PATH, id),
@@ -56,10 +206,17 @@ module CheckoutSdk
56
206
  )
57
207
  end
58
208
 
59
- # Retrieves a Payment Setup.
209
+ # Retrieves a Payment Setup by its unique identifier.
60
210
  # [Beta]
61
211
  #
62
212
  # @param [String] id - The unique identifier of the Payment Setup to retrieve
213
+ # @return [Hash] The Payment Setup (swagger `PaymentSetup`, 200). For Cash App Pay, read
214
+ # payment_methods.cashapp.action.redirect_url, payment_methods.cashapp.reference and, once only,
215
+ # payment_methods.cashapp.customer_profile. For Pay by Bank, read
216
+ # payment_methods.paybybank.action.banks. Card, Apple Pay and Google Pay return the read-only
217
+ # :schemes (supported card scheme names; Google Pay never lists cartes_bancaires) and card
218
+ # details :last4, :bin, :scheme (Strings) and :expires_on (date-time); instrument returns the
219
+ # read-only :type (String) and :action (:type, "set_instrument").
63
220
  def get_payment_setup(id)
64
221
  api_client.invoke_get(
65
222
  build_path(PAYMENTS_PATH, SETUPS_PATH, id),
@@ -73,7 +230,14 @@ module CheckoutSdk
73
230
  #
74
231
  # @param [String] id - The unique identifier of the Payment Setup
75
232
  # @param [String] payment_method_name - The name of the payment method to process the
76
- # payment with (for example, "tabby", "klarna", "card")
233
+ # payment with (for example, "tabby", "klarna", "card" or "cashapp")
234
+ # @return [Hash] The Payment Setup (swagger `PaymentSetup`, 200). For Cash App Pay, read
235
+ # payment_methods.cashapp.action.redirect_url, payment_methods.cashapp.reference and, once only,
236
+ # payment_methods.cashapp.customer_profile. For Pay by Bank, read
237
+ # payment_methods.paybybank.action.banks. Card, Apple Pay and Google Pay return the read-only
238
+ # :schemes (supported card scheme names; Google Pay never lists cartes_bancaires) and card
239
+ # details :last4, :bin, :scheme (Strings) and :expires_on (date-time); instrument returns the
240
+ # read-only :type (String) and :action (:type, "set_instrument").
77
241
  def confirm_payment_setup(id, payment_method_name)
78
242
  api_client.invoke_post(
79
243
  build_path(PAYMENTS_PATH, SETUPS_PATH, id, CONFIRM_PATH, payment_method_name),
@@ -5,7 +5,8 @@ module CheckoutSdk
5
5
  # Stablecoin payment method configuration on a Payment Setup. Maps swagger `Stablecoin`.
6
6
  #
7
7
  # @!attribute status
8
- # @return [String] (response-only) Payment method status.
8
+ # @return [String] (response-only) Payment method status, one of
9
+ # {PaymentSetupPaymentMethodStatus} (e.g. "ready").
9
10
  # @!attribute flags
10
11
  # @return [Array(String)] (response-only) Diagnostic flags returned by the API.
11
12
  class StablecoinPaymentMethod
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CheckoutSdk
4
- VERSION = '2.6.0'
4
+ VERSION = '2.7.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Checkout
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-06 00:00:00.000000000 Z
11
+ date: 2026-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -593,6 +593,8 @@ files:
593
593
  - lib/checkout_sdk/payments/setups/bacs_payment_method.rb
594
594
  - lib/checkout_sdk/payments/setups/blik_payment_method.rb
595
595
  - lib/checkout_sdk/payments/setups/card_present_payment_method.rb
596
+ - lib/checkout_sdk/payments/setups/cash_app_action_type.rb
597
+ - lib/checkout_sdk/payments/setups/cash_app_payment_method.rb
596
598
  - lib/checkout_sdk/payments/setups/pay_by_bank_payment_method.rb
597
599
  - lib/checkout_sdk/payments/setups/payment_setup_accommodation.rb
598
600
  - lib/checkout_sdk/payments/setups/payment_setup_accommodation_address.rb
@@ -605,8 +607,13 @@ files:
605
607
  - lib/checkout_sdk/payments/setups/payment_setup_airline_passenger.rb
606
608
  - lib/checkout_sdk/payments/setups/payment_setup_airline_ticket.rb
607
609
  - lib/checkout_sdk/payments/setups/payment_setup_billing_descriptor.rb
610
+ - lib/checkout_sdk/payments/setups/payment_setup_device_client.rb
611
+ - lib/checkout_sdk/payments/setups/payment_setup_device_os.rb
608
612
  - lib/checkout_sdk/payments/setups/payment_setup_industry.rb
613
+ - lib/checkout_sdk/payments/setups/payment_setup_payment_method_initialization.rb
614
+ - lib/checkout_sdk/payments/setups/payment_setup_payment_method_status.rb
609
615
  - lib/checkout_sdk/payments/setups/payment_setup_presentment_details.rb
616
+ - lib/checkout_sdk/payments/setups/payment_setup_risk.rb
610
617
  - lib/checkout_sdk/payments/setups/payment_setup_terminal.rb
611
618
  - lib/checkout_sdk/payments/setups/payment_setups_client.rb
612
619
  - lib/checkout_sdk/payments/setups/stablecoin_payment_method.rb