diff --git a/src/data/navigation/sections/graphql.js b/src/data/navigation/sections/graphql.js index f01f941f7..308a16973 100644 --- a/src/data/navigation/sections/graphql.js +++ b/src/data/navigation/sections/graphql.js @@ -305,18 +305,6 @@ module.exports = [ title: "getPayflowLinkToken", path: "/graphql/schema/checkout/queries/get-payflow-link-token/", }, - { - title: "getPaymentConfig", - path: "/graphql/schema/checkout/queries/get-payment-config/", - }, - { - title: "getPaymentOrder", - path: "/graphql/schema/checkout/queries/get-payment-order/", - }, - { - title: "getPaymentSDK", - path: "/graphql/schema/checkout/queries/get-payment-sdk/", - }, ], }, { @@ -335,10 +323,6 @@ module.exports = [ title: "createPayflowProToken", path: "/graphql/schema/checkout/mutations/create-payflow-pro-token/", }, - { - title: "createPaymentOrder", - path: "/graphql/schema/checkout/mutations/create-payment-order/", - }, { title: "createPaypalExpressToken", path: "/graphql/schema/checkout/mutations/create-paypal-express-token/", @@ -351,10 +335,6 @@ module.exports = [ title: "handlePayflowProResponse", path: "/graphql/schema/checkout/mutations/handle-payflow-pro-response/", }, - { - title: "syncPaymentOrder", - path: "/graphql/schema/checkout/mutations/sync-payment-order/", - }, ], }, ], @@ -1246,22 +1226,72 @@ module.exports = [ ], }, { - title: "Payment Services payment methods", - path: "/graphql/payment-services/", + title: "Payment Services extension", + path: "/graphql/payment-services-extension/", pages: [ { - title: "Checkout", - path: "/graphql/payment-services/checkout.md" - }, - { - title: "Minicart", - path: "/graphql/payment-services/minicart.md" - }, + title: "Workflows", + path: "/graphql/payment-services-extension/workflows/", + pages: [ + { + title: "Checkout", + path: "/graphql/payment-services-extension/workflows/checkout.md", + }, + { + title: "Minicart", + path: "/graphql/payment-services-extension/workflows/minicart.md", + }, + { + title: "Vault", + path: "/graphql/payment-services-extension/workflows/vault.md", + }, + ], + }, { - title: "Vault", - path: "/graphql/payment-services/vault.md" - } - ] + title: "Queries", + path: "/graphql/payment-services-extension/queries/", + pages: [ + { + title: "getPaymentConfig", + path: "/graphql/schema/checkout/queries/get-payment-config/", + }, + { + title: "getPaymentOrder", + path: "/graphql/schema/checkout/queries/get-payment-order/", + }, + { + title: "getPaymentSDK", + path: "/graphql/schema/checkout/queries/get-payment-sdk/", + }, + { + title: "getVaultConfig", + path: "/graphql/schema/checkout/queries/get-vault-config/", + }, + ], + }, + { + title: "Mutations", + path: "/graphql/payment-services-extension/mutations/", + pages: [ + { + title: "createPaymentOrder", + path: "/graphql/payment-services-extension/mutations/create-payment-order/", + }, + { + title: "createVaultCardPaymentToken", + path: "/graphql/payment-services-extension/mutations/create-vault-card-payment-token/", + }, + { + title: "createVaultCardSetupToken", + path: "/graphql/payment-services-extension/mutations/create-vault-card-setup-token/", + }, + { + title: "syncPaymentOrder", + path: "/graphql/payment-services-extension/mutations/sync-payment-order/", + }, + ], + }, + ], }, { title: "Tutorial", diff --git a/src/pages/graphql/payment-methods/index.md b/src/pages/graphql/payment-methods/index.md index e2266b61b..585119bfd 100644 --- a/src/pages/graphql/payment-methods/index.md +++ b/src/pages/graphql/payment-methods/index.md @@ -16,4 +16,4 @@ Supported payment providers include: - Klarna (deprecated) - PayPal -[Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 and higher provides enhanced payment method capabilities. See [Payment Services Payment Methods](../payment-services/index.md) for more information. +[Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 and higher provides enhanced payment method capabilities. See [Payment Services Payment Methods](../payment-services-extension/index.md) for more information. diff --git a/src/pages/graphql/payment-services/index.md b/src/pages/graphql/payment-services-extension/index.md similarity index 63% rename from src/pages/graphql/payment-services/index.md rename to src/pages/graphql/payment-services-extension/index.md index 046fe6d52..67805dffb 100644 --- a/src/pages/graphql/payment-services/index.md +++ b/src/pages/graphql/payment-services-extension/index.md @@ -1,12 +1,12 @@ --- -title: Payment Services Payment Methods +title: Payment Services extension description: Learn how to use the GraphQL APIs to integrate the Payment Services extension. keywords: - GraphQL - Payments --- -# Payment Services Payment Methods +# Payment Services extension Payment Services is your one-stop-shop for online checkout (from settlement and refunds to getting paid). Payment Services is designed to meet _all_ your payment needs. @@ -17,10 +17,24 @@ It provides powerful tools to give you the insight and control needed for creati * **Cash flow management financial reporting**---Synchronize [payment details](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/reporting/order-payment-status.html) with orders to get full order and payment transparency, [payouts](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/reporting/payouts.html), and detailed [transaction-level reporting](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/reporting/transactions.html) for financial reconciliation. * **Efficient checkout experience**---Remove any barriers to a fast and simple checkout with [card vaulting](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/payments-checkout/vaulting.html) and [Instant Purchase](https://experienceleague.adobe.com/docs/commerce-admin/stores-sales/point-of-purchase/checkout-instant-purchase.html) (enabled by default for Adobe Commerce) features. +## Payment Services GraphQL + [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 and higher provides enhanced payment method capabilities. With this extension, you can implement the following payment methods: * Apple Pay with PayPal * Google Pay with PayPal * PayPal Hosted Fields * PayPal Smart Buttons -* PayPal Vault +* Credit card vaulting + +## Credit card vaulting + +The vault-related changes to the schema allow you to generate stored payment details and to modify a payment token. + +The Payment Services Vault method is a solution in which shoppers can store—or "vault"—their credit card credentials to use in a later purchase: + +* Logged-in customers can vault a payment method in the **My Account** dashboard [without a purchase](https://experienceleague.adobe.com/en/docs/commerce-merchant-services/payment-services/payments-checkout/vaulting#vaulting-without-purchase). This functionality is available only if you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher. + +* Logged-in customers can [vault a credit card during checkout](https://experienceleague.adobe.com/en/docs/commerce-merchant-services/payment-services/payments-checkout/vaulting#vaulting-a-payment-method-during-checkout) to use in a later purchase in the current store or other stores within the same merchant account. + +See [Payment Services Vault workflow](../payment-services-extension/workflows/vault.md) for more information. diff --git a/src/pages/graphql/schema/checkout/mutations/create-payment-order.md b/src/pages/graphql/payment-services-extension/mutations/create-payment-order.md similarity index 92% rename from src/pages/graphql/schema/checkout/mutations/create-payment-order.md rename to src/pages/graphql/payment-services-extension/mutations/create-payment-order.md index ab2912ce9..be4cbcc8e 100644 --- a/src/pages/graphql/schema/checkout/mutations/create-payment-order.md +++ b/src/pages/graphql/payment-services-extension/mutations/create-payment-order.md @@ -1,5 +1,6 @@ --- title: createPaymentOrder mutation +description: This mutation creates a payment order for later processing when Payment Services extension is enabled. --- # createPaymentOrder mutation @@ -77,9 +78,9 @@ Attribute | Data Type | Description --- | --- | --- `cartId` | String! | The unique ID of the cart `location` | PaymentLocation! | The origin location for that payment request. The possible values are -PRODUCT_DETAIL, MINICART, CART, CHECKOUT, ADMIN +`PRODUCT_DETAIL`, `MINICART`, `CART`, `CHECKOUT`, `ADMIN` `methodCode` | String! | The code for the selected payment method -`paymentSource` | String! | The payment source for the payment method. The possible values are credit card (`cc`), PayPal (`paypal`), and Apple Pay (`applepay`) +`paymentSource` | String! | The payment source for the payment method The possible values are credit card (`cc`), PayPal (`paypal`), and Apple Pay (`applepay`) `vaultIntent` | Boolean | Indicates whether the payment information should be vaulted. This attribute is only applicable to the `hosted_fields` payment method. The default value is `false` ## Output attributes diff --git a/src/pages/graphql/payment-services-extension/mutations/create-vault-card-payment-token.md b/src/pages/graphql/payment-services-extension/mutations/create-vault-card-payment-token.md new file mode 100644 index 000000000..94e340785 --- /dev/null +++ b/src/pages/graphql/payment-services-extension/mutations/create-vault-card-payment-token.md @@ -0,0 +1,105 @@ +--- +title: createVaultCardPaymentToken mutation +description: This mutation creates a permanent token ID and associates an optional card description, visible in the storefront. +--- + +# createVaultCardPaymentToken mutation + + + +This mutation is available only if you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher. + +The `createVaultCardPaymentToken` mutation creates a permanent `vault_token_id` and associates an optional card description, visible in the storefront. + +To run the `createVaultCardPaymentToken` mutation, you need the `setup_token` generated with the [`createVaultCardSetupToken`](create-vault-card-setup-token.md) mutation. + +## Syntax + +```graphql +mutation { + createVaultCardPaymentToken( + input: CreateVaultCardPaymentTokenInput! + ) CreateVaultCardPaymentTokenOutput +} +``` + +## Example usage + +The following example runs the `createVaultCardPaymentToken` mutation to create a permanent `vault_token_id` for the given payment method. + +## Request + +```graphql +mutation { + createVaultCardPaymentToken( + input: { + setup_token_id: "23N11484TX9371211" + card_description: "My New Card" + } + ) { + vault_token_id + payment_source { + card { + brand + last_digits + expiry + } + } + } +} +``` + +## Response + +```json +{ + "data": { + "createVaultCardPaymentToken": { + "vault_token_id": "745bf41a-4196-41a6-a17a-0234f89118fc", + "payment_source": { + "card": { + "brand": "VISA", + "last_digits": "0004", + "expiry": "2027-02" + } + } + } + } +} +``` + +## Input attributes + +The `CreateVaultCardPaymentTokenInput` object contains the following input attributes: + +Attribute | Data Type | Description +--- | --- | --- +`setup_token_id` | String! | The `setup_token` obtained with the `createVaultCardSetupToken` mutation +`card_description` | String | The description of the vaulted card + +## Output attributes + +The `CreateVaultCardPaymentTokenOutput` object contains the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`vault_token_id` | String! | The vault payment token information +`payment_source` | PaymentSourceOutput! | The payment source information + +### `PaymentSourceOutput` attributes + +The `PaymentSourceOutput` object describes the payment source information. It contains the following attribute: + +Attribute | Data Type | Description +--- | --- | --- +`card` | CardPaymentSourceOutput! | The card payment source information. + +### `CardPaymentSourceOutput` object + +The `CardPaymentSourceOutput` object describes the card payment source information + +Attribute | Data Type | Description +--- | --- | --- +`brand` | String | The brand of the card +`last_digits` | String | Last digits of the card +`expiry` | String | The expiry date of the card diff --git a/src/pages/graphql/payment-services-extension/mutations/create-vault-card-setup-token.md b/src/pages/graphql/payment-services-extension/mutations/create-vault-card-setup-token.md new file mode 100644 index 000000000..821619d1a --- /dev/null +++ b/src/pages/graphql/payment-services-extension/mutations/create-vault-card-setup-token.md @@ -0,0 +1,128 @@ +--- +title: createVaultCardSetupToken mutation +description: This mutation creates a temporary token associated to the given payment source. +--- + +# createVaultCardSetupToken mutation + + + +This mutation is available only if you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher. + +The `createVaultCardSetupToken` mutation creates a temporary `setup_token` associated to the given payment source. + +Use this token to create a permanent token with the [`createVaultCardPaymentToken`](create-vault-card-payment-token.md) mutation. The permanent token represents a payment method that is saved to the customer's vault. + +The setup token is generated with an empty card number in the `payment_source` object purposefully. The PayPal SDK, in conjunction with hosted fields or credit cards field components, securely update the setup token with payment details. + +See [Paypal SDK developer documentation](https://developer.paypal.com/docs/multiparty/checkout/save-payment-methods/purchase-later/js-sdk/cards/) for more information. + +## Syntax + +```graphql +mutation { + createVaultCardSetupToken( + input: CreateVaultCardSetupTokenInput! + ) CreateVaultCardSetupTokenOutput +} +``` + +## Example usage + +The following example runs the `createVaultCardSetupToken` mutation to create a setup token for the given payment details. + +**Request:** + +```graphql +mutation { + createVaultCardSetupToken( + input: { + setup_token: { + payment_source: { + card: { + name: "John Doe", + billing_address: { + address_line_1: "123 Main Street", + address_line_2: "Apt 4B", + region: "California", + city: "San Jose", + postal_code: "90001", + country_code: "US" + } + } + } + }, + three_ds_mode: "SCA_ALWAYS" + } + ) { + setup_token + } +} +``` + +**Response:** + +```json +{ + "data": { + "createVaultCardSetupToken": { + "setup_token": "11M29729J2618171X" + } + } +} +``` + +## Input attributes + +The `CreateVaultCardSetupTokenInput` object must contain the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`setup_token` | VaultSetupTokenInput! | The setup token information +`three_ds_mode` | ThreeDSMode | Indicates which 3D Secure authentication mode is in use. The possible values are `OFF`, `SCA_WHEN_REQUIRED`, `SCA_ALWAYS` + +### `VaultSetupTokenInput` attribute + +The `VaultSetupTokenInput` object describes the variables needed to create a vault card setup token. Requires the following attribute: + +Attribute | Data Type | Description +--- | --- | --- +`payment_source` | PaymentSourceInput! | The payment source of the payment method. + +### `PaymentSourceInput` attribute + +The `PaymentSourceInput` object describes the payment source information of the payment method. + +Attribute | Data Type | Description +--- | --- | --- +`card` | CardPaymentSourceInput! | The card payment source information. + +### `CardPaymentSourceInput` object + +The `CardPaymentSourceInput` object describes the card payment source information. + +Attribute | Data Type | Description +--- | --- | --- +`billing_address` | BillingAddressPaymentSourceInput! | The billing address of the card +`name` | String! | The cardholder's name + +### `BillingAddressPaymentSourceInput` object + +The `BillingAddressPaymentSourceInput` object includes the billing address information + +Attribute | Data Type | Description +--- | --- | --- +`address_line_1` | String | The first line of the address +`address_line_2` | String | The second line of the address +`region` | String | The region of the address +`city` | String | The city of the address +`postal_code` | String | The postal code of the address +`country_code` | String! | The country code of the address + +## Output attributes + +The `createVaultCardSetupTokenOutput` object contains the following attribute: + +Attribute | Data Type | Description +--- | --- | --- +`setup_token` | String! | The setup token ID diff --git a/src/pages/graphql/schema/checkout/mutations/sync-payment-order.md b/src/pages/graphql/payment-services-extension/mutations/sync-payment-order.md similarity index 91% rename from src/pages/graphql/schema/checkout/mutations/sync-payment-order.md rename to src/pages/graphql/payment-services-extension/mutations/sync-payment-order.md index 649e922ae..5d7d0334a 100644 --- a/src/pages/graphql/schema/checkout/mutations/sync-payment-order.md +++ b/src/pages/graphql/payment-services-extension/mutations/sync-payment-order.md @@ -1,5 +1,6 @@ --- title: syncPaymentOrder mutation +description: This mutation synchronizes the payment order details for the PayPal Smart Buttons and Apple Pay payment methods. --- # syncPaymentOrder mutation diff --git a/src/pages/graphql/schema/checkout/queries/get-payment-config.md b/src/pages/graphql/payment-services-extension/queries/get-payment-config.md similarity index 92% rename from src/pages/graphql/schema/checkout/queries/get-payment-config.md rename to src/pages/graphql/payment-services-extension/queries/get-payment-config.md index 1fa24e5c5..7ae9cfc21 100644 --- a/src/pages/graphql/schema/checkout/queries/get-payment-config.md +++ b/src/pages/graphql/payment-services-extension/queries/get-payment-config.md @@ -1,5 +1,6 @@ --- title: getPaymentConfig query +description: This query returns the payment configuration details from locations in the storefront and Admin where the payment method can be set. --- # getPaymentConfig query @@ -10,7 +11,7 @@ This query is available only if you have installed [Payment Services for Adobe C The `getPaymentConfig` query returns the payment configuration details from locations in the storefront and Admin where the payment method can be set. -The query can return details about the following supported payment methods in [Payment Services](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/payments-checkout/payments-options.html): : +The query can return details about the following supported payment methods in [Payment Services](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/payments-checkout/payments-options.html): * Apple Pay * Google Pay @@ -254,7 +255,7 @@ The `getPaymentConfig` query requires the following input attribute: Attribute | Data Type | Description --- | --- | --- -`location` | PaymentLocation! | The origin location for that payment request. The possible values are `PRODUCT_DETAIL`, `MINICART`, `CART`, `CHECKOUT`, `ADMIN`. +`location` | PaymentLocation! | The origin location for that payment request. The possible values are `PRODUCT_DETAIL`, `MINICART`, `CART`, `CHECKOUT`, `ADMIN` ## Output attributes @@ -276,11 +277,11 @@ The `PaymentConfigItem` interface contains the fields that are common to all the Attribute | Data Type | Description --- | --- | --- `code` | String | The payment method code as defined in the payment gateway -`is_visible` | Boolean | Indicates whether the payment method is shown. -`payment_intent` | String | Defines the payment intent. The possible values are `Authorize` or `Capture`. -`sdk_params` | SDKParams | PayPal parameters required to load the PayPal JavaScript SDK. -`sort_order` | String | The relative order the payment method is displayed on the checkout page. -`title` | String! | The display name of the payment method. +`is_visible` | Boolean | Indicates whether the payment method is shown +`payment_intent` | String | Defines the payment intent. The possible values are `Authorize` or `Capture` +`sdk_params` | SDKParams | PayPal parameters required to load the PayPal JavaScript SDK +`sort_order` | String | The relative order the payment method is displayed on the checkout page +`title` | String! | The display name of the payment method This interface also has the following implementations: @@ -302,8 +303,8 @@ Attribute | Data Type | Description `label` | String | The button label `layout` | String | The button layout `shape` | String | The button shape -`tagline` | Boolean | Indicates whether the tagline is displayed. -`use_default_height` | Boolean | Defines if button uses default height. If the value is `False`, the value of `height` is used. +`tagline` | Boolean | Indicates whether the tagline is displayed +`use_default_height` | Boolean | Defines if button uses default height. If the value is `False`, the value of `height` is used See [Payment options](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/payments-checkout/payments-options.html) for more information. @@ -313,13 +314,13 @@ The `GooglePayConfig` payment method configuration contains the following attrib Attribute | Data Type | Description --- | --- | --- -`code` | String | The payment method code as defined in the payment gateway. -`is_visible` | Boolean | Indicates whether the payment method is shown. -`payment_intent` | String | Defines the payment intent. The possible values are `Authorize` or `Capture`. -`payment_source` | String | The identifiable payment source for the payment method. -`sdk_params` | SDKParams | PayPal parameters required to load the PayPal JavaScript SDK. -`sort_order` | String | The relative order the payment method is displayed on the checkout page. -`title` | String! | The display name of the payment method. +`code` | String | The payment method code as defined in the payment gateway +`is_visible` | Boolean | Indicates whether the payment method is shown +`payment_intent` | String | Defines the payment intent. The possible values are `Authorize` or `Capture` +`payment_source` | String | The identifiable payment source for the payment method +`sdk_params` | SDKParams | PayPal parameters required to load the PayPal JavaScript SDK +`sort_order` | String | The relative order the payment method is displayed on the checkout page +`title` | String! | The display name of the payment method The possible values for `payment_source` are credit card (`cc`), PayPal (`paypal`), Google Pay (`googlepay`), and Apple Pay (`applepay`), depending on the payment method. @@ -327,9 +328,9 @@ The `GooglePayConfig` payment method configuration also has a `button_styles` ob Attribute | Data Type | Description --- | --- | --- -`color` | String | The button color. -`height` | Int | The button height in pixels. -`type` | String | Defines the button type. The possible values are `buy`, `checkout`, `order`, `pay`, and `plain`. +`color` | String | The button color +`height` | Int | The button height in pixels +`type` | String | Defines the button type. The possible values are `buy`, `checkout`, `order`, `pay`, and `plain` See [Google Pay API request object options](https://developers.google.com/pay/api/web/reference/request-objects) documentation for more information. @@ -339,11 +340,11 @@ The `HostedFieldsConfig` payment method configuration contains the following att Attribute | Data Type | Description --- | --- | --- -`cc_vault_code` | String | The vault payment method code. Hosted fields only works with credit cards (cc). -`is_vault_enabled` | Boolean | Indicates whether card vaulting is enabled. -`payment_source` | String | The identifiable payment source for the payment method. +`cc_vault_code` | String | The vault payment method code. Hosted fields only works with credit cards (cc) +`is_vault_enabled` | Boolean | Indicates whether card vaulting is enabled +`payment_source` | String | The identifiable payment source for the payment method `requires_card_details` | Boolean | Indicates whether card and bin details are required. This value is true when the Signifyd integration is enabled for hosted fields -`three_ds` | Boolean | Indicates whether 3DS mode is enabled. +`three_ds` | Boolean | Indicates whether 3DS mode is enabled ### `SmartButtonsConfig` attributes @@ -351,10 +352,10 @@ The `SmartButtonsConfig` payment method configuration contains the following att Attribute | Data Type | Description --- | --- | --- -`button_styles` | ButtonStyles | The styles for the PayPal Smart Button configuration. -`display_message` | Boolean | Indicates whether the PayPal Pay Later message is shown. -`display_venmo` | Boolean | Defines if the Venmo option is shown. -`message_styles` | MessageStyles | The message styles for the PayPal Pay Later configuration. +`button_styles` | ButtonStyles | The styles for the PayPal Smart Button configuration +`display_message` | Boolean | Indicates whether the PayPal Pay Later message is shown +`display_venmo` | Boolean | Defines if the Venmo option is shown +`message_styles` | MessageStyles | The message styles for the PayPal Pay Later configuration See [Payment options](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/payments-checkout/payments-options.html) for more information. @@ -369,8 +370,8 @@ Attribute | Data Type | Description `label` | String | The button label `layout` | String | The button layout `shape` | String | The button shape -`tagline` | Boolean | Indicates whether to display the PayPal tagline. -`use_default_height` | Boolean | Defines if button uses default height. If the value is `False`, the value of `height` is used. +`tagline` | Boolean | Indicates whether to display the PayPal tagline +`use_default_height` | Boolean | Defines if button uses default height. If the value is `False`, the value of `height` is used #### `MessageStyles` object diff --git a/src/pages/graphql/schema/checkout/queries/get-payment-order.md b/src/pages/graphql/payment-services-extension/queries/get-payment-order.md similarity index 98% rename from src/pages/graphql/schema/checkout/queries/get-payment-order.md rename to src/pages/graphql/payment-services-extension/queries/get-payment-order.md index b6ed1490d..6f965c48d 100644 --- a/src/pages/graphql/schema/checkout/queries/get-payment-order.md +++ b/src/pages/graphql/payment-services-extension/queries/get-payment-order.md @@ -1,5 +1,6 @@ --- title: getPaymentOrder query +description: This query retrieves the payment details for the order. --- # getPaymentOrder query diff --git a/src/pages/graphql/schema/checkout/queries/get-payment-sdk.md b/src/pages/graphql/payment-services-extension/queries/get-payment-sdk.md similarity index 97% rename from src/pages/graphql/schema/checkout/queries/get-payment-sdk.md rename to src/pages/graphql/payment-services-extension/queries/get-payment-sdk.md index 35619140e..680b9b2c5 100644 --- a/src/pages/graphql/schema/checkout/queries/get-payment-sdk.md +++ b/src/pages/graphql/payment-services-extension/queries/get-payment-sdk.md @@ -1,5 +1,6 @@ --- title: getPaymentSDK query +description: This query retrieves the payment PayPal SDK URLs and other related values. --- # getPaymentSDK query diff --git a/src/pages/graphql/payment-services-extension/queries/get-vault-config.md b/src/pages/graphql/payment-services-extension/queries/get-vault-config.md new file mode 100644 index 000000000..647f701d0 --- /dev/null +++ b/src/pages/graphql/payment-services-extension/queries/get-vault-config.md @@ -0,0 +1,103 @@ +--- +title: getVaultConfig query +description: This query returns the vault configuration details for each payment method available. +--- + +# getVaultConfig query + + + +This query is available only if you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher. + +The `getVaultConfig` query returns the vault configuration details for each payment method available. For now, only `credit_card` is supported. + +## Syntax + +```graphql +{ + getVaultConfig() VaultConfigOutput +} +``` + +## Example usage + +The following example runs the `getVaultConfig` query to retrieve all the stored payment details. + +**Request:** + +```graphql +query { + getVaultConfig() { + credit_card { + is_vault_enabled + three_ds_mode + sdk_params { + name + value + } + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "getVaultConfig": { + "credit_card": { + "is_vault_enabled": true, + "three_ds_mode": "SCA_ALWAYS", + "sdk_params": [ + { + "name": "src", + "value": "https:\/\/www.paypal.com\/sdk\/js?client-id=..." + }, + { + "name": "data-partner-attribution-id", + "value": "MagentoPayments_SP_PCP_Int" + }, + { + "name": "data-client-token", + "value": "..." + }, + { + "name": "data-expires-in", + "value": "3600" + } + ] + } + } + } +} +``` + +## Output attributes + +The `VaultConfigOutput` object contains the following attribute: + +Attribute | Data Type | Description +--- | --- | --- +`credit_card` | VaultCreditCardConfig | Credit card vault method configuration + +### `VaultCreditCardConfig` attributes + +The `VaultCreditCardConfig` object provides details about the credit card vault method configuration + +Attribute | Data Type | Description +--- | --- | --- +`is_vault_enabled` | Boolean | Indicates whether card vaulting is enabled +`three_ds_mode` | ThreeDSMode | Indicates which 3D Secure authentication mode is in use. The possible values are `OFF`, `SCA_WHEN_REQUIRED`, `SCA_ALWAYS` +`sdk_params` | [SDKParams] | PayPal parameters required to load the PayPal JavaScript SDK + +#### `SDKParams` attributes + +The `SDKParams` object provides details about the SDK parameters: + +Attribute | Data Type | Description +--- | --- | --- +`name` | String | The name of the SDK parameter +`value` | String | The value of the SDK parameter + +These values come from [PayPal JavaScript SDK](https://developer.paypal.com/sdk/js/reference/). diff --git a/src/pages/graphql/payment-services/checkout.md b/src/pages/graphql/payment-services-extension/workflows/checkout.md similarity index 76% rename from src/pages/graphql/payment-services/checkout.md rename to src/pages/graphql/payment-services-extension/workflows/checkout.md index 988412aca..b2b3cb779 100644 --- a/src/pages/graphql/payment-services/checkout.md +++ b/src/pages/graphql/payment-services-extension/workflows/checkout.md @@ -10,21 +10,21 @@ keywords: [Payment Services for Adobe Commerce and Magento Open Source](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/guide-overview.html) is your turnkey self-service solution, including sandbox testing and a simple setup, for providing robust and secure payment processing for your Commerce websites. -These steps describe the flow of requests and responses required to complete a typical [checkout](../tutorials/checkout/index.md) authorization with Payment Services enabled. +These steps describe the flow of requests and responses required to complete a typical [checkout](../../tutorials/checkout/index.md) authorization with Payment Services enabled. ## Checkout workflow -![Payment Services sequence diagram](../../_images/graphql/payment-services.svg) +![Payment Services sequence diagram](../../../_images/graphql/payment-services.svg) -1. Run the [`getPaymentConfig`](../schema/checkout/queries/get-payment-config.md) query to fetch the payment configuration needed to render details about PayPal components, such as hosted fields, smart buttons, and Apple Pay. +1. Run the [`getPaymentConfig`](../../payment-services-extension/queries/get-payment-config.md) query to fetch the payment configuration needed to render details about PayPal components, such as hosted fields, smart buttons, and Apple Pay. 1. Commerce returns payment configuration information. -1. Run [`setPaymentMethodOnCart`](../schema/cart/mutations/set-payment-method.md) to [set the payment method](../tutorials/checkout/set-payment-method.md). +1. Run [`setPaymentMethodOnCart`](../../schema/cart/mutations/set-payment-method.md) to [set the payment method](../../tutorials/checkout/set-payment-method.md). 1. Adobe Commerce returns a `Cart` object. -1. Run [`createPaymentOrder`](../schema/checkout/mutations/create-payment-order.md) to begin the authorization process. +1. Run [`createPaymentOrder`](../../payment-services-extension/mutations/create-payment-order.md) to begin the authorization process. 1. Commerce forwards the request to PayPal. @@ -32,11 +32,11 @@ These steps describe the flow of requests and responses required to complete a t 1. Adobe Commerce generates a `order_id` and forwards the value in the `mp_order_id` field and the PayPal response in the `id` field. -1. (Optional) If hosted fields and the Signifyd integration are enabled, run [`getPaymentOrder`](../schema/checkout/queries/get-payment-order.md). +1. (Optional) If hosted fields and the Signifyd integration are enabled, run [`getPaymentOrder`](../../payment-services-extension/queries/get-payment-order.md). 1. (Optional) Adobe Commerce returns details about the payment order. -1. Run [`placeOrder`](../schema/cart/mutations/place-order.md). +1. Run [`placeOrder`](../../schema/cart/mutations/place-order.md). 1. Commerce sends an authorization request to PayPal. @@ -46,7 +46,7 @@ These steps describe the flow of requests and responses required to complete a t ## `setPaymentMethodOnCartInput` object -For the PayPal Smart Buttons and Apple Pay payment methods, you do not need to run the [`setPaymentMethodOnCart`](../schema/cart/mutations/set-payment-method.md) mutation. The hosted fields payment method requires that you run the mutation only if one of the following conditions are true: +For the PayPal Smart Buttons and Apple Pay payment methods, you do not need to run the [`setPaymentMethodOnCart`](../../schema/cart/mutations/set-payment-method.md) mutation. The hosted fields payment method requires that you run the mutation only if one of the following conditions are true: * You intend to vault a card by setting `is_active_payment_token_enabler` to `true`. diff --git a/src/pages/graphql/payment-services/minicart.md b/src/pages/graphql/payment-services-extension/workflows/minicart.md similarity index 71% rename from src/pages/graphql/payment-services/minicart.md rename to src/pages/graphql/payment-services-extension/workflows/minicart.md index 59aa4f4fb..22c673f4c 100644 --- a/src/pages/graphql/payment-services/minicart.md +++ b/src/pages/graphql/payment-services-extension/workflows/minicart.md @@ -8,17 +8,17 @@ keywords: # Payment services minicart workflow -These steps describe the additional flow of requests and responses required to place an order after [adding a product to your cart](../tutorials/checkout/add-product-to-cart.md) with the [Payment Services](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/guide-overview.html) solution enabled. +These steps describe the additional flow of requests and responses required to place an order after [adding a product to your cart](../../tutorials/checkout/add-product-to-cart.md) with the [Payment Services](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/guide-overview.html) solution enabled. ## Minicart workflow -![Payment Services sequence diagram](../../_images/graphql/payment-services-minicart.svg) +![Payment Services sequence diagram](../../../_images/graphql/payment-services-minicart.svg) -1. Run the [`getPaymentConfig`](../schema/checkout/queries/get-payment-config.md) query to fetch the payment configuration needed to render details about PayPal components, such as hosted fields, smart buttons, and Apple Pay. +1. Run the [`getPaymentConfig`](../../payment-services-extension/queries/get-payment-config.md) query to fetch the payment configuration needed to render details about PayPal components, such as hosted fields, smart buttons, and Apple Pay. 1. Adobe Commerce returns payment configuration information. -1. Run [`createPaymentOrder`](../schema/checkout/mutations/create-payment-order.md) to begin the authorization process. +1. Run [`createPaymentOrder`](../../payment-services-extension/mutations/create-payment-order.md) to begin the authorization process. 1. Commerce forwards the request to PayPal. @@ -26,15 +26,15 @@ These steps describe the additional flow of requests and responses required to p 1. Commerce generates an `order_id` and forwards the value in the `mp_order_id` field and in the PayPal response in the `id` field. -1. Run the [`syncPaymentOrder`](../schema/checkout/mutations/sync-payment-order.md) mutation to get payment details and update the quote with shipping, billing, email, and phone number details. +1. Run the [`syncPaymentOrder`](../../payment-services-extension/mutations/sync-payment-order.md) mutation to get payment details and update the quote with shipping, billing, email, and phone number details. 1. Commerce returns details about the payment order. -1. Run the [`setShippingMethodsOnCart`](../schema/cart/mutations/set-shipping-method.md)mutation to define the delivery methods for your order. +1. Run the [`setShippingMethodsOnCart`](../../schema/cart/mutations/set-shipping-method.md)mutation to define the delivery methods for your order. 1. Commerce returns details about the delivery methods for your order. -1. Run the [`placeOrder`](../schema/cart/mutations/place-order.md) mutation. +1. Run the [`placeOrder`](../../schema/cart/mutations/place-order.md) mutation. 1. Commerce sends an authorization request to PayPal. @@ -44,7 +44,7 @@ These steps describe the additional flow of requests and responses required to p ## `setPaymentMethodOnCartInput` object -For the PayPal Smart Buttons and Apple Pay payment methods, you do not need to run the [`setPaymentMethodOnCart`](../schema/cart/mutations/set-payment-method.md) mutation. The hosted fields payment method requires that you run the mutation only if one of the following conditions are true: +For the PayPal Smart Buttons and Apple Pay payment methods, you do not need to run the [`setPaymentMethodOnCart`](../../schema/cart/mutations/set-payment-method.md) mutation. The hosted fields payment method requires that you run the mutation only if one of the following conditions are true: * You intend to vault a card by setting `is_active_payment_token_enabler` to `true`. diff --git a/src/pages/graphql/payment-services/vault.md b/src/pages/graphql/payment-services-extension/workflows/vault.md similarity index 59% rename from src/pages/graphql/payment-services/vault.md rename to src/pages/graphql/payment-services-extension/workflows/vault.md index b86474ba3..5cf1295f4 100644 --- a/src/pages/graphql/payment-services/vault.md +++ b/src/pages/graphql/payment-services-extension/workflows/vault.md @@ -1,36 +1,24 @@ --- -title: Payment Services Vault -description: Learn how to use the GraphQL APIs to integrate the Payment Services Vault payment solution. +title: Payment Services Vault workflow +description: Learn how to use the GraphQL APIs to integrate the Payment Services Vault solution. keywords: - GraphQL - Payments --- -# Payment Services Vault payment method +# Payment Services Vault workflow -The [Payment Services Vault payment method](https://experienceleague.adobe.com/docs/commerce-merchant-services/payment-services/payments-checkout/vaulting.html) is a method of storing a transaction in which shoppers can save—or "vault"—their credit card credentials during checkout to use in a later purchase. +The following diagram shows the workflow for storing a payment method during checkout. -The following conditions must be true to use this payment method: +![Payment Services Vault sequence diagram](../../../_images/graphql/payment-services-paypal-vault.svg) -- The customer must be logged-in. - -- The customer must have previously saved their payment information in the vault. - -You cannot use this payment method if the customer decides to use a credit or debit card that is not stored in the vault. - -## Payment Services Vault workflow - -The following diagram shows the workflow for placing an order when Payment Services Vault is the selected payment method. - -![Payment Services Vault sequence diagram](../../_images/graphql/payment-services-paypal-vault.svg) - -1. Use the [`customerPaymentTokens`](../schema/checkout/queries/customer-payment-tokens.md) query to retrieve the payment tokens the customer stored in the vault. +1. Use the [`customerPaymentTokens`](../../schema/checkout/queries/customer-payment-tokens.md) query to retrieve the payment tokens the customer stored in the vault. 1. Commerce returns an array of payment tokens. 1. The client integration renders the token information, and the customer selects a payment method. - When the customer selects a stored payment method, the client integration uses the [`setPaymentMethodOnCart`](../schema/cart/mutations/set-payment-method.md) mutation to set the payment method to `payment_services_paypal_vault`. + When the customer selects a stored payment method, the client integration uses the [`setPaymentMethodOnCart`](../../schema/cart/mutations/set-payment-method.md) mutation to set the payment method to `payment_services_paypal_vault`. 1. Commerce returns a `Cart` object. @@ -44,9 +32,9 @@ The following diagram shows the workflow for placing an order when Payment Servi ## Additional Payment information -When you set the payment method to Payment Services Vault in the [`setPaymentMethodOnCart`](../schema/cart/mutations/set-payment-method.md) mutation, you must supply a value for the `public_hash` field. Run the [`customerPaymentTokens`](../schema/checkout/queries/customer-payment-tokens.md) query to retrieve the value. +When you set the payment method to Payment Services Vault in the [`setPaymentMethodOnCart`](../../schema/cart/mutations/set-payment-method.md) mutation, you must supply a value for the `public_hash` field. Run the [`customerPaymentTokens`](../../schema/checkout/queries/customer-payment-tokens.md) query to retrieve the value. -This `public_hash` comes from the [`customerPaymentTokens`](../schema/checkout/queries/customer-payment-tokens.md) query. +This `public_hash` comes from the [`customerPaymentTokens`](../../schema/checkout/queries/customer-payment-tokens.md) query. ### `payment_services_paypal_vault` attributes diff --git a/src/pages/graphql/schema/checkout/index.md b/src/pages/graphql/schema/checkout/index.md index 393fcf022..206162286 100644 --- a/src/pages/graphql/schema/checkout/index.md +++ b/src/pages/graphql/schema/checkout/index.md @@ -6,12 +6,13 @@ title: Checkout The checkout schema helps complete the customer checkout process by managing and retrieving payment tokens and checkout agreements. -The checkout workflow differs for each online payment time. See the following topics for more information. +The checkout workflow differs for each online payment type. See the following topics for more information. * [Braintree](../../payment-methods/braintree.md) * [Braintree vault](../../payment-methods/braintree-vault.md) -* [Payment Services checkout](../../payment-services/checkout.md) -* [Payment Services minicart](../../payment-services/minicart.md) +* [Payment Services checkout](../../payment-services-extension/workflows/checkout.md) +* [Payment Services minicart](../../payment-services-extension/workflows/minicart.md) +* [Payment Services credit card vaulting](../../payment-services-extension/workflows/vault.md) * [Klarna](../../payment-methods/klarna.md) (no longer supported) * [PayPal Express Checkout](../../payment-methods/paypal-express-checkout.md) * [Express Checkout for other PayPal solutions](../../payment-methods/payflow-express.md) diff --git a/src/pages/graphql/schema/checkout/mutations/index.md b/src/pages/graphql/schema/checkout/mutations/index.md index 9676cfffb..7e898e1b9 100644 --- a/src/pages/graphql/schema/checkout/mutations/index.md +++ b/src/pages/graphql/schema/checkout/mutations/index.md @@ -6,8 +6,8 @@ title: Checkout mutations The checkout mutations create or otherwise manage the payment tokens needed to complete checkout for an online payment method. -If you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 or higher, you can use the following mutations: +If you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 or higher, you can use the following mutations during checkout: -* [`createPaymentOrder`](create-payment-order.md) +* [`createPaymentOrder`](../../../payment-services-extension/mutations/create-payment-order.md) -* [`syncPaymentOrder`](sync-payment-order.md) +* [`syncPaymentOrder`](../../../payment-services-extension/mutations/sync-payment-order.md) diff --git a/src/pages/graphql/schema/checkout/queries/index.md b/src/pages/graphql/schema/checkout/queries/index.md index fb11c63c7..c66d49f80 100644 --- a/src/pages/graphql/schema/checkout/queries/index.md +++ b/src/pages/graphql/schema/checkout/queries/index.md @@ -14,10 +14,10 @@ The checkout queries gather data necessary for completing the checkout process. * [`getPayflowLinkToken`](get-payflow-link-token.md) is required for PayPal Payflow transactions. -If you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 or higher, you can also use the following queries: +If you have installed [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.3.0 or higher, you can also use the following queries during checkout: -* [`getPaymentConfig`](get-payment-config.md) +* [`getPaymentConfig`](../../../payment-services-extension/queries/get-payment-config.md) -* [`getPaymentOrder`](get-payment-order.md) +* [`getPaymentOrder`](../../../payment-services-extension/queries/get-payment-order.md) -* [`getPaymentSDK`](get-payment-sdk.md) +* [`getPaymentSDK`](../../../payment-services-extension/queries/get-payment-sdk.md)