Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation creates a new cart in Payment Services, supporting gu

<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.12.0 or higher.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `addProductsToNewCart` mutation always creates a new cart for the shopper then adds the specified products to that cart. This contrasts with the `addProductsToCart` mutation, which requires you to specify an existing cart ID as input.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation synchronizes order details before you run the `placeO

<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.12.0 or higher.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `completeOrder` mutation synchronizes order details before you run the `placeOrder` mutation.

Expand Down Expand Up @@ -42,6 +42,10 @@ mutation {
}
```

## Reference

The [`completeOrder`](/reference/graphql/saas/index.md#completeorder) reference provides detailed information about the types and fields defined in this mutation.

## Example usage

**Request:**
Expand Down Expand Up @@ -79,45 +83,3 @@ mutation {
}
}
```

## Input attributes

### CompleteOrderInput

| Field | Type | Description |
|-------|------|--------------|
| `cartId` | String! | The unique identifier of the shopping cart (quote). |
| `id` | String! | The payment, checkout, or transaction identifier tied to the order. |

## Output attributes

### CompleteOrderOutput

| Field | Type | Description |
|-------|------|--------------|
| `errors` | Error! | List of error objects. The array is empty if there are no errors. |
| `orderV2` | OrderV2 | Contains minimal order details if successful. |

### OrderV2 object

| Field | Type | Description |
|-------|------|--------------|
| `number` | String | The order number assigned by the system. |
| `token` | String | A token that can be used to retrieve the order, especially for guest checkouts. |

### Error object

| Field | Type | Description |
|-------|------|--------------|
| `code` | String | A machine-readable error code. |
| `message` | String | A human-readable message describing the error. |

#### Possible error codes

| Code | Description |
|------|--------------|
| `CART_NOT_FOUND` | The provided cart ID does not exist. |
| `CART_NOT_ACTIVE` | The cart is not active (already converted or expired). |
| `GUEST_EMAIL_MISSING` | A guest cart does not have an email address assigned. |
| `PAYMENT_ID_INVALID` | The provided payment or transaction ID is invalid. |
| `UNABLE_TO_COMPLETE_ORDER` | A general error occurred while finalizing the order (for example, missing information or out-of-stock items). |
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation creates a payment order for later processing when Pay

<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.3.0 or higher.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `createPaymentOrder` mutation creates a payment order for later processing with Payment Services enabled.

Expand All @@ -20,6 +20,8 @@ The mutation can return details about the following payment methods supported in

Each of these payment methods can have a different payment source, for example, PayPal Hosted Fields only works with credit cards. You need to run `getPaymentConfig` and `setPaymentMethodOnCart` endpoints before running the `createPaymentOrder` mutation.

See [PayPal currency codes](https://developer.paypal.com/reference/currency-codes/) documentation for more information about the value of the `currency_code` in the response.

## Syntax

```graphql
Expand All @@ -32,7 +34,7 @@ mutation {

## Reference

The [`createPaymentOrder`](/reference/graphql/index.md#createpaymentorder) reference provides detailed information about the types and fields defined in this mutation.
The [`createPaymentOrder`](/reference/graphql/saas/index.md#createpaymentorder) reference provides detailed information about the types and fields defined in this mutation.

## Example usage

Expand Down Expand Up @@ -73,29 +75,3 @@ mutation {
}
}
```

## Input attributes

The `CreatePaymentOrderInput` object contains the following input attributes:

| 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` |
| `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`) |
| `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

The `CreatePaymentOrderOutput` object contains the payment order details that are needed to fulfill a payment.

| Attribute | Data Type | Description |
| --- | --- | --- |
| `id` | String | The unique order ID generated by PayPal |
| `mp_order_id` | String | The unique order ID generated in Commerce if Payment Services is enabled after PayPal returns the `id` |
| `status` | String | The status of the payment order. See [order status](https://experienceleague.adobe.com/en/docs/commerce-admin/stores-sales/order-management/orders/order-status) for more information |
| `amount` | Float | The amount of the payment order |
| `currency_code` | String | The currency code of the payment order |

See [PayPal currency codes](https://developer.paypal.com/reference/currency-codes/) documentation for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation stores a permanent payment token for later purchases.

<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.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `createVaultCardPaymentToken` mutation creates a permanent `vault_token_id` and associates an optional card description, visible in the storefront.

Expand All @@ -25,7 +25,7 @@ mutation {

## Reference

The [`createVaultCardPaymentToken`](/reference/graphql/index.md#createvaultcardpaymenttoken) reference provides detailed information about the types and fields defined in this mutation.
The [`createVaultCardPaymentToken`](/reference/graphql/saas/index.md#createvaultcardpaymenttoken) reference provides detailed information about the types and fields defined in this mutation.

## Example usage

Expand Down Expand Up @@ -71,39 +71,3 @@ mutation {
}
}
```

## 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 |
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation creates a temporary token associated to the given pay

<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.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `createVaultCardSetupToken` mutation creates a temporary `setup_token` associated to the given payment source.

Expand All @@ -29,7 +29,7 @@ mutation {

## Reference

The [`createVaultCardSetupToken`](/reference/graphql/index.md#createvaultcardsetuptoken) reference provides detailed information about the types and fields defined in this mutation.
The [`createVaultCardSetupToken`](/reference/graphql/saas/index.md#createvaultcardsetuptoken) reference provides detailed information about the types and fields defined in this mutation.

## Example usage

Expand Down Expand Up @@ -75,66 +75,3 @@ mutation {
}
}
```

## 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_ALWAYS`, `SCA_WHEN_REQUIRED` |

### `ThreeDSMode` enum values

| Value | Description |
| --- | --- |
| `OFF` | No 3D Secure authentication mode is in use |
| `SCA_ALWAYS` | Triggers 3D Secure authentication for every transaction, regardless of any SCA requirements |
| `SCA_WHEN_REQUIRED` | Returns a 3D Secure authentication when it is a mandate in the region where you operate. This is the default value |

### `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 |
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation marks a cart as inactive in Payment Services, helping

<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.12.0 or higher.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `setCartAsInactive` mutation sets a specific `cartId` as inactive. Use this mutation when a payment error occurs, or when a shopper cancels a payment flow, after the [`addProductsToNewCart`](add-products-new-cart.md) mutation returns a `cartId`. This mutation helps prevent a customer having multiple active carts created with the [`addProductsToNewCart`](add-products-new-cart.md) mutation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This mutation synchronizes the payment order details for the PayPal

<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.3.0 or higher.
This mutation is available automatically on Adobe Commerce as a Cloud Service. On Adobe Commerce on Cloud and on-premises instances, you must install [Payment Services for Adobe Commerce](https://commercemarketplace.adobe.com/magento-payment-services.html) 2.10.0 or higher to use this mutation.

The `syncPaymentOrder` mutation synchronizes the payment order details for the PayPal Smart Buttons and Apple Pay payment methods. This mutation updates the quote with the shipping, billing, email, and phone number details. It returns a Boolean value indicating whether the synchronization was successful.

Expand All @@ -25,7 +25,7 @@ mutation {

## Reference

The [`syncPaymentOrder`](/reference/graphql/index.md#syncpaymentorder) reference provides detailed information about the types and fields defined in this mutation.
The [`syncPaymentOrder`](/reference/graphql/saas/index.md#syncpaymentorder) reference provides detailed information about the types and fields defined in this mutation.

## Example usage

Expand All @@ -51,12 +51,3 @@ mutation {
}
}
```

## Input attributes

The `SyncPaymentOrderInput` object must contain the following input attributes:

| Attribute | Data Type | Description |
| --- | --- | --- |
| `cartId` | String! | The unique ID of the cart |
| `id` | String! | The unique order ID generated by PayPal |
Loading
Loading