# ADOBE CONFIDENTIAL # # Copyright 2023 Adobe # All Rights Reserved. # # NOTICE: All information contained herein is, and remains # the property of Adobe and its suppliers, if any. The intellectual # and technical concepts contained herein are proprietary to Adobe # and its suppliers and are protected by all applicable intellectual # property laws, including trade secret and copyright laws. # Dissemination of this information or reproduction of this material # is strictly forbidden unless prior written permission is obtained # from Adobe. type Query { getPaymentConfig( location: PaymentLocation! @doc(description: "Defines the origin location for that payment request") ): PaymentConfigOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfig") @doc(description: "Retrieves the payment configuration for a given location") getPaymentSDK( location: PaymentLocation! @doc(description: "Defines the origin location for that payment request") ): GetPaymentSDKOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\GetPaymentSDK") @doc(description: "Gets the payment SDK urls and values") getPaymentOrder( cartId: String! @doc(description: "The customer cart ID") id: String! @doc(description: "PayPal order ID") ): PaymentOrderOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\GetPaymentOrder") @doc(description: "Retrieves the payment details for the order") getVaultConfig: VaultConfigOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\GetVaultConfig") @doc(description: "Retrieves the vault configuration") } type Mutation { createPaymentOrder( input: CreatePaymentOrderInput! @doc(description: "Contains payment order details that are used while processing the payment order") ): CreatePaymentOrderOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\CreatePaymentOrder") @doc(description:"Creates a payment order for further payment processing") syncPaymentOrder( input: SyncPaymentOrderInput @doc(description: "Describes the variables needed to synchronize the payment order details") ): Boolean @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\SyncPaymentOrder") @doc(description:"Synchronizes the payment order details for further payment processing") createVaultCardSetupToken( input: CreateVaultCardSetupTokenInput! @doc(description: "Describe the variables needed to create a vault card setup token") ): CreateVaultCardSetupTokenOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\CreateVaultCardSetupToken") @doc(description:"Creates a vault card setup token") createVaultCardPaymentToken( input: CreateVaultCardPaymentTokenInput! @doc(description: "Describe the variables needed to create a vault card payment token") ): CreateVaultCardPaymentTokenOutput @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\CreateVaultCardPaymentToken") @doc(description:"Creates a vault payment token") } type GetPaymentSDKOutput @doc(description: "Gets the payment SDK URLs and values") { sdkParams: [PaymentSDKParamsItem] @doc(description: "The payment SDK parameters") } type PaymentSDKParamsItem { code: String @doc(description: "The payment method code used in the order") params: [SDKParams] @doc(description: "The payment SDK parameters") } type PaymentOrderOutput @doc(description: "Contains the payment order details") { status: String @doc(description: "The status of the payment order") mp_order_id: String @doc(description: "The order ID generated by Payment Services") id: String @doc(description: "PayPal order ID") payment_source_details: PaymentSourceDetails @doc(description: "Details about the card used on the order") } type PaymentSourceDetails { card: Card @doc(description: "Details about the card used on the order") } type Card { name: String @doc(description: "Name on the card") last_digits: String @doc(description: "Last four digits of the card") card_expiry_month: String @doc(description: "Expiration month of the card") card_expiry_year: String @doc(description: "Expiration year of the card") bin_details: CardBin @doc(description: "Card bin details") } type CardBin { bin: String @doc(description: "Card bin number") } input CreatePaymentOrderInput @doc(description: "Contains payment order details that are used while processing the payment order") { cartId: String! @doc(description: "The customer cart ID") methodCode: String! @doc(description: "The code for the payment method used in the order") paymentSource: String! @doc(description: "The identifiable payment source for the payment method") vaultIntent: Boolean @doc(description: "Indicates whether the payment information should be vaulted") location: PaymentLocation! @doc(description: "Defines the origin location for that payment request") } input SyncPaymentOrderInput @doc(description: "Synchronizes the payment order details") { cartId: String! @doc(description: "The customer cart ID") id: String! @doc(description: "PayPal order ID") } type CreatePaymentOrderOutput @doc(description: "Contains payment order details that are used while processing the payment order") { status: String @doc(description: "The status of the payment order") mp_order_id: String @doc(description: "The order ID generated by Payment Services") id: String @doc(description: "PayPal order ID") amount: Float @doc(description: "The amount of the payment order") currency_code: String @doc(description: "The currency of the payment order") } enum PaymentLocation @doc(description: "Defines the origin location for that payment request") { PRODUCT_DETAIL MINICART CART CHECKOUT ADMIN } type PaymentConfigOutput @doc(description: "Retrieves the payment configuration for a given location") { apple_pay: ApplePayConfig @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "ApplePay payment method configuration") google_pay: GooglePayConfig @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "GooglePay payment method configuration") hosted_fields: HostedFieldsConfig @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "Hosted fields payment method configuration") smart_buttons: SmartButtonsConfig @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "Smart Buttons payment method configuration") } interface PaymentConfigItem @typeResolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigItemTypeResolver") @doc(description: "Contains payment fields that are common to all types of payment methods.") { code: String @doc(description: "The payment method code as defined in the payment gateway") is_visible: Boolean @doc(description: "Indicates whether the payment method is displayed") sdk_params: [SDKParams] @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\SdkParams") @doc(description: "The PayPal parameters required to load the JS SDK") sort_order: String @doc(description: "The relative order the payment method is displayed on the checkout page") payment_intent: String @doc(description: "Defines the payment intent (Authorize or Capture") title: String @doc(description: "The name displayed for the payment method") } type PaymentCommonConfig implements PaymentConfigItem {} type HostedFieldsConfig implements PaymentConfigItem { payment_source: String @doc(description: "The payment source for the payment method") three_ds: Boolean @doc(description: "Whether 3DS is activated; true if 3DS mode is not OFF.") @deprecated(reason: "Use 'three_ds_mode' instead.") three_ds_mode: ThreeDSMode @doc(description: "3DS mode") @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\ThreeDSModeResolver") cc_vault_code: String @doc(description: "Vault payment method code") is_vault_enabled: Boolean @doc(description: "Card vault enabled") requires_card_details: Boolean @doc(description: "Card and bin details required") } enum ThreeDSMode @doc(description: "3D Secure mode.") { OFF SCA_WHEN_REQUIRED SCA_ALWAYS } type SmartButtonsConfig implements PaymentConfigItem { display_message: Boolean @doc(description: "Indicates whether to display the PayPal Pay Later message") message_styles: MessageStyles @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "Contains details about the styles for the PayPal Pay Later message") button_styles: ButtonStyles @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "The styles for the PayPal Smart Button configuration") display_venmo: Boolean @doc(description: "Indicates whether to display Venmo") } type ApplePayConfig implements PaymentConfigItem { button_styles: ButtonStyles @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "The styles for the ApplePay Smart Button configuration") payment_source: String @doc(description: "The payment source for the payment method") } type GooglePayConfig implements PaymentConfigItem { button_styles: GooglePayButtonStyles @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "The styles for the GooglePay Button configuration") payment_source: String @doc(description: "The payment source for the payment method") three_ds_mode: ThreeDSMode @doc(description: "3DS mode") @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\ThreeDSModeResolver") } type ButtonStyles { layout: String @doc(description: "The button layout") color: String @doc(description: "The button color") shape: String @doc(description: "The button shape") height: Int @doc(description: "The button height in pixels") label: String @doc(description: "The button label") tagline: Boolean @doc(description: "Indicates whether the tagline is displayed") use_default_height: Boolean @doc(description: "Defines if the button uses default height. If the value is false, the value of height is used") } type GooglePayButtonStyles { color: String @doc(description: "The button color") height: Int @doc(description: "The button height in pixels") type: String @doc(description: "The button type") } type MessageStyles { layout: String @doc(description: "The message layout") logo: MessageStyleLogo @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "The message logo") } type MessageStyleLogo { type: String @doc(description: "The type of logo for the PayPal Pay Later messaging") } type SDKParams @doc(description: "Defines the name and value of a SDK parameter") { name: String @doc(description: "The name of the SDK parameter") value: String @doc(description: "The value of the SDK parameter") } input PaymentMethodInput { payment_services_paypal_hosted_fields: HostedFieldsInput @doc(description:"Required input for Hosted Fields") payment_services_paypal_smart_buttons: SmartButtonMethodInput @doc(description:"Required input for Smart buttons") payment_services_paypal_apple_pay: ApplePayMethodInput @doc(description:"Required input for Apple Pay button") payment_services_paypal_google_pay: GooglePayMethodInput @doc(description:"Required input for Google Pay button") payment_services_paypal_vault: VaultMethodInput @doc(description:"Required input for vault") } input VaultMethodInput @doc(description: "Vault payment inputs") { payments_order_id: String @doc(description: "The payment services order ID") paypal_order_id: String @doc(description: "PayPal order ID") payment_source: String @doc(description: "The payment source for the payment method") public_hash: String @doc(description: "The public hash of the token.") } input SmartButtonMethodInput @doc(description: "Smart button payment inputs") { payments_order_id: String @doc(description: "The payment services order ID") paypal_order_id: String @doc(description: "PayPal order ID") payment_source: String @doc(description: "The payment source for the payment method") } input ApplePayMethodInput @doc(description: "Apple Pay inputs") { payments_order_id: String @doc(description: "The payment services order ID") paypal_order_id: String @doc(description: "PayPal order ID") payment_source: String @doc(description: "The payment source for the payment method") } input GooglePayMethodInput @doc(description: "Google Pay inputs") { payments_order_id: String @doc(description: "The payment services order ID") paypal_order_id: String @doc(description: "PayPal order ID") payment_source: String @doc(description: "The payment source for the payment method") } input HostedFieldsInput @doc(description: "Hosted Fields payment inputs") { payments_order_id: String @doc(description: "The payment services order ID") paypal_order_id: String @doc(description: "PayPal order ID") payment_source: String @doc(description: "The payment source for the payment method") is_active_payment_token_enabler: Boolean @doc(description: "Indicates whether details about the shopper's credit/debit card should be tokenized for later usage. Required only if Vault is enabled for the Payment Services payment integration.") cardBin: String @doc(description: "Card bin number") cardExpiryMonth: String @doc(description: "Expiration month of the card") cardExpiryYear: String @doc(description: "Expiration year of the card") cardLast4: String @doc(description: "Last four digits of the card") holderName: String @doc(description: "Name on the card") } input CreateVaultCardSetupTokenInput @doc(description: "Describe the variables needed to create a vault card setup token") { setup_token: VaultSetupTokenInput! @doc(description: "The setup token information") three_ds_mode: ThreeDSMode @doc(description: "The 3DS mode") } input VaultSetupTokenInput @doc(description: "The payment source information") { payment_source: PaymentSourceInput! @doc(description: "The payment source information") } input PaymentSourceInput @doc(description: "The payment source information") { card: CardPaymentSourceInput! @doc(description: "The card payment source information") } input CardPaymentSourceInput @doc(description: "The card payment source information") { name: String @doc(description: "The name on the cardholder") billing_address: BillingAddressPaymentSourceInput! @doc(description: "The billing address of the card") } input BillingAddressPaymentSourceInput @doc(description: "The billing address information") { address_line_1: String @doc(description: "The first line of the address") address_line_2: String @doc(description: "The second line of the address") region: String @doc(description: "The region of the address") city: String @doc(description: "The city of the address") postal_code: String @doc(description: "The postal code of the address") country_code: String! @doc(description: "The country of the address") } type CreateVaultCardSetupTokenOutput @doc(description: "The setup token id information") { setup_token: String! @doc(description: "The setup token id") } input CreateVaultCardPaymentTokenInput @doc(description: "Describe the variables needed to create a vault payment token") { setup_token_id: String! @doc(description: "The setup token obtained by the createVaultCardSetupToken endpoint") card_description: String @doc(description: "Description of the vaulted card") } type CreateVaultCardPaymentTokenOutput @doc(description: "The vault token id and information about the payment source") { vault_token_id: String! @doc(description: "The vault payment token information") payment_source: PaymentSourceOutput! @doc(description: "The payment source information") } type PaymentSourceOutput @doc(description: "The payment source information") { card: CardPaymentSourceOutput! @doc(description: "The card payment source information") } type CardPaymentSourceOutput @doc(description: "The card payment source information") { brand: String @doc(description: "The brand of the card") last_digits: String @doc(description: "The last digits of the card") expiry: String @doc(description: "The expiry of the card") } type VaultConfigOutput @doc(description: "Retrieves the vault configuration") { credit_card: VaultCreditCardConfig @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\PaymentConfigMethod") @doc(description: "Credit card vault method configuration") } type VaultCreditCardConfig { three_ds_mode: ThreeDSMode @doc(description: "3DS mode") @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\ThreeDSModeResolver") is_vault_enabled: Boolean @doc(description: "Is vault enabled") sdk_params: [SDKParams] @resolver(class: "\\Magento\\PaymentServicesPaypalGraphQl\\Model\\Resolver\\SdkParams") @doc(description: "The parameters required to load the Paypal JS SDK") }