using Checkout.Common; using Newtonsoft.Json; using System.Collections.Generic; namespace Checkout.Payments { /// /// Settings that control how the payment is processed. /// /// /// Shared across several request shapes. POST /payments resolves to /// PaymentRequestProcessing, while hosted payments, payment links and payment /// sessions resolve to the wider PaymentInterfacesProcessing. A property is therefore /// not necessarily read by every endpoint that accepts this object; the remarks below name /// the exceptions. /// public class ProcessingSettings { /// /// Indicates if the payment is an Account Funding Transaction. /// [Optional] /// public bool? Aft { get; set; } /// /// The discount amount applied to the transaction by the merchant. /// [Optional] /// minimum 0 /// public decimal? DiscountAmount { get; set; } /// /// The total freight or shipping and handling charges for the transaction. /// [Optional] /// minimum 0 /// public decimal? ShippingAmount { get; set; } /// /// The total amount of sales tax on the total purchase amount. /// [Optional] /// minimum 0 /// public decimal? TaxAmount { get; set; } /// /// Invoice ID number. /// [Optional] /// max 127 characters /// public string InvoiceId { get; set; } /// /// The label that overrides the business name in the PayPal account on the PayPal pages. /// [Optional] /// max 127 characters /// public string BrandName { get; set; } /// /// The language and region of the customer in ISO 639-2 language code; the value consists /// of language-country. /// [Optional] /// Pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$ /// 2 to 10 characters /// public string Locale { get; set; } /// /// Key-and-value pairs with merchant-specific data for the transaction. /// [Optional] /// public PartnerCustomerRiskData PartnerCustomerRiskData { get; set; } /// /// Promo codes. Defines which of the configured payment options within a payment category /// (pay_later, pay_over_time, and so on) are shown for this purchase. /// [Optional] /// public IList CustomPaymentMethodIds { get; set; } /// /// Contains information about the airline ticket and flights booked by the customer. /// [Optional] /// public IList AirlineData { get; set; } /// /// Contains information about the accommodation booked by the customer. /// [Optional] /// public IList AccommodationData { get; set; } /// /// The number provided by the cardholder. A purchase order or invoice number may be used. /// [Optional] /// max 15 characters /// public string OrderId { get; set; } /// /// Surcharge amount applied to the transaction by the merchant, in the minor currency unit. /// [Optional] /// minimum 0 /// public long? SurchargeAmount { get; set; } /// /// The total charges for any import or export duty included in the transaction. /// [Optional] /// minimum 0 /// public decimal? DutyAmount { get; set; } /// /// The tax amount of the freight or shipping and handling charges for the transaction. /// [Optional] /// minimum 0 /// public decimal? ShippingTaxAmount { get; set; } /// /// The two-letter ISO country code of the purchase country. /// [Optional] /// max 2 characters /// public CountryCode? PurchaseCountry { get; set; } /// /// Indicates the reason for a merchant-initiated payment request. /// [Optional] /// One of: Delayed_charge, Resubmission, No_show, Reauthorization /// public MerchantInitiatedReason? MerchantInitiatedReason { get; set; } /// /// Unique number of the campaign this payment runs in. Only required for Afterpay /// campaign invoices. /// [Optional] /// public long? CampaignId { get; set; } /// /// The payment for a merchant's order may be split; the original order price indicates /// the transaction amount of the entire order. /// [Optional] /// minimum 0 /// public decimal? OriginalOrderAmount { get; set; } /// /// Merchant receipt ID. /// [Optional] /// max 32 characters /// public string ReceiptId { get; set; } /// /// A URL you can use to notify the customer that the order has been created. /// [Optional] /// public string MerchantCallbackUrl { get; set; } /// /// The line of business for the payment. Beta. /// [Optional] /// public string LineOfBusiness { get; set; } /// /// Specifies the preferred type of Primary Account Number (PAN) for the payment. /// Only applies when source.type is a card, instrument or token. /// [Optional] /// One of: fpan, dpan /// public PanProcessedType? PanPreference { get; set; } /// /// Indicates whether to provision a network token for the payment. /// [Optional] /// public bool? ProvisionNetworkToken { get; set; } /// /// The preferred scheme for co-badged card payment processing. If performing 3DS through /// a third party, set this to the scheme that processed 3DS. /// [Optional] /// One of: mastercard, visa, cartes_bancaires /// public PreferredSchema? PreferredScheme { get; set; } /// /// Product type of the payment. Required when source.type is wechatpay. /// [Optional] /// public ProductType? ProductType { get; set; } /// /// Value obtained from the WeChat Web Authorization API before initiating Official /// Account or Mini Program payments. Required if source.type is wechatpay. /// [Optional] /// public string OpenId { get; set; } /// /// The client-side terminal type: a website opened in a desktop browser, a mobile /// browser, or a mobile application. /// [Optional] /// One of: APP, WAP, WEB /// public TerminalType? TerminalType { get; set; } /// /// The operating system type. Required when TerminalType is not WEB. /// [Optional] /// One of: ANDROID, IOS /// public OsType? OsType { get; set; } /// /// Shipping preference. /// [Optional] /// One of: no_shipping, set_provided_address, get_from_file /// public ShippingPreference? ShippingPreference { get; set; } /// /// Property required by PayPal to have an appropriate payment flow. /// [Optional] /// One of: pay_now, continue /// public UserAction? UserAction { get; set; } /// /// Not in the current specification. /// [Optional] /// /// /// Serializes as set_transaction_context, which no request processing schema /// defines, so the gateway discards it. Retained for backwards compatibility. /// public IList> SetTransactionContext { get; set; } /// /// Not in the current specification. /// [Optional] /// /// /// Serializes as dlocal, which no request processing schema defines, so the /// gateway discards it. Retained for backwards compatibility. /// public DLocalProcessingSettings Dlocal { get; set; } /// /// One time password sent to the customer by SMS. /// [Optional] /// max 50 characters /// /// /// Defined on the payment contexts payment request and on the capture request, not on /// PaymentRequestProcessing. /// public string OtpValue { get; set; } /// /// Not in the current specification. /// [Optional] /// /// /// Serializes as shipping_delay, which no request processing schema defines, so /// the gateway discards it. Retained for backwards compatibility. /// public long? ShippingDelay { get; set; } /// /// Not in the current specification. /// [Optional] /// /// /// Serializes as shipping_info, which no request processing schema defines, so the /// gateway discards it. Retained for backwards compatibility. /// public IList ShippingInfo { get; set; } /// /// Not in the current specification. /// [Optional] /// /// /// Serializes as senderInformation, in camelCase, which no request processing /// schema defines, so the gateway discards it. Retained for backwards compatibility. /// [JsonProperty(PropertyName = "senderInformation")] public string SenderInformation { get; set; } /// /// Specifies whether to process the payment as a credit or debit transaction, if a combo /// card is used. Required for domestic payments in Brazil. /// [Optional] /// One of: credit, debit /// public CardType? CardType { get; set; } /// /// The unique identifier for Visa-registered ramp providers. Required if you are a /// Visa-registered ramp provider operating with affiliates. /// [Optional] /// Pattern: ^[a-zA-Z0-9]{1,15}$ /// max 15 characters /// public string AffiliateId { get; set; } /// /// The affiliate URL. Required if you are a Visa-registered ramp provider operating with /// affiliates. /// [Optional] /// public string AffiliateUrl { get; set; } /// /// Information about the payment aggregator. /// [Optional] /// public ProcessingAggregator Aggregator { get; set; } /// /// The transaction identifier to track a payment request. /// [Optional] /// public string ReconciliationId { get; set; } /// /// The foreign retailer amount the merchant applied to the transaction, in the minor /// currency unit. /// [Optional] /// minimum 0 /// public long? ForeignRetailerAmount { get; set; } /// /// Specifies which ACH service to use for the payment, if you set source.type to ach. /// [Optional] /// One of: same_day, standard /// public AchServiceType? ServiceType { get; set; } /// /// The customer's 6-digit Blik code. Required when source.type is blik and /// merchant_initiated is false (for example, for Regular payments and the initial payment /// of a Recurring agreement). /// [Optional] /// Pattern: ^\d{6}$ /// 6 characters /// public string PartnerCode { get; set; } /// /// The scheme transaction link identifier. /// [Optional] /// public string SchemeTransactionLinkId { get; set; } } }