Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAY-5702: Adds docs for the updated vault feature in Payment Services #386

Merged
merged 48 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
92c435d
Adds folder for vault and its queries and mutations
danidelcar Dec 13, 2024
281bf39
reviewed attributes for vaultconfig
danidelcar Dec 16, 2024
c24ddf4
reviewed input and output attributes of the endpoints
danidelcar Dec 16, 2024
e130fa8
Merge branch 'main' into del-PAY-5702-vault
danidelcar Dec 16, 2024
bf1fd65
Update getVaultConfig.md
danidelcar Dec 16, 2024
0fce780
Update src/pages/graphql/schema/vault/index.md
danidelcar Dec 16, 2024
f8e446c
Update src/pages/graphql/schema/vault/index.md
danidelcar Dec 16, 2024
ea231b5
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 16, 2024
6b6c195
Update src/pages/graphql/schema/checkout/mutations/create-payment-ord…
danidelcar Dec 17, 2024
62a81fb
Update src/pages/graphql/schema/vault/index.md
danidelcar Dec 17, 2024
cb99d24
Update src/pages/graphql/schema/vault/index.md
danidelcar Dec 17, 2024
24863f4
Update src/pages/graphql/schema/vault/index.md
danidelcar Dec 17, 2024
7aa556d
Update src/pages/graphql/schema/vault/queries/getVaultConfig.md
danidelcar Dec 17, 2024
dd4fc3c
Update src/pages/graphql/schema/vault/queries/getVaultConfig.md
danidelcar Dec 17, 2024
5dbb9f8
Update src/pages/graphql/schema/vault/queries/getVaultConfig.md
danidelcar Dec 17, 2024
2d84735
Update src/pages/graphql/schema/vault/queries/getVaultConfig.md
danidelcar Dec 17, 2024
36e1f1e
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
ca4f939
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
b85d496
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
d904c15
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
00fd449
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
f0e3dcd
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
300b482
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
1f9ba6c
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
8f82da4
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
b5b0ca0
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
5a7844f
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
e0a625b
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
3ebb959
Update src/pages/graphql/schema/vault/mutations/createVaultCardPaymen…
danidelcar Dec 17, 2024
ea7d378
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
f359c7d
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
67d8a92
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
7f34a29
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
7878bab
Update src/pages/graphql/schema/vault/mutations/createVaultCardSetupT…
danidelcar Dec 17, 2024
87b0b19
Reviewed changes after peer review
danidelcar Dec 17, 2024
6417439
fixed link
danidelcar Dec 17, 2024
c65d459
updated workflow tutorial with latest vault updates
danidelcar Dec 17, 2024
aac77e2
new folder for payment services extension, reestructure all graphQL
danidelcar Dec 18, 2024
ba65c70
fix links
danidelcar Dec 18, 2024
b696a1f
fix links in workflows
danidelcar Dec 18, 2024
03a3b7a
adds description metadata to files
danidelcar Dec 18, 2024
c9566bf
fix issue
danidelcar Dec 18, 2024
7a44758
Update src/pages/graphql/payment-services-extension/index.md
danidelcar Dec 18, 2024
cb24ebe
Update src/pages/graphql/payment-services-extension/index.md
danidelcar Dec 18, 2024
c57b7f4
Update src/pages/graphql/payment-services-extension/mutations/create-…
danidelcar Dec 19, 2024
26f8e2f
Update src/pages/graphql/payment-services-extension/mutations/create-…
danidelcar Dec 19, 2024
a18ab2f
moved workflows menu
danidelcar Dec 19, 2024
05ead8f
removed all trailing periods
danidelcar Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 63 additions & 33 deletions src/data/navigation/sections/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
},
],
},
{
Expand All @@ -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/",
Expand All @@ -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/",
},
],
},
],
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/graphql/payment-methods/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

<InlineAlert variant="info" slots="text" />

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.
danidelcar marked this conversation as resolved.
Show resolved Hide resolved

### `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
Loading
Loading