checkout_sdk 1.10.0 → 1.12.0

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: 8b7aae1c3707fc4f1c0b73f5ca4cecceb1eaa052d54eabf28957746c8510871b
4
- data.tar.gz: d5fe7d069ed73f21ce0735c812628264bb6c4032f4665bef2caadb62f1dc64f0
3
+ metadata.gz: 7c26660018aea61f28d8d1e742c57948b6ebadadb0440e245ca45eb14d53eede
4
+ data.tar.gz: 3192d546b4240013ac01de9de0411f6654a974e465e285529f36d3df666f345c
5
5
  SHA512:
6
- metadata.gz: 9090c0826b9a456ca253ff600da4074d43ef57ce214d864c7d85f74ba040f30d1542705fd6834d0dde2264f12bb66415762af749379529cf0256cd41daf5ab66
7
- data.tar.gz: 654a11201af0922d2949831c9d4db6436c7badd6b858e5776dc54a109abf169872960f72fa82579c663a39e22891a0d9df09a94e614e26a95b48d0612c47769c
6
+ metadata.gz: 1791fa5f04fe3a5628e4804312fc778ff407398f657e47c1b51e85844251e4e28f81d88593a994b0318212fc016eb42f392f6de2612dc856aad55430783e7558
7
+ data.tar.gz: cf4e630a4fd64a029bae0238c0e32bbdb0ab1a4576324fe31a7d09e74bfd54842440baf2725837527118d78d0b2a36b100f2051701c5fa50926c31bae4250c88
@@ -22,6 +22,7 @@ require 'checkout_sdk/accounts/profile'
22
22
  require 'checkout_sdk/accounts/accounts_client'
23
23
  require 'checkout_sdk/accounts/entity_financial_documents'
24
24
  require 'checkout_sdk/accounts/document_type'
25
+ require 'checkout_sdk/accounts/instrument_document_type'
25
26
  require 'checkout_sdk/accounts/company'
26
27
  require 'checkout_sdk/accounts/phone'
27
28
  require 'checkout_sdk/accounts/contact_details'
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # The document type accepted by the legal document that verifies a bank account when
6
+ # creating a payment instrument.
7
+ #
8
+ # Deliberately separate from DocumentType, which lists identity documents (passport,
9
+ # national identity card, driving license). The API keeps the bank account document type
10
+ # as its own enum whose only accepted value is bank_statement, so offering it alongside
11
+ # the identity documents would suggest it is valid where the API rejects it, and vice
12
+ # versa.
13
+ module InstrumentDocumentType
14
+ BANK_STATEMENT = 'bank_statement'
15
+ end
16
+ end
17
+ end
@@ -5,12 +5,94 @@ module CheckoutSdk
5
5
  # Response-side `processing` object returned alongside payment responses.
6
6
  # Distinct from {ProcessingSettings} which is the request-side equivalent.
7
7
  #
8
- # Mirrors the swagger ProcessingData schema:
9
- # preferred_scheme, app_id, partner_*, tax_amount, locale, retrieval_reference_number,
10
- # cko_network_token_available (SDK-only), aft, merchant_category_code, scheme_merchant_id,
11
- # pan_type_processed, fallback_source_used, failure_code, partner_code, partner_response_code,
12
- # scheme, partner_fraud_status, partner_merchant_advice_code, accommodation_data, airline_data,
13
- # custom_payment_method_ids
8
+ # Mirrors the swagger ProcessingData schema, referenced by PaymentDetails.processing
9
+ # (GET /payments/{id}).
10
+ #
11
+ # @!attribute preferred_scheme
12
+ # @return [String] [Optional] The preferred scheme for co-badged card payment processing.
13
+ # If performing 3DS via a third party, this is the scheme that processed 3DS. Does not
14
+ # support PINless debit schemes in the US (STAR, PULSE, NYCE, ACCEL, SHAZAM).
15
+ # Enum: "mastercard" "visa" "cartes_bancaires"
16
+ # @!attribute app_id
17
+ # @return [String] [Optional] The customer's application identifier.
18
+ # @!attribute partner_customer_id
19
+ # @return [String] [Optional] The customer's ID on the partner platform.
20
+ # @!attribute partner_payment_id
21
+ # @return [String] [Optional] The partner-originated unique payment identifier.
22
+ # @!attribute tax_amount
23
+ # @return [Numeric] [Optional] Total tax amount of the order.
24
+ # @!attribute locale
25
+ # @return [String] [Optional] The language and region of the customer. ISO 639-2 language
26
+ # code, its value consists of language-country. Pattern:
27
+ # ^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$ - min 2 characters, max 10 characters
28
+ # @!attribute retrieval_reference_number
29
+ # @return [String] [Optional] A unique identifier for the authorization provided by partner.
30
+ # @!attribute partner_order_id
31
+ # @return [String] [Optional] The Klarna order ID associated with the payment.
32
+ # @!attribute partner_status
33
+ # @return [String] [Optional] Status of a payment provided by partner.
34
+ # @!attribute partner_transaction_id
35
+ # @return [String] [Optional] Unique transaction identification provided by partner.
36
+ # @!attribute partner_error_codes
37
+ # @return [Array<String>] [Optional] The list of error codes that led the payment to fail or
38
+ # be declined, as given by the payment provider.
39
+ # @!attribute partner_error_message
40
+ # @return [String] [Optional] Error description provided by partner.
41
+ # @!attribute partner_authorization_code
42
+ # @return [String] [Optional] Authorization code provided by partner.
43
+ # @!attribute partner_authorization_response_code
44
+ # @return [String] [Optional] Authorization response code provided by partner.
45
+ # @!attribute partner_fraud_status
46
+ # @return [String] [Optional] Partner fraud status. If the status is Pending, and the
47
+ # merchant captures before it changes to Accepted, the risk of the transaction is solely
48
+ # on the merchant.
49
+ # @!attribute partner_merchant_advice_code
50
+ # @return [String] [Optional] The Mastercard Merchant Advice Code (MAC), which contains
51
+ # additional information about the transaction. For declined transactions it also
52
+ # indicates whether the payment can be retried and how long to wait.
53
+ # @!attribute custom_payment_method_ids
54
+ # @return [Array<String>] [Optional] An array defining which of the configured payment
55
+ # options within a payment category (for example, pay_later or pay_over_time) should be
56
+ # displayed for this purchase.
57
+ # @!attribute aft
58
+ # @return [Boolean] [Optional] Indicates whether the payment is an Account Funding
59
+ # Transaction.
60
+ # @!attribute merchant_category_code
61
+ # @return [String] [Optional] Four-digit code for retail financial services expressed in
62
+ # ISO 18245 format, classifying the types of goods or services you provide.
63
+ # @!attribute scheme_merchant_id
64
+ # @return [String] [Optional] The merchant identifier that was configured with the scheme
65
+ # and used for the payment.
66
+ # @!attribute pan_type_processed
67
+ # @return [String] [Optional] The type of Primary Account Number (PAN) used for the payment.
68
+ # DPAN indicates a network token was used, FPAN indicates the full card was used.
69
+ # Enum: "fpan" "dpan"
70
+ # @!attribute fallback_source_used
71
+ # @return [Boolean] [Optional] Indicates whether the fallback_source field was used for
72
+ # the payment.
73
+ # @!attribute failure_code
74
+ # @return [String] [Optional] A high-level failure category returned by the payment provider
75
+ # when a payment is declined or fails. Not all payment methods return this field.
76
+ # @!attribute partner_code
77
+ # @return [String] [Optional] The 6-digit partner code returned by the payment provider.
78
+ # Returned when source.type is blik. Pattern: ^\d{6}$ - 6 characters
79
+ # @!attribute partner_response_code
80
+ # @return [String] [Optional] The raw response code returned by the payment provider when a
81
+ # payment is declined or fails. Not all payment methods return this field.
82
+ # @!attribute scheme
83
+ # @return [String] [Optional] The scheme on which the payment was authorized. This may
84
+ # differ from the card's scheme used for the payment if the card is co-badged and the
85
+ # payment was authorized on a different network. Read-only.
86
+ # @!attribute accommodation_data
87
+ # @return [Array<AccommodationData>] [Optional] Contains information about the accommodation
88
+ # booked by the customer.
89
+ # @!attribute airline_data
90
+ # @return [Array<AirlineData>] [Optional] Contains information about the airline ticket and
91
+ # flights booked by the customer.
92
+ # @!attribute scheme_transaction_link_id
93
+ # @return [String] [Optional] The scheme transaction link identifier. Returned for
94
+ # Mastercard transactions when the scheme provides a link identifier that ties together
95
+ # related transactions on the network.
14
96
  class ProcessingData
15
97
  attr_accessor :preferred_scheme,
16
98
  :app_id,
@@ -39,7 +121,8 @@ module CheckoutSdk
39
121
  :partner_response_code,
40
122
  :scheme,
41
123
  :accommodation_data,
42
- :airline_data
124
+ :airline_data,
125
+ :scheme_transaction_link_id
43
126
  end
44
127
  end
45
128
  end
@@ -4,7 +4,7 @@ module CheckoutSdk
4
4
  module Sessions
5
5
  module Category
6
6
  PAYMENT = 'payment'
7
- NON_PAYMENT = 'nonPayment'
7
+ NON_PAYMENT = 'non_payment'
8
8
  end
9
9
  end
10
10
  end
@@ -26,6 +26,11 @@ module CheckoutSdk
26
26
  # @return [String]
27
27
  # @!attribute ip_address
28
28
  # @return [String]
29
+ # @!attribute iframe_payment_allowed
30
+ # @return [TrueClass, FalseClass] Whether the Payment API is enabled for all parent frames.
31
+ # Required for Google SPA support in hosted sessions.
32
+ # @!attribute user_agent_client_hint
33
+ # @return [String] The raw Sec-CH-UA header value. This can improve Google SPA support.
29
34
  class BrowserSession < ChannelData
30
35
  attr_accessor :three_ds_method_completion,
31
36
  :accept_header,
@@ -37,7 +42,9 @@ module CheckoutSdk
37
42
  :screen_width,
38
43
  :timezone,
39
44
  :user_agent,
40
- :ip_address
45
+ :ip_address,
46
+ :iframe_payment_allowed,
47
+ :user_agent_client_hint
41
48
 
42
49
  def initialize(three_ds_method_completion: CheckoutSdk::Sessions::ThreeDsMethodCompletion::U)
43
50
  super(ChannelDataType::BROWSER)
@@ -3,9 +3,9 @@
3
3
  module CheckoutSdk
4
4
  module Sessions
5
5
  module ThreeDsMethodCompletion
6
- Y = 'y'
7
- N = 'n'
8
- U = 'u'
6
+ Y = 'Y'
7
+ N = 'N'
8
+ U = 'U'
9
9
  end
10
10
  end
11
11
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Sessions
5
+ # The authentication experience chosen for a session.
6
+ #
7
+ # Used by {SessionRequest#preferred_experiences}, which takes an array of these values.
8
+ #
9
+ # [Optional]
10
+ module Experience
11
+ # 3D Secure authentication. The constant is named THREE_DS because a Ruby constant cannot
12
+ # begin with a digit; the wire value is '3ds'.
13
+ THREE_DS = '3ds'
14
+ # Google Secure Payment Authentication.
15
+ GOOGLE_SPA = 'google_spa'
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Sessions
5
+ # This object contains the Google SPA properties (non-hosted only).
6
+ #
7
+ # @!attribute continue_url
8
+ # @return [String] Fully qualified URL for redirecting the user's browser session after
9
+ # authentication. For example, this field may be the merchant's website for purchase
10
+ # confirmation once payment is complete. Required if in full redirect (not iframe) mode.
11
+ class GoogleSpa
12
+ attr_accessor :continue_url
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Sessions
5
+ # Indicates whether a challenge is requested for this session.
6
+ #
7
+ # Used by {SessionRequest#challenge_indicator} for POST /sessions. This is the only field in the
8
+ # API that accepts the exemption values below; the 3ds.challenge_indicator field on payments,
9
+ # hosted payments, payment links and payment sessions accepts only the first four values and is
10
+ # modelled by {CheckoutSdk::Common::ChallengeIndicator}.
11
+ #
12
+ # The following are requests for exemption: {LOW_VALUE}, {TRUSTED_LISTING},
13
+ # {TRUSTED_LISTING_PROMPT} and {TRANSACTION_RISK_ASSESSMENT}. If an exemption cannot be applied,
14
+ # then the value {NO_CHALLENGE_REQUESTED} will be used instead.
15
+ #
16
+ # [Optional]
17
+ # Default: {NO_PREFERENCE}
18
+ # max 50 characters
19
+ module SessionChallengeIndicator
20
+ NO_PREFERENCE = 'no_preference'
21
+ NO_CHALLENGE_REQUESTED = 'no_challenge_requested'
22
+ CHALLENGE_REQUESTED = 'challenge_requested'
23
+ CHALLENGE_REQUESTED_MANDATE = 'challenge_requested_mandate'
24
+ LOW_VALUE = 'low_value'
25
+ TRUSTED_LISTING = 'trusted_listing'
26
+ TRUSTED_LISTING_PROMPT = 'trusted_listing_prompt'
27
+ TRANSACTION_RISK_ASSESSMENT = 'transaction_risk_assessment'
28
+ DATA_SHARE = 'data_share'
29
+ end
30
+ end
31
+ end
@@ -3,7 +3,7 @@
3
3
  require 'checkout_sdk/sessions/authentication_type'
4
4
  require 'checkout_sdk/sessions/category'
5
5
  require 'checkout_sdk/sessions/transaction_type'
6
- require 'checkout_sdk/common/challenge_indicator'
6
+ require 'checkout_sdk/sessions/session_challenge_indicator'
7
7
 
8
8
  module CheckoutSdk
9
9
  module Sessions
@@ -24,15 +24,13 @@ module CheckoutSdk
24
24
  # @!attribute account_info
25
25
  # @return [CardHolderAccountInfo]
26
26
  # @!attribute challenge_indicator
27
- # @return [String] {CheckoutSdk::Common::ChallengeIndicator}
27
+ # @return [String] {SessionChallengeIndicator}
28
28
  # @!attribute billing_descriptor
29
29
  # @return [SessionsBillingDescriptor]
30
30
  # @!attribute reference
31
31
  # @return [String]
32
32
  # @!attribute merchant_risk_info
33
33
  # @return [MerchantRiskInfo]
34
- # @!attribute prior_transaction_reference
35
- # @return [String]
36
34
  # @!attribute transaction_type
37
35
  # @return [String] {TransactionType}
38
36
  # @!attribute shipping_address
@@ -51,6 +49,12 @@ module CheckoutSdk
51
49
  # @return [Optimization]
52
50
  # @!attribute initial_transaction
53
51
  # @return [InitialTransaction]
52
+ # @!attribute device_information
53
+ # @return [DeviceInformation]
54
+ # @!attribute google_spa
55
+ # @return [GoogleSpa] Google SPA properties (non-hosted only).
56
+ # @!attribute preferred_experiences
57
+ # @return [Array<String>] The chosen experience(s) for this session. {Experience}
54
58
  class SessionRequest
55
59
  attr_accessor :source,
56
60
  :amount,
@@ -64,7 +68,6 @@ module CheckoutSdk
64
68
  :billing_descriptor,
65
69
  :reference,
66
70
  :merchant_risk_info,
67
- :prior_transaction_reference,
68
71
  :transaction_type,
69
72
  :shipping_address,
70
73
  :shipping_address_matches_billing,
@@ -74,12 +77,14 @@ module CheckoutSdk
74
77
  :installment,
75
78
  :optimization,
76
79
  :initial_transaction,
77
- :device_information
80
+ :device_information,
81
+ :google_spa,
82
+ :preferred_experiences
78
83
 
79
84
  def initialize(source: CardSource.new,
80
85
  authentication_type: CheckoutSdk::Sessions::AuthenticationType::REGULAR,
81
86
  authentication_category: CheckoutSdk::Sessions::Category::PAYMENT,
82
- challenge_indicator: CheckoutSdk::Common::ChallengeIndicator::NO_PREFERENCE,
87
+ challenge_indicator: CheckoutSdk::Sessions::SessionChallengeIndicator::NO_PREFERENCE,
83
88
  transaction_type: CheckoutSdk::Sessions::TransactionType::GOODS_SERVICE)
84
89
  @source = source
85
90
  @authentication_type = authentication_type
@@ -6,10 +6,13 @@ require 'checkout_sdk/sessions/card_holder_account_info'
6
6
  require 'checkout_sdk/sessions/category'
7
7
  require 'checkout_sdk/sessions/delivery_timeframe'
8
8
  require 'checkout_sdk/sessions/device_information'
9
+ require 'checkout_sdk/sessions/experience'
10
+ require 'checkout_sdk/sessions/google_spa'
9
11
  require 'checkout_sdk/sessions/installment'
10
12
  require 'checkout_sdk/sessions/merchant_risk_info'
11
13
  require 'checkout_sdk/sessions/recurring'
12
14
  require 'checkout_sdk/sessions/session_address'
15
+ require 'checkout_sdk/sessions/session_challenge_indicator'
13
16
  require 'checkout_sdk/sessions/session_marketplace_data'
14
17
  require 'checkout_sdk/sessions/session_request'
15
18
  require 'checkout_sdk/sessions/session_source_type'
@@ -2,8 +2,20 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Sessions
5
+ # Indicates the shipping method chosen for the transaction.
6
+ #
7
+ # Used by {MerchantRiskInfo#shipping_indicator}. Choose the option that accurately describes the
8
+ # cardholder's specific transaction.
9
+ #
10
+ # [Optional]
5
11
  module ShippingIndicator
6
- VISA = 'visa'
12
+ BILLING_ADDRESS = 'billing_address'
13
+ ANOTHER_ADDRESS_ON_FILE = 'another_address_on_file'
14
+ NOT_ON_FILE = 'not_on_file'
15
+ STORE_PICK_UP = 'store_pick_up'
16
+ DIGITAL_GOODS = 'digital_goods'
17
+ TRAVEL_AND_EVENT_NO_SHIPPING = 'travel_and_event_no_shipping'
18
+ OTHER = 'other'
7
19
  end
8
20
  end
9
21
  end
@@ -12,15 +12,12 @@ module CheckoutSdk
12
12
  # @return [String]
13
13
  # @!attribute stored
14
14
  # @return [TrueClass, FalseClass]
15
- # @!attribute store_for_future_use
16
- # @return [TrueClass, FalseClass]
17
15
  class CardSource < SessionSource
18
16
  attr_accessor :number,
19
17
  :expiry_month,
20
18
  :expiry_year,
21
19
  :name,
22
- :stored,
23
- :store_for_future_use
20
+ :stored
24
21
 
25
22
  def initialize(stored: false)
26
23
  super(SessionSourceType::CARD)
@@ -9,6 +9,8 @@ module CheckoutSdk
9
9
  AMEX = 'amex'
10
10
  DINERS = 'diners'
11
11
  CARTES_BANCAIRES = 'cartes_bancaires'
12
+ DISCOVER = 'discover'
13
+ UPI = 'upi'
12
14
  end
13
15
  end
14
16
  end
@@ -7,7 +7,7 @@ module CheckoutSdk
7
7
  CHECK_ACCEPTANCE = 'check_acceptance'
8
8
  GOODS_SERVICE = 'goods_service'
9
9
  PREPAID_ACTIVATION_AND_LOAD = 'prepaid_activation_and_load'
10
- QUASHI_CARD_TRANSACTION = 'quashi_card_transaction'
10
+ QUASI_CARD_TRANSACTION = 'quasi_card_transaction'
11
11
  end
12
12
  end
13
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CheckoutSdk
4
- VERSION = '1.10.0'
4
+ VERSION = '1.12.0'
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: 1.10.0
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Checkout
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-31 00:00:00.000000000 Z
11
+ date: 2026-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -188,6 +188,7 @@ files:
188
188
  - lib/checkout_sdk/accounts/instrument_details_faster_payments.rb
189
189
  - lib/checkout_sdk/accounts/instrument_details_sepa.rb
190
190
  - lib/checkout_sdk/accounts/instrument_document.rb
191
+ - lib/checkout_sdk/accounts/instrument_document_type.rb
191
192
  - lib/checkout_sdk/accounts/invitee.rb
192
193
  - lib/checkout_sdk/accounts/national_id_type.rb
193
194
  - lib/checkout_sdk/accounts/onboard_entity.rb
@@ -635,6 +636,8 @@ files:
635
636
  - lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb
636
637
  - lib/checkout_sdk/sessions/delivery_timeframe.rb
637
638
  - lib/checkout_sdk/sessions/device_information.rb
639
+ - lib/checkout_sdk/sessions/experience.rb
640
+ - lib/checkout_sdk/sessions/google_spa.rb
638
641
  - lib/checkout_sdk/sessions/initial_transaction.rb
639
642
  - lib/checkout_sdk/sessions/installment.rb
640
643
  - lib/checkout_sdk/sessions/merchant_risk_info.rb
@@ -644,6 +647,7 @@ files:
644
647
  - lib/checkout_sdk/sessions/recurring.rb
645
648
  - lib/checkout_sdk/sessions/reorder_items_indicator_type.rb
646
649
  - lib/checkout_sdk/sessions/session_address.rb
650
+ - lib/checkout_sdk/sessions/session_challenge_indicator.rb
647
651
  - lib/checkout_sdk/sessions/session_marketplace_data.rb
648
652
  - lib/checkout_sdk/sessions/session_request.rb
649
653
  - lib/checkout_sdk/sessions/session_secret_credentials.rb