checkout_sdk 2.7.1 → 2.8.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/lib/checkout_sdk/api_client.rb +11 -6
  4. data/lib/checkout_sdk/checkout_utils.rb +77 -2
  5. data/lib/checkout_sdk/common/account_holder.rb +78 -1
  6. data/lib/checkout_sdk/common/account_holder_identification.rb +21 -0
  7. data/lib/checkout_sdk/common/common.rb +1 -0
  8. data/lib/checkout_sdk/common/customer_retry.rb +14 -2
  9. data/lib/checkout_sdk/common/residential_status_type.rb +11 -0
  10. data/lib/checkout_sdk/error.rb +28 -6
  11. data/lib/checkout_sdk/events/events_client.rb +1 -1
  12. data/lib/checkout_sdk/issuing/card_update_headers.rb +11 -12
  13. data/lib/checkout_sdk/issuing/issuing_client.rb +20 -11
  14. data/lib/checkout_sdk/oauth_sdk_credentials.rb +18 -11
  15. data/lib/checkout_sdk/payments/card_payout_item.rb +24 -0
  16. data/lib/checkout_sdk/payments/card_payout_processing.rb +39 -0
  17. data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +29 -0
  18. data/lib/checkout_sdk/payments/destination/card_destination.rb +20 -0
  19. data/lib/checkout_sdk/payments/destination/destination.rb +5 -0
  20. data/lib/checkout_sdk/payments/destination/destination_type.rb +7 -0
  21. data/lib/checkout_sdk/payments/destination/id_destination.rb +16 -0
  22. data/lib/checkout_sdk/payments/destination/network_token_destination.rb +63 -0
  23. data/lib/checkout_sdk/payments/destination/token_destination.rb +15 -0
  24. data/lib/checkout_sdk/payments/downtime_retry_request.rb +14 -0
  25. data/lib/checkout_sdk/payments/dunning_retry_request.rb +22 -0
  26. data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +9 -0
  27. data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +42 -31
  28. data/lib/checkout_sdk/payments/instruction_remittance.rb +17 -0
  29. data/lib/checkout_sdk/payments/instruction_scheme.rb +5 -0
  30. data/lib/checkout_sdk/payments/links/payment_link.rb +50 -29
  31. data/lib/checkout_sdk/payments/payment_instruction.rb +48 -1
  32. data/lib/checkout_sdk/payments/payment_request.rb +1 -1
  33. data/lib/checkout_sdk/payments/payment_retry_request.rb +9 -7
  34. data/lib/checkout_sdk/payments/payment_segment.rb +11 -0
  35. data/lib/checkout_sdk/payments/payment_type.rb +4 -1
  36. data/lib/checkout_sdk/payments/payments.rb +10 -0
  37. data/lib/checkout_sdk/payments/payments_client.rb +10 -0
  38. data/lib/checkout_sdk/payments/payout_billing_descriptor.rb +10 -0
  39. data/lib/checkout_sdk/payments/payout_request.rb +59 -1
  40. data/lib/checkout_sdk/payments/sender/corporate_sender.rb +19 -0
  41. data/lib/checkout_sdk/payments/sender/government_sender.rb +21 -0
  42. data/lib/checkout_sdk/payments/sender/individual_sender.rb +46 -0
  43. data/lib/checkout_sdk/payments/sender/instrument_sender.rb +3 -0
  44. data/lib/checkout_sdk/payments/sender/sender.rb +16 -0
  45. data/lib/checkout_sdk/payments/sessions/payment_sessions_request.rb +55 -32
  46. data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb +10 -1
  47. data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb +5 -4
  48. data/lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb +29 -1
  49. data/lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb +34 -1
  50. data/lib/checkout_sdk/payments/setups/bacs_payment_method.rb +70 -34
  51. data/lib/checkout_sdk/payments/setups/cash_app_payment_method.rb +3 -3
  52. data/lib/checkout_sdk/payments/setups/payment_setup_payment_type.rb +19 -0
  53. data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +10 -0
  54. data/lib/checkout_sdk/payments/source/currency_account_source.rb +8 -0
  55. data/lib/checkout_sdk/payments/source/entity_source.rb +5 -0
  56. data/lib/checkout_sdk/payments/source/payout_source.rb +12 -1
  57. data/lib/checkout_sdk/payments/unreferenced_refund_request.rb +89 -0
  58. data/lib/checkout_sdk/version.rb +1 -1
  59. metadata +25 -2
@@ -2,25 +2,54 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # A bank account payout destination (bank payout, type bank_account).
6
+ #
5
7
  # @!attribute account_type
8
+ # The type of the bank account. Note that some beneficiary banks do not accept payouts to
9
+ # savings accounts.
10
+ # [Required]
11
+ # Enum: "savings" "current" "cash"
6
12
  # @return [String] {CheckoutSdk::Common::AccountType}
7
13
  # @!attribute account_number
14
+ # Number (which can contain letters) that identifies the local account.
15
+ # [Optional]
8
16
  # @return [String]
9
17
  # @!attribute bank_code
18
+ # Code that identifies the bank. Also referred as Routing Number in the United States.
19
+ # [Optional]
10
20
  # @return [String]
11
21
  # @!attribute branch_code
22
+ # Code that identifies the bank branch.
23
+ # [Optional]
12
24
  # @return [String]
13
25
  # @!attribute iban
26
+ # Internationally agreed standard for identifying bank accounts. Lengths vary per destination_country.
27
+ # [Optional]
14
28
  # @return [String]
15
29
  # @!attribute bban
30
+ # The combination of bank code and/or branch code and account number.
31
+ # [Optional]
16
32
  # @return [String]
17
33
  # @!attribute swift_bic
34
+ # 8 or 11 character code which identifies the bank or bank branch.
35
+ # [Optional]
18
36
  # @return [String]
19
37
  # @!attribute country
38
+ # The two-letter ISO country code of where the account is based. Note that not all countries
39
+ # are available.
40
+ # [Required]
41
+ # 2 characters
20
42
  # @return [String] {CheckoutSdk::Common::Country}
21
43
  # @!attribute account_holder
44
+ # The account holder details.
45
+ # [Optional]
22
46
  # @return [CheckoutSdk::Common::AccountHolder]
23
47
  # @!attribute bank
48
+ # The bank details.
49
+ # [Optional]
50
+ # @deprecated Not in the request schema of the bank account payout destination; bank only exists on the
51
+ # Instruments bank account schemas. Retained for backwards compatibility and will be removed in the
52
+ # next major version. There is no replacement.
24
53
  # @return [CheckoutSdk::Common::BankDetails]
25
54
  class BankAccountDestination < Destination
26
55
  attr_accessor :account_type,
@@ -2,13 +2,33 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # A card payout destination. Also the card destination of an unreferenced refund.
6
+ #
5
7
  # @!attribute number
8
+ # The card number.
9
+ # You can encrypt this field by using the Cko-Encryption-Key-Id and Cko-Encrypted-Properties headers.
10
+ # [Required]
11
+ # max 19 characters
6
12
  # @return [String]
7
13
  # @!attribute expiry_month
14
+ # The card's expiration month.
15
+ # [Required]
16
+ # 1 to 2 digits
8
17
  # @return [Integer]
9
18
  # @!attribute expiry_year
19
+ # The card's expiration year.
20
+ # [Required]
21
+ # 4 digits
10
22
  # @return [Integer]
11
23
  # @!attribute account_holder
24
+ # The payout or unreferenced refund destination account holder.
25
+ # [Required]
26
+ # The type discriminates the accepted keys:
27
+ # - individual: type, first_name, middle_name, last_name, billing_address, phone,
28
+ # identification, email, date_of_birth, country_of_birth
29
+ # - corporate, government: type, company_name, billing_address, phone, identification, email
30
+ # Other AccountHolder properties (full_name, gender, tax_id, residential_status,
31
+ # account_name_inquiry) are not part of this position.
12
32
  # @return [CheckoutSdk::Common::AccountHolder]
13
33
  class CardDestination < Destination
14
34
  attr_accessor :number,
@@ -2,7 +2,12 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # The destination of the payout, or of the unreferenced refund.
6
+ # You can encrypt this field by using the Cko-Encryption-Key-Id and Cko-Encrypted-Properties headers.
7
+ #
5
8
  # @!attribute type
9
+ # The payout or unreferenced refund destination type. Set by each subclass.
10
+ # [Required]
6
11
  # @return [String] {DestinationType}
7
12
  class Destination
8
13
  attr_reader :type
@@ -2,11 +2,18 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # The payout destination type.
6
+ #
7
+ # Three destination discriminators share these values:
8
+ # - card payout destination: card, network_token, id, token
9
+ # - unreferenced refund destination: card, network_token, id, token
10
+ # - bank payout destination: id, bank_account
5
11
  module DestinationType
6
12
  CARD = 'card'
7
13
  ID = 'id'
8
14
  TOKEN = 'token'
9
15
  BANK_ACCOUNT = 'bank_account'
16
+ NETWORK_TOKEN = 'network_token'
10
17
  end
11
18
  end
12
19
  end
@@ -2,9 +2,25 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # A payment instrument payout destination. Used by card payouts, bank payouts and unreferenced refunds.
6
+ #
5
7
  # @!attribute id
8
+ # The payment source ID. This will be an ID with the prefix `src_`.
9
+ # [Required]
10
+ # ^(src)_(\w{26})$
11
+ # 30 characters (card payout and unreferenced refund)
6
12
  # @return [String]
7
13
  # @!attribute account_holder
14
+ # The payout or unreferenced refund destination account holder.
15
+ # [Required] for card payouts, [Optional] for unreferenced refunds.
16
+ # Not declared by the bank payout id destination.
17
+ # The type discriminates the accepted keys. For card payouts:
18
+ # - individual: type, first_name, middle_name, last_name
19
+ # - corporate, government: type, company_name
20
+ # For unreferenced refunds, where no name is required:
21
+ # - individual: type, first_name, middle_name, last_name, billing_address, phone,
22
+ # identification, email, date_of_birth, country_of_birth
23
+ # - corporate, government: type, company_name, billing_address, phone, identification, email
8
24
  # @return [CheckoutSdk::Common::AccountHolder]
9
25
  class IdDestination < Destination
10
26
  attr_accessor :id,
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # A network token payout destination, used as the destination of a card payout or of an
6
+ # unreferenced refund.
7
+ #
8
+ # @!attribute token
9
+ # The network token's Primary Account Number (PAN).
10
+ # [Required]
11
+ # @return [String]
12
+ # @!attribute expiry_month
13
+ # The network token's expiration month.
14
+ # [Required]
15
+ # min 1
16
+ # 1 to 2 digits
17
+ # @return [Integer]
18
+ # @!attribute expiry_year
19
+ # The network token's expiration year.
20
+ # [Required]
21
+ # 4 digits
22
+ # @return [Integer]
23
+ # @!attribute token_type
24
+ # The network token type.
25
+ # [Required]
26
+ # Enum: "vts" "mdes" "applepay" "googlepay"
27
+ # @return [String] {CheckoutSdk::Payments::NetworkTokenType}
28
+ # @!attribute cryptogram
29
+ # The network token's Base64-encoded cryptographic identifier (TAVV).
30
+ # The cryptogram is used by card schemes to validate the token verification result.
31
+ # [Optional]
32
+ # max 50 characters
33
+ # @return [String]
34
+ # @!attribute eci
35
+ # The network token's Electronic Commerce Indicator (ECI) security level.
36
+ # [Optional]
37
+ # max 2 characters
38
+ # @return [String]
39
+ # @!attribute account_holder
40
+ # The payout or unreferenced refund destination account holder.
41
+ # [Required]
42
+ # The type discriminates the accepted keys:
43
+ # - individual: type, first_name, middle_name, last_name, billing_address, phone,
44
+ # identification, email, date_of_birth, country_of_birth
45
+ # - corporate, government: type, company_name, billing_address, phone, identification, email
46
+ # Other AccountHolder properties (full_name, gender, tax_id, residential_status,
47
+ # account_name_inquiry) are not part of this position.
48
+ # @return [CheckoutSdk::Common::AccountHolder]
49
+ class NetworkTokenDestination < Destination
50
+ attr_accessor :token,
51
+ :expiry_month,
52
+ :expiry_year,
53
+ :token_type,
54
+ :cryptogram,
55
+ :eci,
56
+ :account_holder
57
+
58
+ def initialize
59
+ super(CheckoutSdk::Payments::DestinationType::NETWORK_TOKEN)
60
+ end
61
+ end
62
+ end
63
+ end
@@ -2,9 +2,24 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # A token payout destination. Also the token destination of an unreferenced refund.
6
+ #
5
7
  # @!attribute token
8
+ # The Checkout.com card token ID. This will be an ID with the prefix `tok_`.
9
+ # [Required]
10
+ # ^(tok)_(\w{26})$
11
+ # 30 characters
6
12
  # @return [String]
7
13
  # @!attribute account_holder
14
+ # The payout or unreferenced refund destination account holder.
15
+ # [Required] for card payouts, [Optional] for unreferenced refunds.
16
+ # The type discriminates the accepted keys. For card payouts:
17
+ # - individual: type, first_name, middle_name, last_name
18
+ # - corporate, government: type, company_name
19
+ # For unreferenced refunds, where no name is required:
20
+ # - individual: type, first_name, middle_name, last_name, billing_address, phone,
21
+ # identification, email, date_of_birth, country_of_birth
22
+ # - corporate, government: type, company_name, billing_address, phone, identification, email
8
23
  # @return [CheckoutSdk::Common::AccountHolder]
9
24
  class TokenDestination < Destination
10
25
  attr_accessor :token,
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Configuration of Downtime retries.
6
+ #
7
+ # @!attribute enabled
8
+ # @return [TrueClass, FalseClass] [Required] Indicates if Checkout.com retries the payment when it's declined
9
+ # due to issuer or acquirer downtime.
10
+ class DowntimeRetryRequest
11
+ attr_accessor :enabled
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Configuration of Dunning retries.
6
+ #
7
+ # @!attribute enabled
8
+ # @return [TrueClass, FalseClass] [Required] Indicates if Checkout.com retries the payment when it's declined
9
+ # with a supported decline code.
10
+ # @!attribute max_attempts
11
+ # @return [Integer] [Optional] The maximum number of authorization retry attempts, excluding the initial
12
+ # authorization. Minimum 1, maximum 15. Default 6.
13
+ # @!attribute end_after_days
14
+ # @return [Integer] [Optional] The maximum number of days between the initial request and the final retry
15
+ # attempt. Minimum 1, maximum 60. Default 30.
16
+ class DunningRetryRequest
17
+ attr_accessor :enabled,
18
+ :max_attempts,
19
+ :end_after_days
20
+ end
21
+ end
22
+ end
@@ -2,7 +2,16 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # Details about the payment instruction of a hosted payments session.
6
+ # Hosted payments use purpose only.
7
+ #
5
8
  # @!attribute purpose
9
+ # The purpose of the payment. This field might be required for AFT transactions depending on the
10
+ # card's issuer_country.
11
+ # [Optional]
12
+ # Enum: "donations" "education" "emergency_need" "expatriation" "family_support" "financial_services"
13
+ # "gifts" "income" "insurance" "investment" "it_services" "leisure" "loan_payment" "medical_treatment"
14
+ # "other" "pension" "royalties" "savings" "travel_and_tourism"
6
15
  # @return [String] {PaymentPurposeType}
7
16
  class HostedPaymentInstruction
8
17
  attr_accessor :purpose
@@ -5,67 +5,78 @@ require 'checkout_sdk/payments/payment_type'
5
5
  module CheckoutSdk
6
6
  module Payments
7
7
  # @!attribute currency
8
- # @return [String] {CheckoutSdk::Common::Currency}
8
+ # @return [String] {CheckoutSdk::Common::Currency} [Required] The three-letter ISO currency code of the payment
9
9
  # @!attribute billing
10
- # @return [BillingInformation]
10
+ # @return [BillingInformation] [Required] The billing details
11
11
  # @!attribute success_url
12
- # @return [String]
12
+ # @return [String] [Required] For redirect payment methods, this overrides the default success redirect URL
13
+ # configured on your account
13
14
  # @!attribute cancel_url
14
- # @return [String]
15
+ # @return [String] [Required] The URL to which the customer should be directed if they cancel the payment
15
16
  # @!attribute failure_url
16
- # @return [String]
17
+ # @return [String] [Required] For redirect payment methods, this overrides the default failure redirect URL
18
+ # configured on your account
17
19
  # @!attribute amount
18
- # @return [Integer]
20
+ # @return [Integer] [Optional] The payment amount. Minimum 0.
19
21
  # @!attribute payment_type
20
- # @return [String] {PaymentType}
22
+ # @return [String] {PaymentType} [Optional] This must be specified for card payments where the cardholder is not
23
+ # present (i.e., recurring or mail order / telephone order)
21
24
  # @!attribute payment_ip
22
- # @return [String]
25
+ # @return [String] [Optional] The Customers IP address. Only IPv4 and IPv6 addresses are accepted.
26
+ # @deprecated The Customers IP address is deprecated in the API reference. Will be removed in the next
27
+ # major version.
23
28
  # @!attribute billing_descriptor
24
- # @return [BillingDescriptor]
29
+ # @return [BillingDescriptor] [Optional] An optional description that is displayed on the customer's statement
30
+ # identifying a purchase
25
31
  # @!attribute reference
26
- # @return [String]
32
+ # @return [String] [Optional] A reference you can use to identify the payment.
27
33
  # @!attribute description
28
- # @return [String]
34
+ # @return [String] [Optional] A description of the payment
29
35
  # @!attribute display_name
30
- # @return [String]
36
+ # @return [String] [Optional] The merchant name to display to customers on the checkout page.
31
37
  # @!attribute processing_channel_id
32
- # @return [String]
38
+ # @return [String] [Optional] The processing channel to be used for the payment
33
39
  # @!attribute amount_allocations
34
- # @return [Array(CheckoutSdk::Common::AmountAllocations)]
40
+ # @return [Array(CheckoutSdk::Common::AmountAllocations)] [Optional] The sub-entities that the payment is being
41
+ # processed on behalf of
35
42
  # @!attribute customer
36
- # @return [CheckoutSdk::Common::CustomerRequest]
43
+ # @return [CheckoutSdk::Common::CustomerRequest] [Optional] The customer's details
37
44
  # @!attribute shipping
38
- # @return [ShippingDetails]
45
+ # @return [ShippingDetails] [Optional] The address any products are being sent to.
39
46
  # @!attribute recipient
40
- # @return [PaymentRecipient]
47
+ # @return [PaymentRecipient] [Optional] Information about the recipient of the payment's funds.
41
48
  # @!attribute processing
42
- # @return [ProcessingSettings]
49
+ # @return [ProcessingSettings] [Optional] Use the processing object to influence or override the data sent
50
+ # during card processing
43
51
  # @!attribute allow_payment_methods
44
- # @return [Array(CheckoutSdk::Common::PaymentSourceType)]
52
+ # @return [Array(CheckoutSdk::Common::PaymentSourceType)] [Optional] Specifies which payment method options to
53
+ # present to the customer.
45
54
  # @!attribute disabled_payment_methods
46
- # @return [Array(CheckoutSdk::Common::PaymentSourceType)]
55
+ # @return [Array(CheckoutSdk::Common::PaymentSourceType)] [Optional] Specifies which payment method options to
56
+ # not present to the customer.
47
57
  # @!attribute products
48
- # @return [Array(CheckoutSdk::Common::Product)]
58
+ # @return [Array(CheckoutSdk::Common::Product)] [Optional] Contains details about the products in the order.
49
59
  # @!attribute risk
50
- # @return [RiskRequest]
60
+ # @return [RiskRequest] [Optional] Configures the risk assessment performed during payment processing.
51
61
  # @!attribute customer_retry
52
- # @return [PaymentRetryRequest]
62
+ # @return [CheckoutSdk::Common::CustomerRetry] [Optional] Configures the parameters for customer retries
63
+ # performed by the customer on the checkout page.
53
64
  # @!attribute sender
54
- # @return [CheckoutSdk::Payments::Sender]
65
+ # @return [CheckoutSdk::Payments::Sender] [Optional] The sender of the payment.
55
66
  # @!attribute metadata
56
- # @return [Hash(String=>Object)]
67
+ # @return [Hash(String=>Object)] [Optional] Allows you to store additional information about the transaction.
57
68
  # @!attribute locale
58
- # @return [String] {LocaleType}
69
+ # @return [String] {LocaleType} [Optional] Creates a translated version of the page in the specified language
59
70
  # @!attribute three_ds
60
- # @return [ThreeDSRequest]
71
+ # @return [ThreeDSRequest] [Optional] Information required for 3D Secure payments
61
72
  # @!attribute capture
62
- # @return [TrueClass, FalseClass]
73
+ # @return [TrueClass, FalseClass] [Optional] Whether to capture the payment (if applicable).
63
74
  # @!attribute capture_on
64
- # @return [Time]
75
+ # @return [Time] [Optional] A timestamp (ISO 8601 code) that determines when the payment should be captured.
65
76
  # @!attribute instruction
66
- # @return [HostedPaymentInstruction]
77
+ # @return [HostedPaymentInstruction] [Optional] Details about the payment instruction.
67
78
  # @!attribute payment_method_configuration
68
- # @return [PaymentMethodConfiguration]
79
+ # @return [PaymentMethodConfiguration] [Optional] Configuration options for specific payment methods.
69
80
  # @!attribute payment_plan
70
81
  # @return [PaymentPlan] [Optional] The information to process a recurring payment request.
71
82
  # To be used when the payment_type is Recurring.
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The remittance details of a bank payout instruction, used for reconciliation.
6
+ #
7
+ # @!attribute reference
8
+ # A merchant-provided reference for the remittance payment.
9
+ # This value is used for payment reconciliation and is reviewed by our banking partner.
10
+ # [Optional]
11
+ # max 80 characters
12
+ # @return [String]
13
+ class InstructionRemittance
14
+ attr_accessor :reference
15
+ end
16
+ end
17
+ end
@@ -2,7 +2,12 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # The payment scheme type of a bank payout instruction.
6
+ # Enum: "local" "instant"
5
7
  class InstructionScheme
8
+ # @deprecated Not in the request schema, which only lists local and instant; still returned in
9
+ # PayoutDetails (instruction.scheme). Retained for backwards compatibility and will be removed in the
10
+ # next major version. There is no replacement.
6
11
  SWIFT = 'swift'
7
12
  LOCAL = 'local'
8
13
  INSTANT = 'instant'
@@ -5,64 +5,83 @@ require 'checkout_sdk/payments/payment_type'
5
5
  module CheckoutSdk
6
6
  module Payments
7
7
  # @!attribute amount
8
- # @return [Integer]
8
+ # @return [Integer] [Required] The payment amount.
9
9
  # @!attribute currency
10
- # @return [String] {CheckoutSdk::Common::Currency}
10
+ # @return [String] {CheckoutSdk::Common::Currency} [Required] The three-letter ISO currency code of the
11
+ # payment. The `currency` and `billing.address.country` fields determine which payment methods are shown on the
12
+ # payment page.
11
13
  # @!attribute payment_type
12
- # @return [String] {PaymentType}
14
+ # @return [String] {PaymentType} [Optional] This must be specified for card payments where the cardholder is not
15
+ # present (i.e., recurring or mail order / telephone order). Default: "Regular".
13
16
  # @!attribute payment_ip
14
- # @return [String]
17
+ # @return [String] [Optional] The Customers IP address. Only IPv4 and IPv6 addresses are accepted.
18
+ # @deprecated The Customers IP address is deprecated in the API reference. Will be removed in the next
19
+ # major version.
15
20
  # @!attribute billing_descriptor
16
- # @return [BillingDescriptor]
21
+ # @return [BillingDescriptor] [Optional] An optional description that is displayed on the customer's statement
22
+ # identifying a purchase
17
23
  # @!attribute reference
18
- # @return [String]
24
+ # @return [String] [Optional] A reference you can use to identify the payment.
19
25
  # @!attribute description
20
- # @return [String]
26
+ # @return [String] [Optional] A description of the payment.
21
27
  # @!attribute display_name
22
- # @return [String]
28
+ # @return [String] [Optional] The merchant name to display to customers on the checkout page.
23
29
  # @!attribute processing_channel_id
24
- # @return [String] - Not available on Previous.
30
+ # @return [String] [Optional] The processing channel to use for the payment. This field is required if you
31
+ # have more than one processing channel associated with your API key.
25
32
  # @!attribute amount_allocations
26
- # @return [Array(CheckoutSdk::Common::AmountAllocations)] - Not available on Previous.
33
+ # @return [Array(CheckoutSdk::Common::AmountAllocations)] [Optional] The sub-entities that the payment is being
34
+ # processed on behalf of.
27
35
  # @!attribute expires_in
28
- # @return [Integer]
36
+ # @return [Integer] [Optional] The time for which the link remains valid, in seconds. Minimum 1, maximum 5184000.
37
+ # Default: 86400.
29
38
  # @!attribute customer
30
- # @return [CheckoutSdk::Common::CustomerRequest]
39
+ # @return [CheckoutSdk::Common::CustomerRequest] [Optional] The customer's details
31
40
  # @!attribute shipping
32
- # @return [ShippingDetails]
41
+ # @return [ShippingDetails] [Optional] The address any products are being sent to.
33
42
  # @!attribute billing
34
- # @return [BillingInformation]
43
+ # @return [BillingInformation] [Required] The billing details.
35
44
  # @!attribute recipient
36
- # @return [PaymentRecipient]
45
+ # @return [PaymentRecipient] [Optional] Information about the recipient of the payment's funds.
37
46
  # @!attribute processing
38
- # @return [ProcessingSettings]
47
+ # @return [ProcessingSettings] [Optional] Use the processing object to influence or override the data sent
48
+ # during card processing
39
49
  # @!attribute allow_payment_methods
40
- # @return [Array(CheckoutSdk::Common::PaymentSourceType)]
50
+ # @return [Array(CheckoutSdk::Common::PaymentSourceType)] [Optional] Specifies which payment method options to
51
+ # present to the customer.
41
52
  # @!attribute disabled_payment_methods
42
- # @return [Array(CheckoutSdk::Common::PaymentSourceType)]
53
+ # @return [Array(CheckoutSdk::Common::PaymentSourceType)] [Optional] Specifies which payment method options to
54
+ # not present to the customer.
43
55
  # @!attribute products
44
- # @return [Array(CheckoutSdk::Common::Product)]
56
+ # @return [Array(CheckoutSdk::Common::Product)] [Optional] Contains details about the products in the order.
45
57
  # @!attribute metadata
46
- # @return [Hash(String=>Object)]
58
+ # @return [Hash(String=>Object)] [Optional] Allows you to store additional information about the transaction.
47
59
  # @!attribute three_ds
48
- # @return [ThreeDSRequest]
60
+ # @return [ThreeDSRequest] [Optional] Information required for 3D Secure payments.
49
61
  # @!attribute risk
50
- # @return [RiskRequest]
62
+ # @return [RiskRequest] [Optional] Configures the risk assessment performed during payment processing.
51
63
  # @!attribute customer_retry
52
- # @return [CheckoutSdk::Common::CustomerRetry]
64
+ # @return [CheckoutSdk::Common::CustomerRetry] [Optional] Configures the parameters for customer retries
65
+ # performed by the customer on the checkout page.
53
66
  # @!attribute sender
54
- # @return [CheckoutSdk::Payments::Sender]
67
+ # @return [CheckoutSdk::Payments::Sender] [Optional] The sender of the payment.
55
68
  # @!attribute return_url
56
- # @return [String]
69
+ # @return [String] [Optional] If provided, the success page will include a button that redirects your customer
70
+ # to the provided URL.
57
71
  # @!attribute locale
58
- # @return [String]
72
+ # @return [String] [Optional] Creates a translated version of the page in the specified language.
73
+ # Default: "en-GB".
59
74
  # @!attribute capture
60
- # @return [TrueClass, FalseClass]
75
+ # @return [TrueClass, FalseClass] [Optional] Whether to capture the payment (if applicable).
61
76
  # @!attribute capture_on
62
- # @return [Time]
77
+ # @return [Time] [Optional] A timestamp (ISO 8601 code) that determines when the payment should be captured.
63
78
  # @!attribute payment_plan
64
79
  # @return [PaymentPlan] [Optional] The information to process a recurring payment request.
65
80
  # To be used when the payment_type is Recurring.
81
+ # @!attribute instruction
82
+ # @return [HostedPaymentInstruction] [Optional] Details about the payment instruction.
83
+ # @!attribute payment_method_configuration
84
+ # @return [PaymentMethodConfiguration] [Optional] Configuration options for specific payment methods.
66
85
  # @!attribute authorization_type
67
86
  # @return [String] [Optional] {AuthorizationType} Enum: "Final" "Estimated". Default: "Final".
68
87
  class PaymentLink
@@ -95,7 +114,9 @@ module CheckoutSdk
95
114
  :capture,
96
115
  :capture_on,
97
116
  :payment_plan,
98
- :authorization_type
117
+ :authorization_type,
118
+ :instruction,
119
+ :payment_method_configuration
99
120
 
100
121
  def initialize(payment_type: CheckoutSdk::Payments::PaymentType::REGULAR)
101
122
  @payment_type = payment_type
@@ -2,27 +2,74 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # Additional details about the instruction of a payment, a payout or an unreferenced refund.
6
+ # Card payouts and unreferenced refunds use purpose and funds_transfer_type; bank payouts use scheme and
7
+ # remittance; regular payments (PaymentRequest) use purpose only.
8
+ #
5
9
  # @!attribute purpose
6
- # @return [String]
10
+ # The purpose of the payment, card payout or unreferenced refund.
11
+ # For card payouts, required if the card's issuer_country is one of AR, BD, CL, CO, EG, IN, MX or SA.
12
+ # For unreferenced refunds, required if the card's issuer_country is one of AR, BD, CL, CO, EG, IN or MX.
13
+ # For regular payments, it might be required for AFT transactions depending on the card's issuer_country.
14
+ # [Optional]
15
+ # Enum: "family_support" "expatriation" "travel_and_tourism" "education" "medical_treatment"
16
+ # "emergency_need" "leisure" "savings" "gifts" "donations" "financial_services" "it_services"
17
+ # "investment" "insurance" "loan_payment" "pension" "royalties" "other" "income"
18
+ # @return [String] {PaymentPurposeType}
7
19
  # @!attribute charge_bearer
20
+ # The charge bearer of a bank payout.
21
+ # [Optional]
22
+ # @deprecated Not in the request schema; still returned in PayoutDetails (instruction.charge_bearer).
23
+ # Retained for backwards compatibility and will be removed in the next major version. There is no
24
+ # replacement.
8
25
  # @return [String] {ChargeBearer}
9
26
  # @!attribute repair
27
+ # Whether the bank payout may be repaired.
28
+ # [Optional]
29
+ # @deprecated Not in the request schema; still returned in PayoutDetails (instruction.repair).
30
+ # Retained for backwards compatibility and will be removed in the next major version. There is no
31
+ # replacement.
10
32
  # @return [TrueClass, FalseClass]
11
33
  # @!attribute scheme
34
+ # An option to restrict the payment scheme type of a bank payout, when not available payouts will fail.
35
+ # [Optional]
36
+ # Enum: "local" "instant"
12
37
  # @return [String] {InstructionScheme}
38
+ # @!attribute remittance
39
+ # The remittance details of a bank payout, used for reconciliation.
40
+ # [Optional]
41
+ # @return [InstructionRemittance]
13
42
  # @!attribute quote_id
43
+ # The FX quote identifier of a bank payout.
44
+ # [Optional]
45
+ # @deprecated Not in the request schema; still returned in PayoutDetails (instruction.quote_id).
46
+ # Retained for backwards compatibility and will be removed in the next major version. There is no
47
+ # replacement.
14
48
  # @return [String]
15
49
  # @!attribute skip_expiry
50
+ # [Optional]
51
+ # @deprecated Not in any schema of the specification. Retained for backwards compatibility and will be
52
+ # removed in the next major version. There is no replacement.
16
53
  # @return [TrueClass, FalseClass]
17
54
  # @!attribute funds_transfer_type
55
+ # The funds transfer type code for the type of card payout you're performing.
56
+ # You can only use codes that have been assigned to you by the card schemes and Checkout.com, based
57
+ # on your business case and requirements. If you have only been assigned one funds transfer type
58
+ # code, this field is optional. For unreferenced refunds it is required if
59
+ # processing.processing_speed is fast: use MI for Visa and C60 for Mastercard.
60
+ # [Required] for card payouts, [Optional] for unreferenced refunds
18
61
  # @return [String]
19
62
  # @!attribute mvv
63
+ # [Optional]
64
+ # @deprecated Not in any schema of the specification. Retained for backwards compatibility and will be
65
+ # removed in the next major version. There is no replacement.
20
66
  # @return [String]
21
67
  class PaymentInstruction
22
68
  attr_accessor :purpose,
23
69
  :charge_bearer,
24
70
  :repair,
25
71
  :scheme,
72
+ :remittance,
26
73
  :quote_id,
27
74
  :skip_expiry,
28
75
  :funds_transfer_type,
@@ -62,7 +62,7 @@ module CheckoutSdk
62
62
  # @!attribute items
63
63
  # @return [Array(Product)]
64
64
  # @!attribute retry
65
- # @return [PaymentRetryRequest]
65
+ # @return [PaymentRetryRequest] [Optional] Configuration of asynchronous retries.
66
66
  # @!attribute metadata
67
67
  # @return [Hash{String => Object}]
68
68
  # @!attribute instruction