checkout_sdk 2.7.0 → 2.8.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 +4 -4
- data/lib/checkout_sdk/api_client.rb +3 -2
- data/lib/checkout_sdk/common/account_holder.rb +78 -1
- data/lib/checkout_sdk/common/account_holder_identification.rb +21 -0
- data/lib/checkout_sdk/common/common.rb +1 -0
- data/lib/checkout_sdk/common/customer_retry.rb +14 -2
- data/lib/checkout_sdk/common/residential_status_type.rb +11 -0
- data/lib/checkout_sdk/issuing/card_update_headers.rb +11 -12
- data/lib/checkout_sdk/issuing/issuing_client.rb +20 -11
- data/lib/checkout_sdk/payments/card_payout_item.rb +24 -0
- data/lib/checkout_sdk/payments/card_payout_processing.rb +39 -0
- data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +29 -0
- data/lib/checkout_sdk/payments/destination/card_destination.rb +20 -0
- data/lib/checkout_sdk/payments/destination/destination.rb +5 -0
- data/lib/checkout_sdk/payments/destination/destination_type.rb +7 -0
- data/lib/checkout_sdk/payments/destination/id_destination.rb +16 -0
- data/lib/checkout_sdk/payments/destination/network_token_destination.rb +63 -0
- data/lib/checkout_sdk/payments/destination/token_destination.rb +15 -0
- data/lib/checkout_sdk/payments/downtime_retry_request.rb +14 -0
- data/lib/checkout_sdk/payments/dunning_retry_request.rb +22 -0
- data/lib/checkout_sdk/payments/flow/flow_client.rb +0 -4
- data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +9 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +42 -31
- data/lib/checkout_sdk/payments/instruction_remittance.rb +17 -0
- data/lib/checkout_sdk/payments/instruction_scheme.rb +5 -0
- data/lib/checkout_sdk/payments/links/payment_link.rb +50 -29
- data/lib/checkout_sdk/payments/payment_instruction.rb +48 -1
- data/lib/checkout_sdk/payments/payment_request.rb +1 -1
- data/lib/checkout_sdk/payments/payment_retry_request.rb +9 -7
- data/lib/checkout_sdk/payments/payment_segment.rb +11 -0
- data/lib/checkout_sdk/payments/payment_type.rb +4 -1
- data/lib/checkout_sdk/payments/payments.rb +11 -0
- data/lib/checkout_sdk/payments/payments_client.rb +10 -0
- data/lib/checkout_sdk/payments/payout_billing_descriptor.rb +10 -0
- data/lib/checkout_sdk/payments/payout_request.rb +59 -1
- data/lib/checkout_sdk/payments/sender/corporate_sender.rb +19 -0
- data/lib/checkout_sdk/payments/sender/government_sender.rb +21 -0
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +46 -0
- data/lib/checkout_sdk/payments/sender/instrument_sender.rb +3 -0
- data/lib/checkout_sdk/payments/sender/sender.rb +16 -0
- data/lib/checkout_sdk/payments/sessions/payment_sessions_request.rb +55 -32
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb +10 -1
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb +5 -4
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb +29 -1
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb +34 -1
- data/lib/checkout_sdk/payments/setups/bacs_payment_method.rb +70 -33
- data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +3 -2
- data/lib/checkout_sdk/payments/setups/card_present_payment_method.rb +2 -1
- data/lib/checkout_sdk/payments/setups/cash_app_payment_method.rb +3 -3
- data/lib/checkout_sdk/payments/setups/pay_by_bank_payment_method.rb +39 -15
- data/lib/checkout_sdk/payments/setups/payment_setup_payment_type.rb +19 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_risk.rb +18 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +110 -6
- data/lib/checkout_sdk/payments/setups/stablecoin_payment_method.rb +2 -1
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +8 -0
- data/lib/checkout_sdk/payments/source/entity_source.rb +5 -0
- data/lib/checkout_sdk/payments/source/payout_source.rb +12 -1
- data/lib/checkout_sdk/payments/unreferenced_refund_request.rb +89 -0
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +12 -2
|
@@ -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
|
|
@@ -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)
|
|
@@ -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 [
|
|
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]
|
|
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)] -
|
|
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
|
-
#
|
|
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
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# Configuration of asynchronous retries (POST /payments).
|
|
6
|
+
#
|
|
5
7
|
# @!attribute enabled
|
|
6
|
-
# @return [TrueClass, FalseClass]
|
|
7
|
-
# @!attribute
|
|
8
|
-
# @return [
|
|
9
|
-
# @!attribute
|
|
10
|
-
# @return [
|
|
8
|
+
# @return [TrueClass, FalseClass] [Required] Indicates whether asynchronous retries are enabled for the payment.
|
|
9
|
+
# @!attribute dunning
|
|
10
|
+
# @return [DunningRetryRequest] [Optional] Configuration of asynchronous Dunning retries.
|
|
11
|
+
# @!attribute downtime
|
|
12
|
+
# @return [DowntimeRetryRequest] [Optional] Configuration of asynchronous Downtime retries.
|
|
11
13
|
class PaymentRetryRequest
|
|
12
14
|
attr_accessor :enabled,
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
+
:dunning,
|
|
16
|
+
:downtime
|
|
15
17
|
end
|
|
16
18
|
end
|
|
17
19
|
end
|
|
@@ -2,11 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The dimension details about business segment for payment request. At least one dimension required.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute brand
|
|
8
|
+
# The brand of business segment.
|
|
9
|
+
# [Optional]
|
|
10
|
+
# max 50 characters
|
|
6
11
|
# @return [String]
|
|
7
12
|
# @!attribute business_category
|
|
13
|
+
# The category of business segment.
|
|
14
|
+
# [Optional]
|
|
15
|
+
# max 50 characters
|
|
8
16
|
# @return [String]
|
|
9
17
|
# @!attribute market
|
|
18
|
+
# The market of business segment.
|
|
19
|
+
# [Optional]
|
|
20
|
+
# max 50 characters
|
|
10
21
|
# @return [String]
|
|
11
22
|
class PaymentSegment
|
|
12
23
|
attr_accessor :brand,
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The payment type of a payment request.
|
|
6
|
+
# Enum: "Regular" "Recurring" "MOTO" "Installment" "PayLater" "Unscheduled"
|
|
5
7
|
module PaymentType
|
|
6
8
|
REGULAR = 'Regular'
|
|
7
9
|
RECURRING = 'Recurring'
|
|
8
|
-
MOTO = '
|
|
10
|
+
MOTO = 'MOTO'
|
|
9
11
|
INSTALLMENT = 'Installment'
|
|
12
|
+
PAY_LATER = 'PayLater'
|
|
10
13
|
UNSCHEDULED = 'Unscheduled'
|
|
11
14
|
end
|
|
12
15
|
end
|
|
@@ -5,6 +5,10 @@ require 'checkout_sdk/payments/passenger'
|
|
|
5
5
|
require 'checkout_sdk/payments/authorization_request'
|
|
6
6
|
require 'checkout_sdk/payments/d_local_processing_settings'
|
|
7
7
|
require 'checkout_sdk/payments/payout_request'
|
|
8
|
+
require 'checkout_sdk/payments/unreferenced_refund_request'
|
|
9
|
+
require 'checkout_sdk/payments/card_payout_item'
|
|
10
|
+
require 'checkout_sdk/payments/card_payout_processing'
|
|
11
|
+
require 'checkout_sdk/payments/payment_segment'
|
|
8
12
|
require 'checkout_sdk/payments/user_action'
|
|
9
13
|
require 'checkout_sdk/payments/three_ds_request'
|
|
10
14
|
require 'checkout_sdk/payments/product_type'
|
|
@@ -16,6 +20,7 @@ require 'checkout_sdk/payments/payer'
|
|
|
16
20
|
require 'checkout_sdk/payments/authorization_type'
|
|
17
21
|
require 'checkout_sdk/payments/os_type'
|
|
18
22
|
require 'checkout_sdk/payments/payment_instruction'
|
|
23
|
+
require 'checkout_sdk/payments/instruction_remittance'
|
|
19
24
|
require 'checkout_sdk/payments/payment_method_details'
|
|
20
25
|
require 'checkout_sdk/payments/refund_request'
|
|
21
26
|
require 'checkout_sdk/payments/payments_search_request'
|
|
@@ -42,6 +47,9 @@ require 'checkout_sdk/payments/shipping_preference'
|
|
|
42
47
|
require 'checkout_sdk/payments/exemption'
|
|
43
48
|
require 'checkout_sdk/payments/three_ds_flow_type'
|
|
44
49
|
require 'checkout_sdk/payments/void_request'
|
|
50
|
+
require 'checkout_sdk/payments/dunning_retry_request'
|
|
51
|
+
require 'checkout_sdk/payments/downtime_retry_request'
|
|
52
|
+
require 'checkout_sdk/payments/payment_retry_request'
|
|
45
53
|
require 'checkout_sdk/payments/payment_request'
|
|
46
54
|
require 'checkout_sdk/payments/processing_settings'
|
|
47
55
|
require 'checkout_sdk/payments/processing_data'
|
|
@@ -137,6 +145,7 @@ require 'checkout_sdk/payments/sender/sender_information'
|
|
|
137
145
|
|
|
138
146
|
# Destination
|
|
139
147
|
require 'checkout_sdk/payments/destination/destination'
|
|
148
|
+
require 'checkout_sdk/payments/destination/network_token_destination'
|
|
140
149
|
require 'checkout_sdk/payments/destination/token_destination'
|
|
141
150
|
require 'checkout_sdk/payments/destination/bank_account_destination'
|
|
142
151
|
require 'checkout_sdk/payments/destination/card_destination'
|
|
@@ -219,6 +228,7 @@ require 'checkout_sdk/payments/setups/payment_setup_account_funding_transaction'
|
|
|
219
228
|
require 'checkout_sdk/payments/setups/payment_setup_billing_descriptor'
|
|
220
229
|
require 'checkout_sdk/payments/setups/payment_setup_presentment_details'
|
|
221
230
|
require 'checkout_sdk/payments/setups/payment_setup_terminal'
|
|
231
|
+
require 'checkout_sdk/payments/setups/payment_setup_risk'
|
|
222
232
|
require 'checkout_sdk/payments/setups/payment_setup_accommodation_address'
|
|
223
233
|
require 'checkout_sdk/payments/setups/payment_setup_accommodation_guest'
|
|
224
234
|
require 'checkout_sdk/payments/setups/payment_setup_accommodation_room'
|
|
@@ -239,6 +249,7 @@ require 'checkout_sdk/payments/setups/payment_setup_device_client'
|
|
|
239
249
|
require 'checkout_sdk/payments/setups/payment_setup_device_os'
|
|
240
250
|
require 'checkout_sdk/payments/setups/payment_setup_payment_method_initialization'
|
|
241
251
|
require 'checkout_sdk/payments/setups/payment_setup_payment_method_status'
|
|
252
|
+
require 'checkout_sdk/payments/setups/payment_setup_payment_type'
|
|
242
253
|
require 'checkout_sdk/payments/setups/stablecoin_payment_method'
|
|
243
254
|
require 'checkout_sdk/payments/setups/payment_setups_client'
|
|
244
255
|
|
|
@@ -27,6 +27,16 @@ module CheckoutSdk
|
|
|
27
27
|
idempotency_key)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
# @param [Hash, UnreferencedRefundRequest] unreferenced_refund_request
|
|
31
|
+
# @param [String, nil] idempotency_key
|
|
32
|
+
# @return [Hash]
|
|
33
|
+
def request_unreferenced_refund(unreferenced_refund_request, idempotency_key = nil)
|
|
34
|
+
api_client.invoke_post(PAYMENTS_PATH,
|
|
35
|
+
sdk_authorization,
|
|
36
|
+
unreferenced_refund_request,
|
|
37
|
+
idempotency_key)
|
|
38
|
+
end
|
|
39
|
+
|
|
30
40
|
# @param [String] payment_id
|
|
31
41
|
# @param [Hash, CaptureRequest] capture_request
|
|
32
42
|
# @param [String, nil] idempotency_key
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The billing descriptor of a bank payout. Beneficiary banks typically construct the billing descriptor
|
|
6
|
+
# using the billing descriptor reference and sender information. For direct sellers, the sender is
|
|
7
|
+
# typically your entity's legal company name. If the ultimate sender is provided, then it is the values
|
|
8
|
+
# of the Sender object.
|
|
9
|
+
#
|
|
5
10
|
# @!attribute reference
|
|
11
|
+
# The reference shown on the beneficiary's bank statement. The length varies per beneficiary bank;
|
|
12
|
+
# in general, fewer than 11 characters are recommended. References are not supported in the US.
|
|
13
|
+
# [Required]
|
|
14
|
+
# min 11 characters
|
|
15
|
+
# max 15 characters
|
|
6
16
|
# @return [String]
|
|
7
17
|
class PayoutBillingDescriptor
|
|
8
18
|
attr_accessor :reference
|